[−][src]Function opencl3::memory::create_image
pub fn create_image(
context: *mut c_void,
flags: u64,
image_format: *const cl_image_format,
image_desc: *const cl_image_desc,
host_ptr: *mut c_void
) -> Result<*mut c_void, i32>
Create an OpenCL image object for a context.
Calls clCreateImage to create an OpenCL image object.
context
- a valid OpenCL context.flags
- a bit-field used to specify allocation and usage information about the image memory object being created, see: Memory Flags.image_format
- a pointer to a structure that describes format properties of the image to be allocated.image_desc
- a pointer to a structure that describes type and dimensions of the image to be allocated.host_ptr
- a pointer to the image data that may already be allocated by the application.
returns a Result containing the new OpenCL image object or the error code from the OpenCL C API function.