[PyOpenCL] Passing a floatn table to a kernel
lists at informa.tiker.net
Sun Dec 26 06:03:09 PST 2010
On Tue, 14 Dec 2010 08:55:51 +0100, 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 :
> "6.1.5 Alignment of Types
> For 3-component vector data types, the size of the data type is 4 *
> sizeof(component). This means that a 3-component vector data type will
> be aligned to a 4 * sizeof(component) boundary. The vload3 and vstore3
> built-in functions can be used to read and write, respectively,
> 3-component vector data types from an array of packed scalar data
> So Apple's implementation looks correct...
> 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 ?
I think it might've been pure luck that things worked without crashing
for me. I can say right now that AMD CPU CL 2.2 and 2.3 (both implement CL 1.1)
conforms to the above, i.e. sizeof(float3) == 16. The CUDA 3.2 CL
implementation doesn't implement CL 1.1, so I can't check right now, but
I suspect their CL 1.1 conformance candidate is fine, too.
In other words, nothing to see.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the PyOpenCL