Mercurial > hg > Gears > GearsAgda
view src/parallel_execution/twice.c @ 92:851da1107223
implement twice
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 08:50:30 +0900 |
parents | src/parallel_execution/swap.c@9e139a340bd1 |
children | 3e28ee215c0e |
line wrap: on
line source
#include <stdio.h> #include "context.h" #include "origin_cs.h" __code twice(struct Context* context, int index, int* array) { printf("No.%d %p\n", context->thread_num, context->thread); array[index] = array[index]*2; stack_pop(context->code_stack, &context->next); goto meta(context, context->next); } __code twice_stub(struct Context* context) { goto twice(context, context->data[Node]->node.value->array.index, context->data[Node]->node.value->array.array); }