Mercurial > hg > Gears > GearsAgda
comparison src/parallel_execution/main.c @ 144:d529c024e5a5
name fixes
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 10 Nov 2016 07:33:10 +0900 |
parents | 7c309e1aea73 |
children | 473b7d990a1f |
comparison
equal
deleted
inserted
replaced
143:34a7a21edc36 | 144:d529c024e5a5 |
---|---|
54 | 54 |
55 if (i < length) { | 55 if (i < length) { |
56 //printf("%d\n", array->array[i]); | 56 //printf("%d\n", array->array[i]); |
57 if (array->array[i] == (i*2)) { | 57 if (array->array[i] == (i*2)) { |
58 loopCounter->i++; | 58 loopCounter->i++; |
59 goto meta(context, Code2); | 59 goto meta(context, C_code2); |
60 } else | 60 } else |
61 puts("wrong result"); | 61 puts("wrong result"); |
62 | 62 |
63 } | 63 } |
64 | 64 |
78 | 78 |
79 goto meta(context, CreateData2); | 79 goto meta(context, CreateData2); |
80 } | 80 } |
81 | 81 |
82 loopCounter->i = 0; | 82 loopCounter->i = 0; |
83 goto meta(context, Code1); | 83 goto meta(context, C_code1); |
84 } | 84 } |
85 | 85 |
86 __code createData1_stub(struct Context* context) { | 86 __code createData1_stub(struct Context* context) { |
87 goto createData1(context, &context->data[Allocate]->allocate, &context->data[LoopCounter]->loopCounter); | 87 goto createData1(context, &context->data[Allocate]->allocate, &context->data[LoopCounter]->loopCounter); |
88 } | 88 } |
97 node->key = i; | 97 node->key = i; |
98 node->value = (union Data*)array; | 98 node->value = (union Data*)array; |
99 | 99 |
100 context->next = CreateTask1; | 100 context->next = CreateTask1; |
101 | 101 |
102 goto meta(context, PutTree); | 102 goto meta(context, C_put); |
103 } | 103 } |
104 | 104 |
105 __code createData2_stub(struct Context* context) { | 105 __code createData2_stub(struct Context* context) { |
106 goto createData2(context, | 106 goto createData2(context, |
107 &context->data[LoopCounter]->loopCounter, | 107 &context->data[LoopCounter]->loopCounter, |
319 } | 319 } |
320 | 320 |
321 loopCounter->i = 0; | 321 loopCounter->i = 0; |
322 | 322 |
323 struct Time *t = &context->data[Time]->time; | 323 struct Time *t = &context->data[Time]->time; |
324 t->next = Code2; | 324 t->next = C_code2; |
325 goto meta(context, EndTime); | 325 goto meta(context, EndTime); |
326 } | 326 } |
327 | 327 |
328 __code taskManager_stub(struct Context* context) { | 328 __code taskManager_stub(struct Context* context) { |
329 goto taskManager(context, &context->data[LoopCounter]->loopCounter, &context->data[Worker]->worker); | 329 goto taskManager(context, &context->data[LoopCounter]->loopCounter, &context->data[Worker]->worker); |