# HG changeset patch # User Tatsuki IHA # Date 1486059957 -32400 # Node ID b5e8fce400a5dd4b1592122f8e56c98b12f01732 # Parent 23767f714f4aae90aa562a7b5d45f7d457cd62f2 Fix diff -r 23767f714f4a -r b5e8fce400a5 src/parallel_execution/RedBlackTree.cbc --- a/src/parallel_execution/RedBlackTree.cbc Thu Feb 02 20:27:56 2017 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Fri Feb 03 03:25:57 2017 +0900 @@ -2,7 +2,6 @@ #include "../context.h" #include "../origin_cs.h" -#include "../stack.h" extern enum Relational compare(struct Node* node1, struct Node* node2); @@ -11,7 +10,7 @@ struct RedBlackTree* redBlackTree = new RedBlackTree(); tree->tree = (union Data*)redBlackTree; redBlackTree->root = NULL; - redBlackTree->nodeStack = &createSingleLinkedStack(context)->Stack; + redBlackTree->nodeStack = createSingleLinkedStack(context); tree->put = C_putRedBlackTree; tree->get = C_getRedBlackTree; // tree->remove = C_removeRedBlackTree; diff -r 23767f714f4a -r b5e8fce400a5 src/parallel_execution/TaskManagerImpl.cbc --- a/src/parallel_execution/TaskManagerImpl.cbc Thu Feb 02 20:27:56 2017 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Fri Feb 03 03:25:57 2017 +0900 @@ -4,7 +4,7 @@ void createWorkers(struct Context* context, TaskManager* taskManeger, TaskManagerImpl* taskManagerImpl); -TaskManager** createTaskManager(struct Context* context, int numCPU, int numGPU, int numIO) { +TaskManager* createTaskManager(struct Context* context, int numCPU, int numGPU, int numIO) { struct TaskManager* taskManager = new TaskManager(); // 0...numIO-1 IOProcessor // numIO...numIO+numGPU-1 GPUProcessor diff -r 23767f714f4a -r b5e8fce400a5 src/parallel_execution/main.cbc --- a/src/parallel_execution/main.cbc Thu Feb 02 20:27:56 2017 +0900 +++ b/src/parallel_execution/main.cbc Fri Feb 03 03:25:57 2017 +0900 @@ -25,9 +25,9 @@ } __code initDataGears(struct LoopCounter* loopCounter, struct TaskManager* taskManager) { - loopCounter->tree = &createRedBlackTree(context)->Tree; + loopCounter->tree = createRedBlackTree(context); loopCounter->i = 0; - taskManager->taskManager = (union Data*)&createTaskManager(context, cpu_num, 0, 0)->TaskManager; + taskManager->taskManager = (union Data*)createTaskManager(context, cpu_num, 0, 0); goto meta(context, C_createTask1); }