Struct opencl3::command_queue::CommandQueue [−][src]
pub struct CommandQueue { /* fields omitted */ }
Expand description
An OpenCL command-queue.
Operations on OpenCL memory and kernel objects are performed using a
command-queue.
Implementations
Get the underlying OpenCL cl_command_queue.
Get the max_work_item_dimensions for the device that the underlying OpenCL device.
pub fn create(
context: &Context,
device_id: cl_device_id,
properties: cl_command_queue_properties
) -> Result<CommandQueue>
pub fn create(
context: &Context,
device_id: cl_device_id,
properties: cl_command_queue_properties
) -> Result<CommandQueue>
Create an OpenCL command-queue on a specific device.
Queries the device the max_work_item_dimensions.
Deprecated in CL_VERSION_2_0 by create_command_queue_with_properties.
context
- a valid OpenCL context.device_id
- a device or sub-device associated with context.properties
- a list of properties for the command-queue, see cl_command_queue_properties.
returns a Result containing the new CommandQueue or the error code from the OpenCL C API function.
pub fn create_with_properties(
context: &Context,
device_id: cl_device_id,
properties: cl_command_queue_properties,
queue_size: cl_uint
) -> Result<CommandQueue>
pub fn create_with_properties(
context: &Context,
device_id: cl_device_id,
properties: cl_command_queue_properties,
queue_size: cl_uint
) -> Result<CommandQueue>
Create an OpenCL command-queue on a specific device.
Queries the device the max_work_item_dimensions.
CL_VERSION_2_0 onwards.
context
- a valid OpenCL context.device_id
- a device or sub-device associated with context.properties
- a null terminated list of properties for the command-queue, see cl_queue_properties.
returns a Result containing the new CommandQueue or the error code from the OpenCL C API function.
Flush commands to a device.
returns an empty Result or the error code from the OpenCL C API function.
Wait for completion of commands on a device.
returns an empty Result or the error code from the OpenCL C API function.
pub fn enqueue_read_buffer<T>(
&self,
buffer: &Buffer<T>,
blocking_read: cl_bool,
offset: size_t,
data: &mut [T],
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_read_buffer_rect<T>(
&self,
buffer: &Buffer<T>,
blocking_read: cl_bool,
buffer_origin: *const size_t,
host_origin: *const size_t,
region: *const size_t,
buffer_row_pitch: size_t,
buffer_slice_pitch: size_t,
host_row_pitch: size_t,
host_slice_pitch: size_t,
ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_write_buffer<T>(
&self,
buffer: &mut Buffer<T>,
blocking_write: cl_bool,
offset: size_t,
data: &[T],
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_write_buffer_rect<T>(
&self,
buffer: &mut Buffer<T>,
blocking_write: cl_bool,
buffer_origin: *const size_t,
host_origin: *const size_t,
region: *const size_t,
buffer_row_pitch: size_t,
buffer_slice_pitch: size_t,
host_row_pitch: size_t,
host_slice_pitch: size_t,
ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_fill_buffer<T>(
&self,
buffer: &mut Buffer<T>,
pattern: &[T],
offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_copy_buffer<T>(
&self,
src_buffer: &Buffer<T>,
dst_buffer: &mut Buffer<T>,
src_offset: size_t,
dst_offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_copy_buffer_rect<T>(
&self,
src_buffer: &Buffer<T>,
dst_buffer: &mut Buffer<T>,
src_origin: *const size_t,
dst_origin: *const size_t,
region: *const size_t,
src_row_pitch: size_t,
src_slice_pitch: size_t,
dst_row_pitch: size_t,
dst_slice_pitch: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_read_image(
&self,
image: &Image,
blocking_read: cl_bool,
origin: *const size_t,
region: *const size_t,
row_pitch: size_t,
slice_pitch: size_t,
ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_write_image(
&self,
image: &mut Image,
blocking_write: cl_bool,
origin: *const size_t,
region: *const size_t,
row_pitch: size_t,
slice_pitch: size_t,
ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_fill_image(
&self,
image: &mut Image,
fill_color: *const c_void,
origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_copy_image(
&self,
src_image: &Image,
dst_image: &mut Image,
src_origin: *const size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_copy_image_to_buffer<T>(
&self,
src_image: &Image,
dst_buffer: &mut Buffer<T>,
src_origin: *const size_t,
region: *const size_t,
dst_offset: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_copy_buffer_to_image<T>(
&self,
src_buffer: &Buffer<T>,
dst_image: &mut Image,
src_offset: size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_map_buffer<T>(
&self,
buffer: &Buffer<T>,
blocking_map: cl_bool,
map_flags: cl_map_flags,
offset: size_t,
size: size_t,
buffer_ptr: &mut cl_mem,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_map_image(
&self,
image: &Image,
blocking_map: cl_bool,
map_flags: cl_map_flags,
origin: *const size_t,
region: *const size_t,
image_row_pitch: *mut size_t,
image_slice_pitch: *mut size_t,
image_ptr: &mut cl_mem,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_unmap_mem_object(
&self,
memobj: cl_mem,
mapped_ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_migrate_mem_object(
&self,
num_mem_objects: cl_uint,
mem_objects: *const cl_mem,
flags: cl_mem_migration_flags,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_nd_range_kernel(
&self,
kernel: cl_kernel,
work_dim: cl_uint,
global_work_offsets: *const size_t,
global_work_sizes: *const size_t,
local_work_sizes: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_native_kernel(
&self,
user_func: Option<extern "C" fn(_: *mut c_void)>,
args: &[*mut c_void],
mem_list: &[cl_mem],
args_mem_loc: &[*const c_void],
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_svm_free(
&self,
svm_pointers: &[*const c_void],
pfn_free_func: Option<extern "C" fn(queue: cl_command_queue, num_svm_pointers: cl_uint, svm_pointers: *const *const c_void, user_data: *mut c_void)>,
user_data: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_svm_mem_cpy(
&self,
blocking_copy: cl_bool,
dst_ptr: *mut c_void,
src_ptr: *const c_void,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_svm_mem_fill<T>(
&self,
svm_ptr: *mut c_void,
pattern: &[T],
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_svm_map<T>(
&self,
blocking_map: cl_bool,
flags: cl_map_flags,
svm: &mut [T],
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_acquire_gl_objects(
&self,
mem_objects: &[*const c_void],
event_wait_list: &[cl_event]
) -> Result<Event>
pub fn enqueue_release_gl_objects(
&self,
mem_objects: &[*const c_void],
event_wait_list: &[cl_event]
) -> Result<Event>
CL_VERSION_2_1
CL_VERSION_3_0
Trait Implementations
Performs the conversion.