Mercurial > hg > Members > Moririn
view src/parallel_execution/examples/twice/CUDAtwice.cu @ 414:49159fbdd1fb
Work CUDAbitonicSort
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 15 Sep 2017 22:49:45 +0900 |
parents | 0eba9a04633f |
children | 764c92c3b181 |
line wrap: on
line source
extern "C" { __global__ void twice(int* array, int* prefixPtr) { int i = 0; int prefix = *prefixPtr; C_twice: if (i < prefix) { array[i+blockIdx.x*prefix] = array[i+blockIdx.x*prefix]*2; i++; goto C_twice; } } }