Struct opencl3::device::Device[][src]

pub struct Device { /* fields omitted */ }
Expand description

An OpenCL device id and methods to query it.
The query methods calls clGetDeviceInfo with the relevant param_name, see: Device Queries.

Implementations

impl Device[src]

pub fn new(id: cl_device_id) -> Device[src]

pub fn id(&self) -> cl_device_id[src]

Accessor for the underlying device id.

pub fn create_sub_devices(
    &self,
    properties: &[cl_device_partition_property]
) -> Result<Vec<SubDevice>>
[src]

Create sub-devices by partitioning an OpenCL device.

returns a Result containing a vector of available SubDevices or the error code from the OpenCL C API function.

pub fn dev_type(&self) -> Result<cl_device_type>[src]

The OpenCL device type, see Device Types.

pub fn vendor_id(&self) -> Result<cl_uint>[src]

A unique device vendor identifier: a PCI vendor ID or a Khronos vendor ID if the vendor does not have a PCI vendor ID.

pub fn max_compute_units(&self) -> Result<cl_uint>[src]

The number of parallel compute units on the device, minimum 1.

pub fn max_work_item_dimensions(&self) -> Result<cl_uint>[src]

Maximum dimensions for global and local work-item IDs, minimum 3 if device is not CL_DEVICE_TYPE_CUSTOM.

pub fn max_work_group_size(&self) -> Result<size_t>[src]

Maximum number of work-items for each dimension of a work-group, minimum [1, 1, 1] if device is not CL_DEVICE_TYPE_CUSTOM.

pub fn max_work_item_sizes(&self) -> Result<Vec<size_t>>[src]

pub fn max_preferred_vector_width_char(&self) -> Result<cl_uint>[src]

pub fn max_preferred_vector_width_short(&self) -> Result<cl_uint>[src]

pub fn max_preferred_vector_width_int(&self) -> Result<cl_uint>[src]

pub fn max_preferred_vector_width_long(&self) -> Result<cl_uint>[src]

pub fn max_preferred_vector_width_float(&self) -> Result<cl_uint>[src]

pub fn max_preferred_vector_width_double(&self) -> Result<cl_uint>[src]

pub fn max_clock_frequency(&self) -> Result<cl_uint>[src]

pub fn address_bits(&self) -> Result<cl_uint>[src]

pub fn max_read_image_args(&self) -> Result<cl_uint>[src]

pub fn max_write_image_args(&self) -> Result<cl_uint>[src]

pub fn max_mem_alloc_size(&self) -> Result<cl_ulong>[src]

pub fn image2d_max_width(&self) -> Result<size_t>[src]

pub fn image2d_max_height(&self) -> Result<size_t>[src]

pub fn image3d_max_width(&self) -> Result<size_t>[src]

pub fn image3d_max_height(&self) -> Result<size_t>[src]

pub fn image3d_max_depth(&self) -> Result<size_t>[src]

pub fn image_support(&self) -> Result<cl_uint>[src]

pub fn max_parameter_size(&self) -> Result<size_t>[src]

pub fn max_device_samples(&self) -> Result<cl_uint>[src]

pub fn mem_base_addr_align(&self) -> Result<cl_uint>[src]

pub fn min_data_type_align_size(&self) -> Result<cl_uint>[src]

pub fn single_fp_config(&self) -> Result<cl_ulong>[src]

pub fn global_mem_cache_type(&self) -> Result<cl_uint>[src]

pub fn global_mem_cacheline_size(&self) -> Result<cl_uint>[src]

pub fn global_mem_cache_size(&self) -> Result<cl_ulong>[src]

pub fn global_mem_size(&self) -> Result<cl_ulong>[src]

pub fn max_constant_buffer_size(&self) -> Result<cl_ulong>[src]

pub fn max_constant_args(&self) -> Result<cl_uint>[src]

pub fn local_mem_type(&self) -> Result<cl_uint>[src]

pub fn local_mem_size(&self) -> Result<cl_ulong>[src]

pub fn error_correction_support(&self) -> Result<cl_uint>[src]

pub fn profiling_timer_resolution(&self) -> Result<size_t>[src]

pub fn endian_little(&self) -> Result<cl_uint>[src]

pub fn available(&self) -> Result<cl_uint>[src]

pub fn compiler_available(&self) -> Result<cl_uint>[src]

pub fn execution_capabilities(&self) -> Result<cl_ulong>[src]

pub fn queue_on_host_properties(&self) -> Result<cl_ulong>[src]

pub fn name(&self) -> Result<String>[src]

pub fn vendor(&self) -> Result<String>[src]

pub fn driver_version(&self) -> Result<String>[src]

pub fn profile(&self) -> Result<String>[src]

pub fn version(&self) -> Result<String>[src]

pub fn extensions(&self) -> Result<String>[src]

pub fn platform(&self) -> Result<cl_platform_id>[src]

pub fn double_fp_config(&self) -> Result<cl_ulong>[src]

pub fn half_fp_config(&self) -> Result<cl_ulong>[src]

pub fn preferred_vector_width_half(&self) -> Result<cl_uint>[src]

pub fn host_unified_memory(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_char(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_short(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_int(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_long(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_float(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_double(&self) -> Result<cl_uint>[src]

pub fn native_vector_width_half(&self) -> Result<cl_uint>[src]

pub fn opencl_c_version(&self) -> Result<String>[src]

pub fn linker_available(&self) -> Result<cl_uint>[src]

pub fn built_in_kernels(&self) -> Result<String>[src]

pub fn image_max_buffer_size(&self) -> Result<size_t>[src]

pub fn image_max_array_size(&self) -> Result<size_t>[src]

pub fn parent_device(&self) -> Result<cl_device_id>[src]

pub fn partition_max_sub_devices(&self) -> Result<cl_uint>[src]

pub fn partition_properties(&self) -> Result<Vec<intptr_t>>[src]

pub fn partition_affinity_domain(&self) -> Result<Vec<cl_ulong>>[src]

pub fn partition_type(&self) -> Result<Vec<intptr_t>>[src]

pub fn reference_count(&self) -> Result<cl_uint>[src]

pub fn preferred_interop_user_sync(&self) -> Result<cl_uint>[src]

pub fn printf_buffer_size(&self) -> Result<size_t>[src]

pub fn image_pitch_alignment(&self) -> Result<cl_uint>[src]

pub fn image_base_address_alignment(&self) -> Result<cl_uint>[src]

pub fn max_read_write_image_args(&self) -> Result<cl_uint>[src]

pub fn max_global_variable_size(&self) -> Result<size_t>[src]

pub fn queue_on_device_properties(&self) -> Result<Vec<intptr_t>>[src]

pub fn queue_on_device_preferred_size(&self) -> Result<size_t>[src]

pub fn queue_on_device_max_size(&self) -> Result<size_t>[src]

pub fn max_on_device_queues(&self) -> Result<cl_uint>[src]

pub fn max_on_device_events(&self) -> Result<cl_uint>[src]

pub fn svm_capabilities(&self) -> Result<cl_device_svm_capabilities>[src]

pub fn global_variable_preferred_total_size(&self) -> Result<size_t>[src]

pub fn max_pipe_args(&self) -> Result<cl_uint>[src]

pub fn pipe_max_active_reservations(&self) -> Result<cl_uint>[src]

pub fn pipe_max_packet_size(&self) -> Result<cl_uint>[src]

pub fn preferred_platform_atomic_alignment(&self) -> Result<cl_uint>[src]

pub fn preferred_global_atomic_alignment(&self) -> Result<cl_uint>[src]

pub fn preferred_local_atomic_alignment(&self) -> Result<cl_uint>[src]

pub fn il_version(&self) -> Result<String>[src]

pub fn max_num_sub_groups(&self) -> Result<cl_uint>[src]

pub fn sub_group_independent_forward_progress(&self) -> Result<cl_uint>[src]

pub fn numeric_version(&self) -> Result<cl_uint>[src]

pub fn extensions_with_version(&self) -> Result<Vec<cl_name_version>>[src]

pub fn ils_with_version(&self) -> Result<Vec<cl_name_version>>[src]

pub fn built_in_kernels_with_version(&self) -> Result<Vec<cl_name_version>>[src]

pub fn atomic_memory_capabilities(&self) -> Result<cl_ulong>[src]

pub fn atomic_fence_capabilities(&self) -> Result<cl_ulong>[src]

pub fn non_uniform_work_group_support(&self) -> Result<cl_uint>[src]

pub fn opencl_c_all_versions(&self) -> Result<Vec<cl_name_version>>[src]

pub fn preferred_work_group_size_multiple(&self) -> Result<size_t>[src]

pub fn work_group_collective_functions_support(&self) -> Result<cl_uint>[src]

pub fn generic_address_space_support(&self) -> Result<cl_uint>[src]

pub fn uuid_khr(&self) -> Result<Vec<u8>>[src]

pub fn driver_uuid_khr(&self) -> Result<Vec<u8>>[src]

pub fn luid_valid_khr(&self) -> Result<cl_uint>[src]

pub fn luid_khr(&self) -> Result<Vec<u8>>[src]

pub fn node_mask_khr(&self) -> Result<cl_uint>[src]

pub fn opencl_c_features(&self) -> Result<Vec<cl_name_version>>[src]

pub fn device_enqueue_capabilities(&self) -> Result<cl_ulong>[src]

pub fn pipe_support(&self) -> Result<cl_uint>[src]

pub fn latest_conformance_version_passed(&self) -> Result<String>[src]

pub fn compute_capability_major_nv(&self) -> Result<cl_uint>[src]

pub fn compute_capability_minor_nv(&self) -> Result<cl_uint>[src]

pub fn registers_per_block_nv(&self) -> Result<cl_uint>[src]

pub fn wrap_size_nv(&self) -> Result<cl_uint>[src]

pub fn gpu_overlap_nv(&self) -> Result<cl_uint>[src]

pub fn compute_kernel_exec_timeout_nv(&self) -> Result<cl_uint>[src]

pub fn integrated_memory_nv(&self) -> Result<cl_uint>[src]

pub fn pci_bus_id_nv(&self) -> Result<cl_uint>[src]

pub fn pci_slot_id_nv(&self) -> Result<cl_uint>[src]

pub fn profiling_timer_offset_amd(&self) -> Result<size_t>[src]

pub fn topology_amd(&self) -> Result<cl_amd_device_topology>[src]

pub fn pci_bus_id_amd(&self) -> Result<cl_uint>[src]

pub fn board_name_amd(&self) -> Result<String>[src]

pub fn global_free_memory_amd(&self) -> Result<size_t>[src]

pub fn simd_per_compute_unit_amd(&self) -> Result<cl_uint>[src]

pub fn simd_width_amd(&self) -> Result<cl_uint>[src]

pub fn simd_instruction_width_amd(&self) -> Result<cl_uint>[src]

pub fn wavefront_width_amd(&self) -> Result<cl_uint>[src]

pub fn global_mem_channels_amd(&self) -> Result<cl_uint>[src]

pub fn global_mem_channel_banks_amd(&self) -> Result<cl_uint>[src]

pub fn global_mem_channel_bank_width_amd(&self) -> Result<cl_uint>[src]

pub fn local_mem_size_per_compute_unit_amd(&self) -> Result<cl_uint>[src]

pub fn local_mem_banks_amd(&self) -> Result<cl_uint>[src]

pub fn thread_trace_supported_amd(&self) -> Result<cl_uint>[src]

pub fn gfxip_major_amd(&self) -> Result<cl_uint>[src]

pub fn gfxip_minor_amd(&self) -> Result<cl_uint>[src]

pub fn available_async_queues_amd(&self) -> Result<cl_uint>[src]

pub fn preferred_work_group_size_amd(&self) -> Result<size_t>[src]

pub fn max_work_group_size_amd(&self) -> Result<size_t>[src]

pub fn preferred_constant_buffer_size_amd(&self) -> Result<size_t>[src]

pub fn pcie_id_amd(&self) -> Result<cl_uint>[src]

pub fn supports_half(&self, min_fp_capability: cl_device_fp_config) -> bool[src]

Determine if the device supports the given half floating point capability.
Returns true if the device supports it, false otherwise.

pub fn supports_double(&self, min_fp_capability: cl_device_fp_config) -> bool[src]

Determine if the device supports the given double floating point capability.
Returns true if the device supports it, false otherwise.

pub fn svm_mem_capability(&self) -> cl_device_svm_capabilities[src]

Determine if the device supports SVM and, if so, what kind of SVM.
Returns zero if the device does not support SVM.

Trait Implementations

impl Clone for Device[src]

fn clone(&self) -> Device[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Device[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Copy for Device[src]

impl Send for Device[src]

impl Sync for Device[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.