annotate example/Cuda/multiply.cu @ 1954:30b95f372a0d draft

fix read_size
author masa
date Thu, 06 Feb 2014 20:08:08 +0900
parents 67e50779feb4
children a68dbdf9b429
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
1 extern "C" {
1935
67e50779feb4 CudaScheduler is runnig.
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1923
diff changeset
2 __global__ void multiply(/*float* A, float* B, float* C*/) {
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
3 int index = blockIdx.x * blockDim.x + threadIdx.x;
1935
67e50779feb4 CudaScheduler is runnig.
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1923
diff changeset
4 //C[index] = A[index] * B[index];
67e50779feb4 CudaScheduler is runnig.
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1923
diff changeset
5 printf("%d\n",index);
1919
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
6 }
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 }