# HG changeset patch # User masa # Date 1454223597 -32400 # Node ID b70758c358dc0253de675f9ee4b81626c610dd46 # Parent f3e748c0e7ea5a59268b00709301912c5a5cfd1d fix variable diff -r f3e748c0e7ea -r b70758c358dc TaskManager/ManyCore/FileMapReduce.cc --- a/TaskManager/ManyCore/FileMapReduce.cc Sat Jan 30 19:06:17 2016 +0900 +++ b/TaskManager/ManyCore/FileMapReduce.cc Sun Jan 31 15:59:57 2016 +0900 @@ -207,12 +207,12 @@ HTask *h_exec = 0; int out_size = w->division_out_size / sizeof(*w->o_data); for (int j = 0; j < array_task_num; j++) { - int i = w->task_spawned++; + int task_spawned = w->task_spawned++; if (w->size < size) size = w->size; if (size==0) break; if (use_task_array) { t_exec = task_array->next_task_array(TASK_EXEC,t_exec); - t_exec->set_param(0,(long)0); + t_exec->set_param(0,(long)task_spawned); t_exec->set_param(1,(long)0); t_exec->set_param(2,(long)size); t_exec->set_param(3,(long)w->division_out_size); @@ -221,7 +221,7 @@ t_exec->set_outData(0,w->o_data + i*out_size, w->division_out_size); } else if (use_compat) { h_exec = manager->create_task(TASK_EXEC); - t_exec->set_param(0,(long)0); + t_exec->set_param(0,(long)task_spawned); t_exec->set_param(1,(long)0); t_exec->set_param(2,(long)size); t_exec->set_param(3,(long)w->division_out_size); @@ -261,7 +261,7 @@ h_exec = manager->create_task(TASK_EXEC, (memaddr)(w->file_mmap + i*w->division_size), size, (memaddr)(w->o_data + i*out_size), w->division_out_size); - t_exec->set_param(0,(long)0); + t_exec->set_param(0,(long)task_spawned); t_exec->set_param(1,(long)0); t_exec->set_param(2,(long)size); t_exec->set_param(3,(long)w->division_out_size);