diff src/parallel_execution/context.h @ 374:fb50cf8aa615

Add Iterator Interface
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Tue, 18 Jul 2017 15:14:08 +0900
parents d6ce4273e7d1
children ad44fdb11433
line wrap: on
line diff
--- a/src/parallel_execution/context.h	Tue Jul 11 18:18:14 2017 +0900
+++ b/src/parallel_execution/context.h	Tue Jul 18 15:14:08 2017 +0900
@@ -96,11 +96,8 @@
     union Data **data;
 
     /* multi dimension parameter */
-    struct Context* contexts;
-    int dim;
-    int x;
-    int y;
-    int z;
+    int iterate;
+    struct Iterator* iterator;
 };
 
 union Data {
@@ -308,7 +305,18 @@
         enum Code kernel;
         enum Code kernel2;
         enum Code swap;
-    }SortArray;
+    } SortArray;
+    struct Iterator {
+        struct Iterator *iterator;
+        enum Code exec;
+        enum Code barrier;
+        enum Code whenWait;
+        enum Code next;
+    } Iterator;
+    struct OneDimIterator {
+        int x;
+        int count;
+    } OneDimIterator;
 }; // union Data end       this is necessary for context generator
 
 typedef union Data Data;