Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when kernel function calls another function #129

Closed
tamas-ferenci opened this issue May 8, 2018 · 1 comment
Closed

Error when kernel function calls another function #129

tamas-ferenci opened this issue May 8, 2018 · 1 comment
Assignees
Milestone

Comments

@tamas-ferenci
Copy link

Consider the following - very silly, but illustrative - example:

 float sqrplusone( float in )
 {
   return in*in+1;
 }

 __kernel void SAXPY(__global float* x, __global float* y, float a)
 {
   const int i = get_global_id(0);
   y [i] += a * sqrplusone(x[i]);
 }

This is the content of saxpy.cl; let's now try to compile it:

  cl_args <- setup_opencl(objects = c("vclVector", "vclVector", "scalar"),
  intents = c("IN", "OUT", "IN"),
  queues = list("SAXPY", "SAXPY", "SAXPY"),
  kernel_maps = c("x", "y", "a"))
  custom_opencl("saxpy.cl", cl_args, "float")

This gives the following error message:

Error in custom_opencl("saxpy.cl", cl_args, "float") : 
   Non OpenCL buffer kernel arguments don't match to initialized objects.
@cdeterman cdeterman self-assigned this May 15, 2018
@cdeterman cdeterman added this to the 2.1.0 milestone Jun 5, 2018
@cdeterman
Copy link
Owner

most recent commit resolves this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants