diff src/parallel_execution/examples/twice/twice.cbc @ 406:9b35e6581b5c

Use task member of context by par goto meta Use task member of context for par goto meta ate_stub.pl
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Wed, 06 Sep 2017 15:11:27 +0900
parents 8915fce522b3
children 8ee89eefbc6d
line wrap: on
line diff
--- a/src/parallel_execution/examples/twice/twice.cbc	Tue Sep 05 16:46:31 2017 +0900
+++ b/src/parallel_execution/examples/twice/twice.cbc	Wed Sep 06 15:11:27 2017 +0900
@@ -2,7 +2,7 @@
 
 #include "../context.h"
 
-__code twice(struct Array* array, __code next(...), struct LoopCounter loopCounter) {
+__code twice(struct Array* array, struct Dim* dim, __code next(...), struct LoopCounter loopCounter) {
     int i = loopCounter->i;
     if (i < prefix) {
         array[i+index*prefix] = array[i+index*prefix]*2;
@@ -17,10 +17,7 @@
 
 __code twice_stub(struct Context* context) {
     struct LoopCounter* loopCounter = &context->data[context->dataNum]->LoopCounter;
-    struct Array* array = &context->data[context->dataNum+1]->Array;
     goto twice(context,
-               loopCounter,
-               array->index,
-               array->prefix,
-               array->array);
+               &context->data[context->idgCount]->Array,
+               loopCounter);
 }