On this page:
Open  CL
8.17.0.6

OpenCL🔗ℹ

Jay McCarthy <jay@racket-lang.org>

This package provides a binding for OpenCL based on the 1.0.48 revision.

This documentation does not describe meaning of API calls; it only describes their Racket calling conventions. For details on API semantics, refer to the specification at the Khronos OpenCL API Registry.

If you run "tests/test.rkt", it will print out a whole lot of stuff and run some code on all your OpenCL devices. This will show you that it is really doing something on your hardware.

Here are some caveats:

  • The binding should wrap some objects in finalizers (using register-finalizer) that decrement their reference count.

  • The binding should wrap _cl_event objects in a struct with the prop:evt property to support synchronization in a Racket style.

  • These functions should provide the properties in a Racket style to look like fields or using the dictionary interface (by wrapping with prop:dict.)

  • clCreateContext’s properties argument is hard to fathom. It is defaulted to NULL in the binding.

  • No functions allow callbacks. (clCreateContext and clBuildProgram should.)

  • clCreateProgramWithBinary doesn’t automatically extract the status of each binary.

  • program-info doesn’t support the 'CL_PROGRAM_BINARIES option, because its calling convention doesn’t match my macro.

  • clSetKernelArg is specialized for each argument type (i.e., clSetKernelArg:_cl_mem), but I definitely haven’t created a binding for each available argument type.

  • clGetKernelWorkGroupInfo implements 'CL_KERNEL_COMPILE_WORK_GROUP_SIZE a bit wonky.

  • clEnqueueNativeKernel isn’t available.