Mercurial > hg > Members > Moririn
annotate src/parallel_execution/examples/twice/CUDAtwice.cu @ 410:85b0ddbf458e
Fix CudaWorker
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 14 Sep 2017 02:35:20 +0900 |
parents | b81492c74d2b |
children | 0eba9a04633f |
rev | line source |
---|---|
290 | 1 extern "C" { |
309 | 2 |
308 | 3 #include <stdio.h> |
410
85b0ddbf458e
Fix CudaWorker
Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
parents:
381
diff
changeset
|
4 __global__ void twice(int* array) { |
85b0ddbf458e
Fix CudaWorker
Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
parents:
381
diff
changeset
|
5 printf("array %p",array); |
85b0ddbf458e
Fix CudaWorker
Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
parents:
381
diff
changeset
|
6 array[blockIdx.x] = array[blockIdx.x]*2; |
290 | 7 } |
8 } |