
[OpenCL] Possible bug at CL.CreateProgramWithBinary
Posted Wednesday, 28 October, 2009 - 21:41 by nythrix| Project: | The Open Toolkit library |
| Version: | 1.0-beta-1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I think these two signatures don't quite match. Note the
byte @char
and
const unsigned char **binaries
parameters. Shouldn't it be string[]?
C#:
public static IntPtr CreateProgramWithBinary( IntPtr context, int num_devices, IntPtr* device_list, IntPtr* lengths, byte @char, int* binary_status, ErrorCode* errcode_ret );
OpenCL:
cl_program clCreateProgramWithBinary ( cl_context context, cl_uint num_devices, const cl_device_id *device_list, const size_t *lengths, const unsigned char **binaries, cl_int *binary_status, cl_int *errcode_ret)
If not then please consider enlightening me on this. Thank you.


Comments
#1
It seems that the converter is mis-parsing
const unsigned char **and is ignoring the "**" part. (CreateProgramWithSource takes aconst char **and is parsed correctly.)I'll check this. For the time being I'd suggest adding a DllImport manually, with a
#warningthat this is a temporary workaround, until the issue is fixed.#2
Fixed in rev. 2410.
According to cl.h, the correct signature is
byte** binaries, while the spec defines this asvoid** binaries. I'm following the first, as the intent is somewhat clearer and matchesAssembly.Loadfrom the BCL (byte arrays which contain binaries).#3
Closing issues fixed in 1.0 beta-1.