Mercurial > hg > Game > Cerium
changeset 1951:da22fc4db5b2 draft
fix
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 06 Feb 2014 18:14:49 +0900 |
parents | f3e9f811c387 |
children | 7459db74ec3e |
files | TaskManager/Cuda/CudaScheduler.cc example/multiply/cuda/multiply.cu |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cuda/CudaScheduler.cc Thu Feb 06 16:30:41 2014 +0900 +++ b/TaskManager/Cuda/CudaScheduler.cc Thu Feb 06 18:14:49 2014 +0900 @@ -252,7 +252,7 @@ } } else { kernelParams = (void**)malloc(sizeof(void*)*cudabuffer[cur].in_size); - for (int i = 0; i<cudabuffer[cur].in_size-1; i++) { + for (int i = 0; i<cudabuffer[cur].in_size; i++) { kernelParams[i] = &cudabuffer[cur].memin[i]; } }
--- a/example/multiply/cuda/multiply.cu Thu Feb 06 16:30:41 2014 +0900 +++ b/example/multiply/cuda/multiply.cu Thu Feb 06 18:14:49 2014 +0900 @@ -1,6 +1,6 @@ extern "C" { __global__ void multi(long* params, float* A, float* B, float* C) { - //int id = blockIdx.x * blockDim.x + threadIdx.x; + int id = blockIdx.x * blockDim.x + threadIdx.x; long length = params[0]; for (int id = 0; id < length; id++) C[id]=A[id]*B[id];