[−][src]Struct opencl3::command_queue::CommandQueue
An OpenCL command-queue.
Operations on OpenCL memory and kernel objects are performed using a
command-queue.
Implementations
impl CommandQueue
[src]
pub fn get(&self) -> cl_command_queue
[src]
Get the underlying OpenCL cl_command_queue.
pub fn max_work_item_dimensions(&self) -> cl_uint
[src]
Get the max_work_item_dimensions for the device that the underlying OpenCL device.
pub fn create(
context: cl_context,
device_id: cl_device_id,
properties: cl_command_queue_properties
) -> Result<CommandQueue, cl_int>
[src]
context: cl_context,
device_id: cl_device_id,
properties: cl_command_queue_properties
) -> Result<CommandQueue, cl_int>
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: cl_context,
device_id: cl_device_id,
properties: cl_command_queue_properties,
queue_size: cl_uint
) -> Result<CommandQueue, cl_int>
[src]
context: cl_context,
device_id: cl_device_id,
properties: cl_command_queue_properties,
queue_size: cl_uint
) -> Result<CommandQueue, cl_int>
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.
pub fn flush(&self) -> Result<(), cl_int>
[src]
Flush commands to a device.
returns an empty Result or the error code from the OpenCL C API function.
pub fn finish(&self) -> Result<(), cl_int>
[src]
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: cl_mem,
blocking_read: cl_bool,
offset: size_t,
data: &mut [T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
buffer: cl_mem,
blocking_read: cl_bool,
offset: size_t,
data: &mut [T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_read_buffer_rect(
&self,
buffer: cl_mem,
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, cl_int>
[src]
&self,
buffer: cl_mem,
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, cl_int>
pub fn enqueue_write_buffer<T>(
&self,
buffer: cl_mem,
blocking_write: cl_bool,
offset: size_t,
data: &[T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
buffer: cl_mem,
blocking_write: cl_bool,
offset: size_t,
data: &[T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_write_buffer_rect(
&self,
buffer: cl_mem,
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, cl_int>
[src]
&self,
buffer: cl_mem,
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, cl_int>
pub fn enqueue_fill_buffer<T>(
&self,
buffer: cl_mem,
pattern: &[T],
offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
buffer: cl_mem,
pattern: &[T],
offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_copy_buffer(
&self,
src_buffer: cl_mem,
dst_buffer: cl_mem,
src_offset: size_t,
dst_offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
src_buffer: cl_mem,
dst_buffer: cl_mem,
src_offset: size_t,
dst_offset: size_t,
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_copy_buffer_rect(
&self,
src_buffer: cl_mem,
dst_buffer: cl_mem,
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, cl_int>
[src]
&self,
src_buffer: cl_mem,
dst_buffer: cl_mem,
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, cl_int>
pub fn enqueue_read_image(
&self,
image: cl_mem,
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, cl_int>
[src]
&self,
image: cl_mem,
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, cl_int>
pub fn enqueue_write_image(
&self,
image: cl_mem,
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, cl_int>
[src]
&self,
image: cl_mem,
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, cl_int>
pub fn enqueue_fill_image(
&self,
image: cl_mem,
fill_color: *const c_void,
origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
image: cl_mem,
fill_color: *const c_void,
origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_copy_image(
&self,
src_image: cl_mem,
dst_image: cl_mem,
src_origin: *const size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
src_image: cl_mem,
dst_image: cl_mem,
src_origin: *const size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_copy_image_to_buffer(
&self,
src_image: cl_mem,
dst_buffer: cl_mem,
src_origin: *const size_t,
region: *const size_t,
dst_offset: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
src_image: cl_mem,
dst_buffer: cl_mem,
src_origin: *const size_t,
region: *const size_t,
dst_offset: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_copy_buffer_to_image(
&self,
src_buffer: cl_mem,
dst_image: cl_mem,
src_offset: size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
src_buffer: cl_mem,
dst_image: cl_mem,
src_offset: size_t,
dst_origin: *const size_t,
region: *const size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_map_buffer(
&self,
buffer: cl_mem,
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, cl_int>
[src]
&self,
buffer: cl_mem,
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, cl_int>
pub fn enqueue_map_image(
&self,
image: cl_mem,
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, cl_int>
[src]
&self,
image: cl_mem,
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, cl_int>
pub fn enqueue_unmap_mem_object(
&self,
memobj: cl_mem,
mapped_ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
memobj: cl_mem,
mapped_ptr: *mut c_void,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
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, cl_int>
[src]
&self,
num_mem_objects: cl_uint,
mem_objects: *const cl_mem,
flags: cl_mem_migration_flags,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
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, cl_int>
[src]
&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, cl_int>
pub fn enqueue_task(
&self,
kernel: cl_kernel,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
kernel: cl_kernel,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
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, cl_int>
[src]
&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, cl_int>
pub fn enqueue_marker_with_wait_list(
&self,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_barrier_with_wait_list(
&self,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
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, cl_int>
[src]
&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, cl_int>
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, cl_int>
[src]
&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, cl_int>
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, cl_int>
[src]
&self,
svm_ptr: *mut c_void,
pattern: &[T],
size: size_t,
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
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, cl_int>
[src]
&self,
blocking_map: cl_bool,
flags: cl_map_flags,
svm: &mut [T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn enqueue_svm_unmap<T>(
&self,
svm: &[T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
[src]
&self,
svm: &[T],
event_wait_list: &[cl_event]
) -> Result<Event, cl_int>
pub fn context(&self) -> Result<intptr_t, cl_int>
[src]
pub fn device(&self) -> Result<intptr_t, cl_int>
[src]
pub fn reference_count(&self) -> Result<cl_uint, cl_int>
[src]
pub fn properties(&self) -> Result<cl_ulong, cl_int>
[src]
pub fn size(&self) -> Result<cl_uint, cl_int>
[src]
pub fn device_default(&self) -> Result<intptr_t, cl_int>
[src]
pub fn properties_array(&self) -> Result<Vec<cl_ulong>, cl_int>
[src]
Trait Implementations
impl Drop for CommandQueue
[src]
Auto Trait Implementations
impl RefUnwindSafe for CommandQueue
[src]
impl !Send for CommandQueue
[src]
impl !Sync for CommandQueue
[src]
impl Unpin for CommandQueue
[src]
impl UnwindSafe for CommandQueue
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,