annotate src/test/multiply.cu @ 382:f1d111e293c4

Enable Timer for bitonicSort
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Mon, 24 Jul 2017 20:05:08 +0900
parents 609bf62768b9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
290
625a19d81ed7 add Cmake
ikkun
parents:
diff changeset
1 extern "C" {
301
609bf62768b9 add -DUSE_CUDA=1 flag to cmake
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 290
diff changeset
2 __global__ void multiply(float* A, float* B, float* C) {
290
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 }