Mercurial > hg > Members > Moririn
view src/parallel_execution/twice.cbc @ 280:2c2e4e597eb0
generate no compile errors
author | mir3636 |
---|---|
date | Fri, 03 Feb 2017 17:47:27 +0900 |
parents | 23767f714f4a |
children | a3448b0f0a56 |
line wrap: on
line source
#include <stdio.h> #include "../context.h" __code twice(struct LoopCounter* loopCounter, int index, int prefix, int* array, struct Context* workerContext) { 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(workerContext, workerContext->next); } __code twice_stub(struct Context* context) { struct Context* workerContext = context->worker->worker->CPUWorker.context; goto twice(context, Gearef(context, LoopCounter), 0, 0, NULL, workerContext); }