Results 1 to 2 of 2

Thread: CL_INVALID_ARG_INDEX causes

  1. #1

    CL_INVALID_ARG_INDEX causes

    Hi forum,

    I am allocating a memory buffer and getting error value -49 with the following command :

    Code :
          errNum |= clSetKernelArg(clKernel,1, sizeof(cl_mem),trgBuffer);

    While allocating the trgBuffer i am not getting any error and it means that the memory creation was successful.

    Any hint to track the reason of the error?


    Thanks
    Sajjad

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Posts
    112
    Maybe your kernel has only one argument (argument index start at zero).
    Furthermore, you must pass to clSetKernelArg() the address of the memory object, not the object itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •