Mercurial > hg > Game > Cerium
changeset 1750:87b2b59161bd draft
remove hard cording in create_task_array
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 21 Nov 2013 02:57:47 +0900 |
parents | 4d63d122eea0 |
children | 224802aba3bd |
files | example/regex_mas/main.cc |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/main.cc Wed Nov 20 23:19:01 2013 +0900 +++ b/example/regex_mas/main.cc Thu Nov 21 02:57:47 2013 +0900 @@ -13,7 +13,6 @@ #include "SchedTask.h" #include "Func.h" #include "WordCount.h" -#define EXTRA_LENGTH 4 //多く取ってくる文字数(search word length - 1) /* ;TODO * PS3でCPU数が2以上の時に、あまりが計算されてない @@ -33,12 +32,14 @@ /* * set_inData_num * task_array[k] = manager->create_task_array - * (TASK_EXEC,array_task_num,1,input_set_inData,1); + * (TASK_EXEC,array_task_num,set_param_num,input_set_inData,1); * create_task_arrayの第四引数でset_inDataの数を指定させている。 * これにメチャクチャハマったので注意 * いつかはcreate_task_arrayを消したい */ int set_inData_num = 2; +int set_param_num = 1; +int set_out_num = 1; //static unsigned char* search_word; CPU_TYPE spe_cpu = SPE_ANY; @@ -123,7 +124,7 @@ Task **t_exec = (Task**)manager->allocate(sizeof(Task*)*spe_num); for (int k = 0; k < spe_num; k++) { - task_array[k] = manager->create_task_array(TASK_EXEC,array_task_num,1,set_inData_num,1); + task_array[k] = manager->create_task_array(TASK_EXEC,array_task_num,set_param_num,set_inData_num,set_out_num); t_exec[k] = 0; if (all) { w->t_print->wait_for(task_array[k]);