diff src/parallel_execution/context.h @ 398:fc4fcd441700

Fix spanwTasks
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Tue, 29 Aug 2017 01:01:44 +0900
parents c43ec0e3fa84
children e958a409943c
line wrap: on
line diff
--- a/src/parallel_execution/context.h	Thu Aug 24 17:23:41 2017 +0900
+++ b/src/parallel_execution/context.h	Tue Aug 29 01:01:44 2017 +0900
@@ -88,7 +88,7 @@
     int odg;
     int maxOdg;
     int workerId;
-    struct Context** contexts;
+    struct Queue* tasks;
 #ifdef USE_CUDAWorker
     int num_exec;
     CUmodule module;
@@ -126,13 +126,13 @@
 #endif
         union Data* taskManager;
         enum Code spawn;      // start NEW context on the worker
-        enum Code spawnTasks; // start NEW contexts on the worker
+        enum Code spawnTasks; // start NEW tasks on the worker
         enum Code shutdown;
         enum Code next;
         enum Code next1;
         enum Code task;
         struct Context* context;
-        struct Context** tasks;
+        struct Queue* tasks;
         union Data* data;
         int worker;
         int cpu;
@@ -333,6 +333,7 @@
 extern __code start_code(struct Context* context);
 extern __code exit_code(struct Context* context);
 extern __code meta(struct Context* context, enum Code next);
+extern __code par_meta(struct Context* context, enum Code spawns, enum Code next);
 extern void initContext(struct Context* context);
 
 #endif