# HG changeset patch # User Tatsuki IHA # Date 1486346993 -32400 # Node ID 3d70e21a3902031c2fc62434b3c3c11aa1a5d6cb # Parent f1b0cc555b6e16a23344c0a9f6835038c996538c Delete createData diff -r f1b0cc555b6e -r 3d70e21a3902 src/parallel_execution/CPUWorker.cbc --- 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) { diff -r f1b0cc555b6e -r 3d70e21a3902 src/parallel_execution/main.cbc --- 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;