Mercurial > hg > Members > Moririn
diff 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 |
line wrap: on
line diff
--- a/src/parallel_execution/MultiDimIterator.cbc Thu Sep 14 02:35:20 2017 +0900 +++ b/src/parallel_execution/MultiDimIterator.cbc Thu Sep 14 18:26:52 2017 +0900 @@ -109,7 +109,7 @@ } __code barrierMultiDimIterator(struct MultiDimIterator* iterator, struct Context* task, __code next(...), __code whenWait(...)) { - if (__sync_fetch_and_sub(&iterator->count, 1) == 1) { + if (task->gpu || __sync_fetch_and_sub(&iterator->count, 1) == 1) { goto next(...); } goto whenWait(...);