Mercurial > hg > GearsTemplate
view src/parallel_execution/examples/twice/twice.cbc @ 405:8915fce522b3
Fix shutdown TaskManager
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 05 Sep 2017 16:46:31 +0900 |
parents | src/parallel_execution/twice.cbc@f1b0cc555b6e |
children | 9b35e6581b5c |
line wrap: on
line source
#include <stdio.h> #include "../context.h" __code twice(struct Array* array, __code next(...), struct LoopCounter loopCounter) { int i = loopCounter->i; if (i < prefix) { array[i+index*prefix] = array[i+index*prefix]*2; loopCounter->i++; goto meta(context, C_twice); } loopCounter->i = 0; goto meta(context, context->next); } __code twice_stub(struct Context* context) { struct LoopCounter* loopCounter = &context->data[context->dataNum]->LoopCounter; struct Array* array = &context->data[context->dataNum+1]->Array; goto twice(context, loopCounter, array->index, array->prefix, array->array); }