annotate example/Cuda/multiply.cu @ 1918:15e8c50ed570 draft

add cuda sample, not running
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 24 Jan 2014 07:16:26 +0900
parents
children d6e033734c12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1918
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 __global__ void multiply(int* A, int* B, int* C) {
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 int index = blockIdx.x * blockDim.x + threadIdx.x;
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 C[index] = A[index] * B[index];
15e8c50ed570 add cuda sample, not running
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 }