comparison src/parallel_execution/dependency.c @ 116:69fbd905d750

Modify Create_Data
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Tue, 12 Jul 2016 16:26:05 +0900
parents 135472238fb7
children c9ab10847fc3
comparison
equal deleted inserted replaced
115:135472238fb7 116:69fbd905d750
57 &context->data[Element]->element, 57 &context->data[Element]->element,
58 &context->data[ActiveQueue]->queue, 58 &context->data[ActiveQueue]->queue,
59 &context->data[WaitQueue]->queue); 59 &context->data[WaitQueue]->queue);
60 } 60 }
61 61
62 __code taskA(struct Context* context) { 62 __code taskA(struct Context* context, struct Integer* input1, struct Integer* input2) {
63 printf("TaskA\n"); 63 allocator(context);
64 goto meta(context, calcPlus);
65 }
66
67 __code add(struct Context* context, struct Integer* input1, struct Integer* input2, struct Integer* output) {
68 output->value = input1->value + input2->value;
69 }
70
71 __code taskB(struct Context* context) {
72 allocator(context);
64 goto meta(context, context->next); 73 goto meta(context, context->next);
65 } 74 }
66 75
67 __code taskB(struct Context* context) { 76 __code mult(struct Context* context, struct Integer* input1, struct Integer* input2, struct Integer* output) {
68 printf("TaskB\n"); 77 output->value = input1->value * input2->value;
69 goto meta(context, context->next);
70 } 78 }
71
72 __code taskC(struct Context* context) {
73 printf("TaskC\n");
74 goto meta(context, context->next);
75 }