changeset 2060:b70758c358dc draft

fix variable
author masa
date Sun, 31 Jan 2016 15:59:57 +0900
parents f3e748c0e7ea
children 6d522d3ba435
files TaskManager/ManyCore/FileMapReduce.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);