Results 1 to 2 of 2

Thread: kernel arguments restrction

  1. #1
    Newbie
    Join Date
    Jul 2017
    Posts
    1

    kernel arguments restrction

    Hi forum,

    In the manual it is mentioned that

    "Arguments to __kernel functions in a program cannot be declared with the built-in scalar types bool, half, size_t, ptrdiff_t, intptr_t, and uintptr_t". I need the pitch value to be passed to the kernel of type size_t.

    Is there any other way to get around this issue?

    Thanks

  2. #2
    Newbie
    Join Date
    Oct 2015
    Posts
    2
    Hi duonganh!
    You can send size_t inside in the some pointer to struct, or as pointer to size_t

    struct SomeData {
    // Other data
    ...
    size_t pitchValue;
    ...
    // Other data
    };

    __kernel OpenCLKernel(..., __global SomeData* data

    __kernel OpenCLKernel(..., __global size_t* pitchValue

    The reason of this restriction is that The OpenCL loves to get the big parts of the data, not single scalar data.

    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean