Mercurial > hg > GearsTemplate
diff src/parallel_execution/test/oneDimIterator_test.cbc @ 401:408b4aab7610
Supported par goto iterate statement for perl script
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 29 Aug 2017 21:50:57 +0900 |
parents | 2744cb933ebc |
children |
line wrap: on
line diff
--- a/src/parallel_execution/test/oneDimIterator_test.cbc Tue Aug 29 04:29:50 2017 +0900 +++ b/src/parallel_execution/test/oneDimIterator_test.cbc Tue Aug 29 21:50:57 2017 +0900 @@ -82,25 +82,9 @@ goto meta(context, taskManager->taskManager->TaskManager.shutdown); } -__code createTask2(struct LoopCounter* loopCounter, struct TaskManager* taskManager) { - struct Context** tasks = (struct Context**)ALLOC_ARRAY(context, Context, 1); - - // par goto printIterator(iterate(10)) - struct Context* task = NEW(struct Context); - initContext(task); - task->iterate = 0; - task->iterator = createOneDimIterator(context, 10); - task->idgCount = 0; - task->next = C_printIterator; - task->idg = task->dataNum; - task->maxIdg = task->idg; - task->odg = task->maxIdg; - task->maxOdg = task->odg; - - tasks[0] = task; - taskManager->contexts = tasks; - taskManager->next1 = C_createTask1; - goto meta(context, taskManager->taskManager->TaskManager.spawnTasks); +__code createTask2(struct TaskManager* taskManager) { + par goto printIterator(iterate(10), exit); + goto createTask1(); } void init(int argc, char** argv) { @@ -123,14 +107,3 @@ main_context->next = C_initDataGears; goto start_code(main_context); } - -__code printIterator(struct Integer* x, __code next(...)) { - printf("%d\n", x->value); - goto meta(context, next); -} - -__code printIterator_stub(struct Context* context) { - goto printIterator(context, - &context->data[context->idg]->Integer, - context->next); -}