diff --git a/src/c/test.cu b/src/c/test.cu index a4d4086..c065c33 100644 --- a/src/c/test.cu +++ b/src/c/test.cu @@ -1,6 +1,5 @@ -#include -#include -#include "kernel.cu" +#include +#include #define CUDA_ERRCHK(fn) { __gpucheck((fn), __FILE__, __LINE__); } @@ -23,13 +22,13 @@ void mulAll_kernel(int *out, int *in, int n, size_t size) { extern "C" { void mulAll(int *out, const int *input, int n, size_t size) { - int *out_d, *in_d, i_d, size_d; + int *out_d, *in_d; CUDA_ERRCHK(cudaMalloc((void **) &in_d, sizeof(int) * size)); CUDA_ERRCHK(cudaMemcpy(in_d, input, sizeof(int) * size, cudaMemcpyHostToDevice)); CUDA_ERRCHK(cudaMalloc((void **) &out_d, sizeof(int) * size)); - mulAll_kernel << < 32, 32 >> > (out_d, in_d, n, size); + mulAll_kernel <<< 32, 32 >>> (out_d, in_d, n, size); CUDA_ERRCHK(cudaMemcpy(out, out_d, sizeof(int) * size, cudaMemcpyDeviceToHost)); CUDA_ERRCHK(cudaFree(in_d));