Mercurial > hg > Game > Cerium
changeset 1651:c134dd2e2f4e draft
fix
author | Masa <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Jun 2013 19:44:09 +0900 |
parents | 1c0c49cd5275 |
children | 1709dde36b0d |
files | example/regex_mas/main.cc example/regex_mas/ppe/Exec.cc example/regex_mas/ppe/Print.cc |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Tue Jun 25 16:54:31 2013 +0900 +++ b/example/regex_mas/main.cc Tue Jun 25 19:44:09 2013 +0900 @@ -12,7 +12,7 @@ #include "Func.h" #include "WordCount.h" -#define EXTRA_LENGTH 2 //多く取ってくる文字数(search word length - 1) +#define EXTRA_LENGTH 4 //多く取ってくる文字数(search word length - 1) /* ;TODO * PS3でCPU数が2以上の時に、あまりが計算されてない @@ -481,8 +481,13 @@ spe_num = atoi(argv[i+1]); if (spe_num==0) spe_num = 1; } else if (strcmp(argv[i], "-sw") == 0) { +<<<<<<< local + //strcpy(search_word,argv[i+1]); + search_word = (unsigned char*)argv[i+1]; +======= // strcpy((char*)search_word,argv[i+1]); search_word = (unsigned char*)argv[i+1]; +>>>>>>> other } } if (filename==0) {
--- a/example/regex_mas/ppe/Exec.cc Tue Jun 25 16:54:31 2013 +0900 +++ b/example/regex_mas/ppe/Exec.cc Tue Jun 25 19:44:09 2013 +0900 @@ -51,11 +51,17 @@ { unsigned char *i_data = (unsigned char *)rbuf; unsigned long long *o_data = (unsigned long long*)wbuf; +<<<<<<< local + int length = (int)s->get_inputSize(0); + int *offset = (int*)s->get_param(1); + unsigned char search_word[] = "doing"; +======= long length = (long)s->get_param(0); long int offset = (long int)s->get_param(3); unsigned char* search_word = (unsigned char*)s->get_param(1); //unsigned char search_word[] = "aba"; s->printf("%ld,%ld,%s\n",length,offset,search_word); +>>>>>>> other BM_method(i_data,offset,(int)length,search_word,o_data); //s->printf("in Exec.cc\n");
--- a/example/regex_mas/ppe/Print.cc Tue Jun 25 16:54:31 2013 +0900 +++ b/example/regex_mas/ppe/Print.cc Tue Jun 25 19:44:09 2013 +0900 @@ -18,7 +18,7 @@ s->printf("position\n"); for (int i = 0;i < idata_task_num/2;i++) { - if(idata[2*i] == 0x61){ + if(idata[2*i] == 0x64){ s->printf("%d ",(int)idata[2*i+1]); s->printf("%c\n",(unsigned char)idata[2*i]);