Mercurial > hg > Game > Cerium
diff example/Cuda/multiply.cu @ 1919:d6e033734c12 draft
running cuda sample
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 28 Jan 2014 18:33:19 +0900 |
parents | 15e8c50ed570 |
children | bbd209709ca1 |
line wrap: on
line diff
--- a/example/Cuda/multiply.cu Fri Jan 24 07:16:26 2014 +0900 +++ b/example/Cuda/multiply.cu Tue Jan 28 18:33:19 2014 +0900 @@ -1,5 +1,6 @@ -__global__ void multiply(int* A, int* B, int* C) { - int index = blockIdx.x * blockDim.x + threadIdx.x; - - C[index] = A[index] * B[index]; +extern "C" { + __global__ void multiply(float* A, float* B, float* C) { + int index = blockIdx.x * blockDim.x + threadIdx.x; + C[index] = A[index] * B[index]; + } }