[PyOpenCL] Passing a floatn table to a kernel

Bogdan Opanchuk mantihor at gmail.com
Tue Dec 14 00:04:18 PST 2010


Hello David,

On Tue, Dec 14, 2010 at 6:55 PM, David Libault <david.libault at gmail.com> wrote:
> After further checking, it does not look like a design decision, but a
> strict implementation of the standard ! See opencl1.1 page 163 :
>
> So Apple's implementation looks correct...

Well, this makes sense. Probably, in such environment, when coalescing
is very important, it is easier to align float3 at 16 bytes than
explain to programmers that they should use float4 even if they do not
need the fourth component.

> What implementation of opencl are you using on your 64-bit Linux, as
> it might have an alignment issue ? Could you please try the code
> proposed by Bogdan to check float3 size ?

If the alignment is defined in standard, it is possible that Linux
implementation just does not care much about buffer overflows (as long
as they fall in the unused memory, or stay inside the memory block of
the certain size, or something like that).

Best regards,
Bogdan



More information about the PyOpenCL mailing list