Mercurial > hg > Game > Cerium
changeset 1652:1709dde36b0d draft
fix regex_mas
author | Masa <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Jun 2013 19:54:23 +0900 |
parents | c134dd2e2f4e |
children | cb1e5f6177b9 |
files | example/regex_mas/main.cc example/regex_mas/ppe/Exec.cc |
diffstat | 2 files changed, 5 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Tue Jun 25 19:44:09 2013 +0900 +++ b/example/regex_mas/main.cc Tue Jun 25 19:54:23 2013 +0900 @@ -272,8 +272,8 @@ const int ONE_LOOP_LENGTH = array_task_num*spe_num*ONE_TASK_LENGTH; const int ARRAY_LENGTH_SIZE = spe_num * ONE_TASK_LENGTH; int offset = ONE_LOOP_LENGTH * i + ARRAY_LENGTH_SIZE*j + ONE_TASK_LENGTH*k; - t_exec[k]->set_param(3,offset); - t_exec[k]->set_param(1,search_word); + t_exec[k]->set_param(1,offset); + //t_exec[k]->set_param(2,search_word); //printf("%s\n",search_word); if(size != w->size){ //ラストのタスクかどうかの判定 t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size+EXTRA_LENGTH); @@ -481,13 +481,8 @@ 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) { @@ -524,4 +519,4 @@ printf("Time: %0.6f\n",ed_time-st_time); } -/* end */ +/*end*/
--- a/example/regex_mas/ppe/Exec.cc Tue Jun 25 19:44:09 2013 +0900 +++ b/example/regex_mas/ppe/Exec.cc Tue Jun 25 19:54:23 2013 +0900 @@ -51,19 +51,12 @@ { 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 + //s->printf("%ld,%ld,%s\n",length,offset,search_word); - BM_method(i_data,offset,(int)length,search_word,o_data); + BM_method(i_data,(long int)offset,(int)length,search_word,o_data); //s->printf("in Exec.cc\n");