# HG changeset patch # User Tatsuki IHA # Date 1499326802 -32400 # Node ID 59c694722ce66b4c6f7e3ddef43266aed90fb91a # Parent 62a88864e1e2c52d3f3dbb7cb4bfbd8c4e0ad35c Rename Code Gears diff -r 62a88864e1e2 -r 59c694722ce6 src/parallel_execution/examples/Add.cbc --- a/src/parallel_execution/examples/Add.cbc Thu Jun 29 22:21:19 2017 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -#include "../../context.h" -#include -__code add(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { - struct Integer* output = *O_output; - output->value = input1->value + input2->value; - printf("%d + %d = %d\n", input1->value, input2->value, output->value); - *O_output = output; - goto meta(context, next); -} - -__code add_stub(struct Context* context) { - Integer** O_output = (struct Integer **)&context->data[context->odg]; - goto add(context, - &context->data[context->idg]->Integer, - &context->data[context->idg + 1]->Integer, - context->next, - O_output); -} diff -r 62a88864e1e2 -r 59c694722ce6 src/parallel_execution/examples/Mult.cbc --- a/src/parallel_execution/examples/Mult.cbc Thu Jun 29 22:21:19 2017 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -#include "../../context.h" -#include -__code mult(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { - struct Integer* output = *O_output; - output->value = input1->value * input2->value; - printf("%d * %d = %d\n", input1->value, input2->value, output->value); - *O_output = output; - goto meta(context, next); -} - -__code mult_stub(struct Context* context) { - Integer** O_output = (struct Integer **)&context->data[context->odg]; - goto mult(context, - &context->data[context->idg]->Integer, - &context->data[context->idg + 1]->Integer, - context->next, - O_output); -} diff -r 62a88864e1e2 -r 59c694722ce6 src/parallel_execution/examples/add.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parallel_execution/examples/add.cbc Thu Jul 06 16:40:02 2017 +0900 @@ -0,0 +1,18 @@ +#include "../../context.h" +#include +__code add(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { + struct Integer* output = *O_output; + output->value = input1->value + input2->value; + printf("%d + %d = %d\n", input1->value, input2->value, output->value); + *O_output = output; + goto meta(context, next); +} + +__code add_stub(struct Context* context) { + Integer** O_output = (struct Integer **)&context->data[context->odg]; + goto add(context, + &context->data[context->idg]->Integer, + &context->data[context->idg + 1]->Integer, + context->next, + O_output); +} diff -r 62a88864e1e2 -r 59c694722ce6 src/parallel_execution/examples/mult.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parallel_execution/examples/mult.cbc Thu Jul 06 16:40:02 2017 +0900 @@ -0,0 +1,18 @@ +#include "../../context.h" +#include +__code mult(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...)) { + struct Integer* output = *O_output; + output->value = input1->value * input2->value; + printf("%d * %d = %d\n", input1->value, input2->value, output->value); + *O_output = output; + goto meta(context, next); +} + +__code mult_stub(struct Context* context) { + Integer** O_output = (struct Integer **)&context->data[context->odg]; + goto mult(context, + &context->data[context->idg]->Integer, + &context->data[context->idg + 1]->Integer, + context->next, + O_output); +}