I got a runtime error of “Unsupported function signature” whenever the code calls functions that take no argument. The clBuildProgram doesn’t complain.
The following is an example:
float computePI()
{
return 3.141592654f;
}
__kernel void test_calc_kernel(__global void *heap, __global unsigned int *printbuf)
{
float pi;
pi = computePI();
printbuf[1] = 0;
}
The obvious workaround of adding a dummy parameter will work. And for now, I can get by having say a computePI macro call the function with the dummy parameter. But this looks like something that should be fixed.
I am on CUDA 2.3. Actually, I tried 3.0 Beta but I uninstalled both the SDK and drivers; if that makes any difference.