"Shared memory size must be constant at compile time" exception on CudafyTranslator

Dec 18, 2013 at 8:13 AM
Hi,

I am quite new to Cudafy and getting some problems to start with my first code.

I install Cudafy on a win7 x64 with a Nvidia Quadro 2000, and run Cuda Test without problems.

I started my .Net solution on VS2010 with the following code:
 CudafyModule km = CudafyTranslator.Cudafy();
        GPGPU gpu = CudafyHost.GetDevice(CudafyModes.Target);
        gpu.LoadModule(km);
I got the exception "Shared memory size must be constant at compile time" on the first line of code.

Can anyone help me with this issue? Thanks,
Coordinator
Dec 19, 2013 at 9:09 AM
In your kernel (the method marked with [Cudafy] attribute), you must have set the argument to AllocateShared as a non-constant.