annotate example/Cuda/multiply.cu @ 1923:e801016bd47c draft

fix
author kkb
date Wed, 29 Jan 2014 20:32:24 +0900
parents bbd209709ca1
children 67e50779feb4
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" {
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
2 __global__ void multiply(float* A, float* B, float* C) {
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;
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
4 C[index] = A[index] * B[index];
d6e033734c12 running cuda sample
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 1918
diff changeset
5 }
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 }