Mercurial > hg > GearsTemplate
changeset 530:1566caacdaae
Fix bitonicSort
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 27 Jan 2018 23:05:27 +0900 |
parents | e5e3025f503a |
children | c31912aaa378 |
files | src/parallel_execution/examples/bitonicSort/makeArray.cbc src/parallel_execution/examples/bitonicSort/printArray.cbc src/parallel_execution/examples/twice/createArray.cbc |
diffstat | 3 files changed, 2 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/bitonicSort/makeArray.cbc Sat Jan 27 22:59:38 2018 +0900 +++ b/src/parallel_execution/examples/bitonicSort/makeArray.cbc Sat Jan 27 23:05:27 2018 +0900 @@ -11,19 +11,10 @@ if (output->loopCounter == GET_LEN(output->array)){ printf("created Array\n"); output->loopCounter = 0; - goto output1->start(next(...)); + goto output1->start(next(output1, ...)); } output->array[output->loopCounter].value = rand() % 1000; //printf("%d\n", output->array[output->loopCounter]->value); output->loopCounter++; goto makeArray(); } - -__code makeArray_stub(struct Context* context) { - SortArray** O_output = (struct SortArray**)&context->data[context->odg]; - Timer** O_output1 = (struct Timer**)&context->data[context->odg+1]; - goto makeArray(context, - context->next, - O_output, - O_output1); -}
--- a/src/parallel_execution/examples/bitonicSort/printArray.cbc Sat Jan 27 22:59:38 2018 +0900 +++ b/src/parallel_execution/examples/bitonicSort/printArray.cbc Sat Jan 27 23:05:27 2018 +0900 @@ -16,7 +16,7 @@ } if (inputArray->array[inputArray->loopCounter-1].value > inputArray->array[inputArray->loopCounter].value) { printf("wrong result\n"); - goto meta(context, next); + goto next(...); } goto printArray1(); }
--- a/src/parallel_execution/examples/twice/createArray.cbc Sat Jan 27 22:59:38 2018 +0900 +++ b/src/parallel_execution/examples/twice/createArray.cbc Sat Jan 27 23:05:27 2018 +0900 @@ -14,8 +14,6 @@ if (i == GET_LEN(output->array)){ printf("created Array\n"); loopCounter->i = 0; - *O_output = output; - *O_output1 = output1; goto output1->start(next(output, output1, ...)); } output->array[i] = i;