Mercurial > hg > Members > Moririn
view src/parallel_execution/twice.c @ 247:ce262b2c1daf
Fix createTask for main
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 25 Jan 2017 04:14:50 +0900 |
parents | 123b0d277b84 |
children | 1ede5390cda2 |
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, enum Code next) { 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; //stack_pop(context->code_stack, &context->next); goto meta(context, next); } __code twice_stub(struct Context* context) { goto twice(context, NULL, 0, 0, NULL, 0); }