PDA

View Full Version : Kernel argument size



perlish
09-02-2012, 08:09 AM
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 ?

o4kareg2
09-02-2012, 10:23 AM
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.

chippies
09-02-2012, 10:41 AM
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.

perlish
09-02-2012, 10:47 AM
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.

o4kareg2
09-02-2012, 11:09 AM
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?

perlish
09-03-2012, 05:55 AM
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.