Mercurial > hg > Members > Moririn
view src/parallel_execution/twice.c @ 185:247a2c4a8908
fix compile errors
author | mir3636 |
---|---|
date | Thu, 15 Dec 2016 18:10:48 +0900 |
parents | dec50dd624c7 |
children | 39d87ba6039d |
line wrap: on
line source
#include <stdio.h> #include "context.h" #include "origin_cs.h" __code twice(struct Context* context, struct LoopCounter* loopCounter, int index, int prefix, int* array) { int i = loopCounter->i; if (i < prefix) { array[i+index*prefix] = array[i+index*prefix]*2; loopCounter->i++; goto meta(context, Twice); } loopCounter->i = 0; //stack_pop(context->code_stack, &context->next); goto meta(context, context->next); } __code twice_stub(struct Context* context) { goto twice(context, &context->data[D_LoopCounter]->loopCounter, context->data[D_Node]->node.value->array.index, context->data[D_Node]->node.value->array.prefix, context->data[D_Node]->node.value->array.array); }