annotate src/test/multiply.cu @ 290:625a19d81ed7

add Cmake
author ikkun
date Wed, 08 Feb 2017 18:25:32 +0900
parents
children 609bf62768b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
290
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
1 extern "C" {
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
2 __global__ void multiply(float* A, float* B, float* C,int* i) {
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
3 // printf("%d %d\n",i[0],i[1]);
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
4 int index = blockIdx.x * blockDim.x + threadIdx.x;
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
5 C[index] = A[index] * B[0];
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
6 }
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
7
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
8 }