Mercurial > hg > Members > Moririn
changeset 423:71dbdb27cb51
merge
author | mir3636 |
---|---|
date | Fri, 06 Oct 2017 15:42:21 +0900 |
parents | d839c9cb7c83 (current diff) 08fc3e5c8b81 (diff) |
children | 3c6af75b13d4 |
files | src/parallel_execution/CMakeLists.txt |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/CMakeLists.txt Fri Oct 06 15:41:13 2017 +0900 +++ b/src/parallel_execution/CMakeLists.txt Fri Oct 06 15:42:21 2017 +0900 @@ -85,7 +85,7 @@ SOURCES examples/twice/main.cbc examples/twice/twice.cbc examples/twice/CUDAtwice.cu examples/twice/createArray.cbc CPUWorker.cbc TimeImpl.cbc examples/twice/twice.cbc TaskManagerImpl.cbc SingleLinkedQueue.cbc SynchronizedQueue.cbc CUDAWorker.cbc cuda.c MultiDimIterator.cbc ) - set_target_properties(CUDAtwice PROPERTIES COMPILE_FLAGS "-Wall -g -DUSE_CUDAWorker=1") + set_target_properties(CUDAtwice PROPERTIES COMPILE_FLAGS "-Wall -g -DUSE_CUDAWorker=1") # -DUSE_CUDA_MAIN_THREAD GearsCommand( TARGET
--- a/src/parallel_execution/examples/bitonicSort/CUDAbitonicSwap.cu Fri Oct 06 15:41:13 2017 +0900 +++ b/src/parallel_execution/examples/bitonicSort/CUDAbitonicSwap.cu Fri Oct 06 15:42:21 2017 +0900 @@ -9,7 +9,7 @@ int i = 0; C_bitonicSwap: if (i < prefix) { - int index = i + blockIdx.x * prefix; + int index = i + (blockIdx.x * blockDim.x + threadIdx.x) * prefix; int position = index/block; int index1 = index+block*position; int index2 = (first == 1)? ((block<<1)*(position+1))-(index1%block)-1 : index1+block;
--- a/src/parallel_execution/examples/twice/CUDAtwice.cu Fri Oct 06 15:41:13 2017 +0900 +++ b/src/parallel_execution/examples/twice/CUDAtwice.cu Fri Oct 06 15:42:21 2017 +0900 @@ -4,7 +4,7 @@ int prefix = *prefixPtr; C_twice: if (i < prefix) { - array[i+blockIdx.x*prefix] = array[i+blockIdx.x*prefix]*2; + array[i+(blockIdx.x*blockDim.x+threadIdx.x)*prefix] = array[i+(blockIdx.x*blockDim.x+threadIdx.x)*prefix]*2; i++; goto C_twice; }