OpenCL


The opencl vocabulary provides high-level words for using OpenCL.
cl-platforms ( -- platforms )

<cl-queue> ( context device out-of-order? profiling? -- command-queue )

with-cl-state ( context/f device/f queue/f quot -- )


Memory Objects:
<cl-buffer> ( buffer-access-mode size initial-data -- buffer )

cl-queue-copy-buffer ( src-buffer-ptr dst-buffer-ptr size dependent-events -- event )

cl-read-buffer ( buffer-range -- byte-array )

cl-queue-read-buffer ( buffer-range alien dependent-events -- event )

cl-write-buffer ( buffer-range byte-array -- )

cl-queue-write-buffer ( buffer-range alien dependent-events -- event )


Programs and Kernels:
<cl-program> ( options strings -- program )

<cl-kernel> ( program kernel-name -- kernel )


Running and Waiting for Completion:
cl-queue-kernel ( kernel args sizes dependent-events -- event )

cl-wait ( event/events -- )

cl-flush ( -- )

cl-finish ( -- )