changeset 289:3d70e21a3902

Delete createData
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Mon, 06 Feb 2017 11:09:53 +0900
parents f1b0cc555b6e
children 198affea1be1
files src/parallel_execution/CPUWorker.cbc src/parallel_execution/main.cbc
diffstat 2 files changed, 2 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/CPUWorker.cbc	Mon Feb 06 04:04:25 2017 +0900
+++ b/src/parallel_execution/CPUWorker.cbc	Mon Feb 06 11:09:53 2017 +0900
@@ -38,8 +38,9 @@
     if (!task)
         return; // end thread
     task->worker = worker;
+    enum Code taskCg = task->next;
     task->next = C_odgCommit; // set CG after task exec
-    goto meta(task, task->next);
+    goto meta(task, taskCg);
 }
 
 __code getTask_stub(struct Context* context) {
--- a/src/parallel_execution/main.cbc	Mon Feb 06 04:04:25 2017 +0900
+++ b/src/parallel_execution/main.cbc	Mon Feb 06 11:09:53 2017 +0900
@@ -71,48 +71,6 @@
     goto meta(context, C_exit_code);
 }
 
-__code createData1(struct Allocate* allocate, struct LoopCounter* loopCounter) {
-    int i = loopCounter->i;
-
-    if ((length/split*i) < length) {
-        goto meta(context, C_createData2);
-    }
-
-    loopCounter->i = 0;
-    goto meta(context, C_code1);
-}
-
-__code createData1_stub(struct Context* context) {
-    goto createData1(context, Gearef(context, Allocate), Gearef(context, LoopCounter));
-}
-
-__code createData2(struct LoopCounter* loopCounter, struct Array* array, struct Node* node, Tree* tree) {
-    int i = loopCounter->i;
-
-    array->index = i;
-    array->prefix = length/split;
-    array->array = array_ptr;
-
-    node->key = i;
-    node->value = (union Data*)array;
-
-    tree->tree = (union Data*)loopCounter->tree;
-
-    tree->next = C_createTask1;
-    tree->node = node;
-
-    goto meta(context, loopCounter->tree->put);
-}
-
-__code createData2_stub(struct Context* context) {
-    Array* array = &ALLOCATE(context, Array)->Array;
-    goto createData2(context,
-            Gearef(context, LoopCounter),
-            array,
-            Gearef(context, Node),
-            Gearef(context, Tree));
-}
-
 __code createTask1(struct LoopCounter* loopCounter, struct TaskManager* taskManager) {
     int i = loopCounter->i;
 
@@ -126,12 +84,6 @@
     goto meta(context, taskManager->taskManager->TaskManager.shutdown);
 }
 
-__code createTask1_stub(struct Context* context) {
-    goto createTask1(context,
-            Gearef(context, LoopCounter),
-            Gearef(context, TaskManager));
-}
-
 __code createTask2(LoopCounter* loopCounter, TaskManager* taskManager,struct Context* task, LoopCounter* loopCounter2, Array* array) {
     int i = loopCounter->i;
     array->index = i;