- buffer-create s c #!key (type #f) (flags 0) (finalizer #t)procedure
- buffer-release! bufferprocedure
Create or release an OpenCL buffer object, a memory chunk that is usually stored on the target device. See this page.
If c is a cl_context, s (s for source) must be an integer representing the buffer size in bytes.
If c is a cl_command-queue, s must be a srfi-4 vector or a blob. The content of s is copied to the newly created buffer buffer using buffer-write. The size in bytes of this buffer and the size in bytes of s will be equal.
type defaults to the type of s for srfi-4 vectors, or blob if s is an integer. If s is an integer, type can be explicitly supplied. See buffer-type for valid values.
Support for flags is currently limited, and must be a number corresponding to the C API. The default is CL_MEM_READ_WRITE.