Mercurial > hg > Members > Moririn
view src/test/multiply.cu @ 301:609bf62768b9
add -DUSE_CUDA=1 flag to cmake
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Feb 2017 12:35:11 +0900 |
parents | 625a19d81ed7 |
children |
line wrap: on
line source
extern "C" { __global__ void multiply(float* A, float* B, float* C) { // printf("%d %d\n",i[0],i[1]); int index = blockIdx.x * blockDim.x + threadIdx.x; C[index] = A[index] * B[0]; } }