Results 1 to 6 of 6

Thread: Kernel argument size

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    7

    Kernel argument size

    my device return 1024 on CL_DEVICE_MAX_PARAMETER_SIZE

    it means i can't pass more than a 1KB to the kernel, correct ?!
    if it's correct, what is the point of 1GB memory in device ?

  2. #2
    Junior Member
    Join Date
    Aug 2012
    Posts
    15

    Re: Kernel argument size

    Fitsr thatk,s i didnt know that since i use parameter with 8 byte max.
    Omgf!
    Kernel parameter can be a pointer to 4 Gib size for 32x Systems and i dont know what big for 64x
    systems. If you dont understand the difference to what you are trying to make, leanr C first.

  3. #3

    Re: Kernel argument size

    CL_DEVICE_MAX_PARAMETER_SIZE determines the maximum number of bytes that can be occupied by parameters passed to a kernel.

    On a 32-bit system, this means that passing a pointer uses 4 bytes of the available 1024. Passing a cl_int will also use 4 bytes. So, theoretically, you can pass up to 256 pointers to your kernel.

    This property is not a limit on the size of a buffer pointed to by a pointer, just a limit on how many parameters can be passed to a kernel.

  4. #4
    Junior Member
    Join Date
    Aug 2012
    Posts
    7

    Re: Kernel argument size

    Quote Originally Posted by chippies
    CL_DEVICE_MAX_PARAMETER_SIZE determines the maximum number of bytes that can be occupied by parameters passed to a kernel.

    On a 32-bit system, this means that passing a pointer uses 4 bytes of the available 1024. Passing a cl_int will also use 4 bytes. So, theoretically, you can pass up to 256 pointers to your kernel.

    This property is not a limit on the size of a buffer pointed to by a pointer, just a limit on how many parameters can be passed to a kernel.

    hit the spot, that was i want, thanks.

  5. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    15

    Re: Kernel argument size

    By te way, if i do use the kernel parameters to have a full input array :P does it give adwantages compare to if i d give that to a pointer? Adwantages like faster transfering or something?

  6. #6
    Junior Member
    Join Date
    Aug 2012
    Posts
    7

    Re: Kernel argument size

    Quote Originally Posted by o4kareg2
    By te way, if i do use the kernel parameters to have a full input array :P does it give adwantages compare to if i d give that to a pointer? Adwantages like faster transfering or something?
    pointer is efficient always.

Similar Threads

  1. Replies: 7
    Last Post: 02-09-2011, 05:59 PM
  2. Replies: 3
    Last Post: 01-28-2010, 12:48 PM

Posting Permissions

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