Mercurial > hg > Game > Cerium
comparison example/Cuda/multiply.cu @ 1969:a68dbdf9b429 draft
fix GpuScheduler
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Feb 2014 13:43:25 +0900 |
parents | 67e50779feb4 |
children | 126b28fdae50 |
comparison
equal
deleted
inserted
replaced
1966:d45b7223515b | 1969:a68dbdf9b429 |
---|---|
1 extern "C" { | 1 extern "C" { |
2 __global__ void multiply(/*float* A, float* B, float* C*/) { | 2 __global__ void multiply(float* A, float* B, float* C) { |
3 int index = blockIdx.x * blockDim.x + threadIdx.x; | 3 int index = blockIdx.x * blockDim.x + threadIdx.x; |
4 //C[index] = A[index] * B[index]; | 4 C[index] = A[index] * B[0]; |
5 printf("%d\n",index); | |
6 } | 5 } |
7 } | 6 } |