Mercurial > hg > Members > Moririn
diff src/parallel_execution/examples/calc/calc.cbc @ 407:00d9b0664bdb
Fix
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 06 Sep 2017 20:40:43 +0900 |
parents | fc4fcd441700 |
children | 57132ef16009 |
line wrap: on
line diff
--- a/src/parallel_execution/examples/calc/calc.cbc Wed Sep 06 15:11:27 2017 +0900 +++ b/src/parallel_execution/examples/calc/calc.cbc Wed Sep 06 20:40:43 2017 +0900 @@ -12,21 +12,6 @@ int CPU_ANY = -1; int CPU_CUDA = -1; -void print_queue(struct Element* element) { - while (element) { - printf("%p\n", ((struct Task *)(element->data))); - element = element->next; - } -} - -void print_tree(struct Node* node) { - if (node != 0) { - printf("%d\n", node->value->Array.index); - print_tree(node->left); - print_tree(node->right); - } -} - void *start_taskManager(struct Context *context) { goto initDataGears(context, Gearef(context, LoopCounter), Gearef(context, TaskManager)); return 0; @@ -47,7 +32,7 @@ while(! cuda_initialized) {}; #endif #endif - goto meta(context, C_createTask1); + goto meta(context, C_code1); } __code initDataGears_stub(struct Context* context) { @@ -81,7 +66,7 @@ /* puts("result"); */ //time->next = C_code2; - goto meta(context, C_exit_code); + goto meta(context, C_createTask1); //goto meta(context, C_start_time); } @@ -99,9 +84,8 @@ } loopCounter->i = 0; - taskManager->next = C_code1; - sleep(5); - goto meta(context, taskManager->taskManager->TaskManager.shutdown); + taskManager->next = C_exit_code; + goto taskManager->shutdown(exit_code); } __code createTask2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) {