This project is read-only.

Error with Generic Kernel

Jul 30, 2014 at 4:56 PM

I want to implement a generic kernel with the following signature to perform transpose with any simple data type such as int, short, float, double.

static void Transpose<T>(GThread thread, T[] odata, T[] idata) where T : struct

The kernel is invoked from another function as
_gpu.Launch(blocks, threads).Transpose<float>(odata,idata)

where odata and idata are float[]

I run cudafycl as post build event to include the cudafy module into the dll that is compiled and get the following error

EXEC : error : Cudafy.CudafyLanguageException: Type parameter declarations are not supported.

Is there a way around this or can a generic kernel be supported in future versions?


Jul 30, 2014 at 8:49 PM
This is not supported and there are no plans to add such functionality.