The spec doesn't seem to be clear on this, so I thought I would ask here:

I have created a context using clCreateContextFromType and CL_DEVICE_TYPE_ALL which returns a non zero context and CL_SUCCESS.

When querying this context for all devices using clGetContextInfo with CL_CONTEXT_DEVICES i also get CL_SUCCESS, however the returned size and device list do not appear to be correct.

The problem is:
The returned data is 32 bit, not 64 and the data is not a valid device.

The size is 4 bytes, which is half a word on my 64 bit MacBook Pro running Mac OSX Snow Leopard. The size given by sizeof(cl_device_id) is of course 8 bytes. So arguably this is invalid, or the implementation is made for a 32bit machine...? However, if I ignore this, there should be 2 devices returned (CPU+GPU), which queries on the platform indicate. Also ignoring this, the value of the data is always 0x2, which when treated like a device seems to be invalid also (although I was not thorough).

Has anyone else come across this? Or am I missing something obvious? Perhaps it is a problem with the implementation or current spec?

Other OpenCL code seems to work, but I would like to be able to query the context like this.

Name = "Apple";
Vendor = "Apple";
Version = "OpenCL 1.0 (May 28 2009 16:54:15)";

Name = "GeForce 9400M";
Vendor = "NVIDIA";
Version = "OpenCL 1.0";

Name = "Intel(R) Core(TM)2 Duo CPU T9550 @ 2.66GHz";
Vendor = "Intel";
Version = "OpenCL 1.0";