comparison src/parallel_execution/examples/twice/createArray.cbc @ 409:4d1e3697a6b8

Add twice cbc file
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Wed, 06 Sep 2017 22:01:27 +0900
parents
children 85b0ddbf458e
comparison
equal deleted inserted replaced
408:8ee89eefbc6d 409:4d1e3697a6b8
1 #include <stdio.h>
2
3 #include "../../../context.h"
4
5 extern int length;
6 extern int split;
7 extern int* array_ptr;
8
9 __code createArray(__code next(struct Array* output, ...)) {
10 struct Array* output = *O_output;
11 output->prefix = length/split;
12 output->array = array_ptr;
13 output->size = length;
14 *O_output = output;
15 goto meta(context, context->next);
16 }
17
18 __code createArray_stub(struct Context* context) {
19 Array** O_output = (struct Array **)&context->data[context->odg];
20 goto createArray(context,
21 context->next,
22 O_output);
23 }