Mercurial > hg > Game > Cerium
changeset 1797:964978cf41ae draft
minor fix
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 05 Dec 2013 00:45:08 +0900 |
parents | 355304646b4b |
children | 3babb36ac459 |
files | example/regex_mas/main.cc example/regex_mas/ppe/Exec.cc |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Wed Dec 04 23:12:29 2013 +0900 +++ b/example/regex_mas/main.cc Thu Dec 05 00:45:08 2013 +0900 @@ -104,7 +104,7 @@ if (use_task_array) { int task_num = (w->size+size-1)/size; if (task_num>array_task_num) task_num = array_task_num; - task_array = manager->create_task_array(TASK_EXEC,task_num,1,3,1); + task_array = manager->create_task_array(TASK_EXEC,task_num,2,3,1); if (!all) { t_next->wait_for(task_array); } else { @@ -125,6 +125,7 @@ t_exec->set_inData(2,w->BMskip_table, 256); t_exec->set_param(0,(long)a); + t_exec->set_param(1,(long)w->search_word_len); t_exec->set_outData(0,w->o_data + a*w->out_size, w->division_out_size); } else if (use_compat) { @@ -270,7 +271,7 @@ (memaddr)&w->self,sizeof(memaddr),0,0); w->t_print = t_print; - for(int i = 0;i<4;i++) { + for(int i = 0;i<2;i++) { /* Task を task_blocks ずつ起動する Task */ /* serialize されていると仮定する... */ HTaskPtr t_exec = manager->create_task(RUN_TASK_BLOCKS, @@ -336,7 +337,7 @@ int sw_len = strlen((const char *)sword); unsigned char *search_word = (unsigned char*)manager->allocate(sw_len + 1); - memcpy(search_word, sword, sw_len); + memcpy(search_word, sword, sw_len + 1); task_init(); st_time = getTime();
--- a/example/regex_mas/ppe/Exec.cc Wed Dec 04 23:12:29 2013 +0900 +++ b/example/regex_mas/ppe/Exec.cc Thu Dec 05 00:45:08 2013 +0900 @@ -38,14 +38,15 @@ int *skip_table = (int *)s->get_input(rbuf,2); int length = (int)s->get_inputSize(0); - int sw_len = (int)s->get_inputSize(1); + //int sw_len = (int)s->get_inputSize(1); //get_param long task_count = (long)s->get_param(0); + long sw_len = (long)s->get_param(1); - //s->printf("[task count: %lld]\n",task_count); + s->printf("[task count: %lld]\n",task_count); //s->printf("[search word: %s]\n",search_word); - //s->printf("[search word len : %d]\n",sw_len); + s->printf("[search word len : %d]\n",sw_len); unsigned long long *o_data = (unsigned long long*)s->get_output(wbuf,0);