I’m trying to run a simple CUDA program from visual studio 2008:
File “CUDAFFT.h”:
global void zwap(double u_mat,int x_s, int y_s)
{
const int y = blockDim.y * blockIdx.y + threadIdx.y;
const int x = blockDim.x * blockIdx.x + threadIdx.x;
u_mat[(xy_s+y)2]=u_mat[(xy_s+y)*2]+10;
}
extern “C” void runZwap(double *u_mat, int x_s, int y_s)
{
dim3 numBlocks=(32,32);
dim3 threadsPerBlock=(32,32);
zwap<<<numBlocks,threadsPerBlock>>>(u_mat,x_s,y_s);
}
When I’m calling “runZwap” and sending parameters from “CUDAFFT.cpp” I’m getting junk in the function.
I took the function and put it in CUDA example: convolutionFFT2D
and it works fine there so I think that it might be some issue with linking maybe project setting or something?