DLL Compile error using a .cu file

I am having some problems compiling a DLL using 1.0 CUDA. The basic layout of the program is:

  1. Acquire Data

  2. Copy the data to the GPU

  3. Pre process the data on the GPU

  4. FFT the data

  5. Post process the data on the GPU

  6. Copy data off the GPU

To do this, I have set up a VS2005 project that contains a .cpp file and a .cu file. The .cpp file contains the call to the DLL, as well as calls to the pre and post process functions. The .cpp file is also responsible for copying memory to and from the video card and also calling the FFT function.

The .cu file has 2 different kinds of functions. Type 1 functions are used to call the Type 2 functions. The following is an example of a Type 1 function.

__global__ void PreProcess(float *ptrGPUDataSet)


    unsigned int num_threads = 32;

    unsigned int mem_size = sizeof( float) * num_threads;

    dim3  grid( 1, 1, 1);

    dim3  threads( num_threads, 1, 1);

    PreProcessGPU<<< grid, threads, mem_size >>>(ptrGPUDataSet);


The 2nd type of function is the PreProcessGPU<<<,x,y,z>>>(ptrGPUDataSet) function, which goes to the actual GPU code that performs the pre-process algorithm. The .cpp file only makes calls to Type 1 functions.

The .cu file has been set up to use the custom compile rules that are provided in the 1.0 SDK. The issue is with the compilation of the .cu file. When compiling the project, VS2005 is giving an error when trying to compile a Type 2 function call:

PreProcessGPU<<< grid, threads, mem_size >>>(ptrGPUDataSet);

The error given is:

error C2059: syntax error : ‘<’ c:\gpu_code\GPU_Kernel.cu

Has anyone else encountered this error? What can be done to solve the issue? More information can be given on request.

Thanks for the help,