Mercurial > hg > Game > Cerium
changeset 1743:36eb8c21281a draft
remove warning in regex_mas
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 13 Nov 2013 19:25:46 +0900 |
parents | a35a2780a060 |
children | 68e5872085ff |
files | example/regex_mas/main.cc example/regex_mas/ppe/Exec.cc |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Tue Nov 12 17:41:33 2013 +0900 +++ b/example/regex_mas/main.cc Wed Nov 13 19:25:46 2013 +0900 @@ -128,6 +128,7 @@ if (w->size < size) size = w->size; int set_one_task_length = size/sizeof(char); + //int set_EX_task_length = set_one_task_length + extra_length; //const int ONE_TASK_LENGTH = w->division_size; //const int ONE_LOOP_LENGTH = array_task_num*spe_num*ONE_TASK_LENGTH; //const int ARRAY_LENGTH_SIZE = spe_num * ONE_TASK_LENGTH; @@ -136,10 +137,10 @@ //t_exec[k]->set_inData(1,(memaddr)search_word, sizeof(search_word)); if(size != w->size){ //最後のタスクかどうかの判定 - t_exec[k]->set_param(0,(memaddr)set_one_task_length + EXTRA_LENGTH); + t_exec[k]->set_param(0,&set_one_task_length + EXTRA_LENGTH); t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size+EXTRA_LENGTH); }else{ - t_exec[k]->set_param(0,(memaddr)set_one_task_length); + t_exec[k]->set_param(0,&set_one_task_length); t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size); } @@ -172,7 +173,7 @@ if (use_compat) { h_exec = manager->create_task(TASK_EXEC); - h_exec->set_param(0,(memaddr)length); + h_exec->set_param(0,&length); h_exec->set_inData(0,w->file_mmap + i*w->division_size, size); h_exec->set_outData(0,w->o_data + i*w->out_size, w->division_out_size);
--- a/example/regex_mas/ppe/Exec.cc Tue Nov 12 17:41:33 2013 +0900 +++ b/example/regex_mas/ppe/Exec.cc Wed Nov 13 19:25:46 2013 +0900 @@ -9,7 +9,7 @@ SchedDefineTask(Exec); //ボイヤームーア法による文字列検索アルゴリズム -int BM_method(unsigned char *text,int *text_length, +int BM_method(unsigned char *text,int text_length, unsigned char *pattern,unsigned long long *match_string) { int skip[256]; @@ -49,7 +49,7 @@ { unsigned char *i_data = (unsigned char *)s->get_input(rbuf,0); unsigned long long *o_data = (unsigned long long*)wbuf; - int *length = (int*)s->get_param(0); + int length = (int)s->get_inputSize(0); //unsigned char *search_word = (unsigned char*)s->get_input(1); unsigned char search_word[] = "doing";