gpuR icon indicating copy to clipboard operation
gpuR copied to clipboard

Better error message in custom_opencl when wrong type passed

Open cdeterman opened this issue 7 years ago • 0 comments

Currently, if a user compiles a custom OpenCL kernel with, for example, type = double and tries to pass a double type object such as vclVector(rnorm(4), type = "double"). The compiled function will spit out a misleading error message like the following:

ViennaCL: FATAL ERROR: CL_INVALID_ARG_SIZE.

Now, this is not a fault of ViennaCL but in fact it is because it is expecting a different size (i.e. double) when you are passing a float. This needs to have an internal check that provides a more meaningful error message.

cdeterman avatar Apr 20 '18 20:04 cdeterman