Mercurial > hg > GearsTemplate
changeset 279:b5e8fce400a5
Fix
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 03 Feb 2017 03:25:57 +0900 |
parents | 23767f714f4a |
children | 2c2e4e597eb0 |
files | src/parallel_execution/RedBlackTree.cbc src/parallel_execution/TaskManagerImpl.cbc src/parallel_execution/main.cbc |
diffstat | 3 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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
--- 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); }