Mercurial > hg > Gears > GearsAgda
comparison src/parallel_execution/MultiDimIterator.cbc @ 411:0eba9a04633f
Work CUDAtwice
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 14 Sep 2017 18:26:52 +0900 |
parents | 85b0ddbf458e |
children | 57132ef16009 |
comparison
equal
deleted
inserted
replaced
410:85b0ddbf458e | 411:0eba9a04633f |
---|---|
107 } | 107 } |
108 goto meta(context, C_execMultiDimIterator1); | 108 goto meta(context, C_execMultiDimIterator1); |
109 } | 109 } |
110 | 110 |
111 __code barrierMultiDimIterator(struct MultiDimIterator* iterator, struct Context* task, __code next(...), __code whenWait(...)) { | 111 __code barrierMultiDimIterator(struct MultiDimIterator* iterator, struct Context* task, __code next(...), __code whenWait(...)) { |
112 if (__sync_fetch_and_sub(&iterator->count, 1) == 1) { | 112 if (task->gpu || __sync_fetch_and_sub(&iterator->count, 1) == 1) { |
113 goto next(...); | 113 goto next(...); |
114 } | 114 } |
115 goto whenWait(...); | 115 goto whenWait(...); |
116 } | 116 } |
117 | 117 |