Mercurial > hg > Papers > 2021 > soto-prosym
annotate Paper/src/twice.c @ 0:c59202657321
init
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 02 Nov 2021 06:55:58 +0900 |
parents | |
children |
rev | line source |
---|---|
0 | 1 // Twice |
2 __code twice(struct Context* context, struct LoopCounter* loopCounter, int index, int alignment, int* array) { | |
3 int i = loopCounter->i; | |
4 | |
5 if (i < alignment) { | |
6 array[i+index*alignment] = array[i+index*alignment]*2; | |
7 loopCounter->i++; | |
8 | |
9 goto meta(context, Twice); | |
10 } | |
11 | |
12 loopCounter->i = 0; | |
13 | |
14 stack_pop(context->code_stack, &context->next); | |
15 goto meta(context, context->next); | |
16 } |