#[repr(transparent)]pub struct RawDevice(_);Expand description
OpenCL device
Implementations§
source§impl RawDevice
impl RawDevice
pub const fn id(&self) -> cl_device_id
pub const unsafe fn from_id(id: cl_device_id) -> Option<Self>
pub const unsafe fn from_id_unchecked(id: cl_device_id) -> Self
sourcepub fn address_bits(&self) -> Result<u32>
pub fn address_bits(&self) -> Result<u32>
The default compute device address space size specified as an unsigned integer value in bits. Currently supported values are 32 or 64 bits.
sourcepub fn atomic_memory_capabilities(&self) -> Result<Option<AtomicCapabilities>>
Available on crate feature cl3 only.
pub fn atomic_memory_capabilities(&self) -> Result<Option<AtomicCapabilities>>
cl3 only.Describes the various memory orders and scopes that the device supports for atomic memory operations.
sourcepub fn atomic_fence_capabilities(&self) -> Result<Option<AtomicCapabilities>>
Available on crate feature cl3 only.
pub fn atomic_fence_capabilities(&self) -> Result<Option<AtomicCapabilities>>
cl3 only.Describes the various memory orders and scopes that the device supports for atomic fence operations.
sourcepub fn available(&self) -> Result<bool>
pub fn available(&self) -> Result<bool>
Is true if the device is available and false if the device is not available.
sourcepub fn built_in_kernels(&self) -> Result<Vec<String>>
Available on crate feature cl1_2 only.
pub fn built_in_kernels(&self) -> Result<Vec<String>>
cl1_2 only.A list of built-in kernels supported by the device. An empty list is returned if no built-in kernels are supported by the device.
sourcepub fn built_in_kernels_string(&self) -> Result<String>
Available on crate feature cl1_2 only.
pub fn built_in_kernels_string(&self) -> Result<String>
cl1_2 only.A semi-colon separated list of built-in kernels supported by the device. An empty string is returned if no built-in kernels are supported by the device.
sourcepub fn compiler_available(&self) -> Result<bool>
pub fn compiler_available(&self) -> Result<bool>
Is false if the implementation does not have a compiler available to compile the program source. Is true if the compiler is available. This can be CL_FALSE for the embedded platform profile only.
sourcepub fn device_enqueue_capabilities(
&self
) -> Result<Option<DeviceEnqueueCapabilities>>
Available on crate feature cl3 only.
pub fn device_enqueue_capabilities( &self ) -> Result<Option<DeviceEnqueueCapabilities>>
cl3 only.Describes device-side enqueue capabilities of the device.
sourcepub fn double_fp_config(&self) -> Result<FpConfig>
Available on crate feature cl1_2 only.
pub fn double_fp_config(&self) -> Result<FpConfig>
cl1_2 only.Describes the OPTIONAL double precision floating-point capability of the OpenCL device
sourcepub fn endian_little(&self) -> Result<bool>
pub fn endian_little(&self) -> Result<bool>
Is true if the OpenCL device is a little endian device and false otherwise.
sourcepub fn error_connection_support(&self) -> Result<bool>
pub fn error_connection_support(&self) -> Result<bool>
Is true if the device implements error correction for the memories, caches, registers etc. in the device. Is false if the device does not implement error correction. This can be a requirement for certain clients of OpenCL.
sourcepub fn execution_capabilities(&self) -> Result<ExecCapabilities>
pub fn execution_capabilities(&self) -> Result<ExecCapabilities>
Describes the execution capabilities of the device
sourcepub fn extensions(&self) -> Result<Vec<String>>
pub fn extensions(&self) -> Result<Vec<String>>
Returns a list of extension names
sourcepub fn extensions_string(&self) -> Result<String>
pub fn extensions_string(&self) -> Result<String>
Returns a space-separated list of extension names (the extension names themselves do not contain any spaces)
sourcepub fn generic_address_space_support(&self) -> Result<bool>
Available on crate feature cl3 only.
pub fn generic_address_space_support(&self) -> Result<bool>
cl3 only.Is true if the device supports the generic address space and its associated built-in functions, and false otherwise.
sourcepub fn global_mem_cache_size(&self) -> Result<u64>
pub fn global_mem_cache_size(&self) -> Result<u64>
Size of global memory cache in bytes.
sourcepub fn global_mem_cache_type(&self) -> Result<MemAccess>
pub fn global_mem_cache_type(&self) -> Result<MemAccess>
Type of global memory cache supported.
sourcepub fn global_mem_cahceline_size(&self) -> Result<u32>
pub fn global_mem_cahceline_size(&self) -> Result<u32>
Size of global memory cache line in bytes.
sourcepub fn global_mem_size(&self) -> Result<u64>
pub fn global_mem_size(&self) -> Result<u64>
Size of global memory in bytes.
sourcepub fn global_variable_preferred_total_size(&self) -> Result<usize>
Available on crate feature cl2 only.
pub fn global_variable_preferred_total_size(&self) -> Result<usize>
cl2 only.Maximum preferred total size, in bytes, of all program variables in the global address space. This is a performance hint. An implementation may place such variables in storage with optimized device access. This query returns the capacity of such storage. The minimum value is 0.
sourcepub fn half_fp_config(&self) -> Result<FpConfig>
pub fn half_fp_config(&self) -> Result<FpConfig>
Describes the OPTIONAL half precision floating-point capability of the OpenCL device
sourcepub fn host_unified_memory(&self) -> Result<bool>
👎DeprecatedAvailable on crate feature cl1_1 only.
pub fn host_unified_memory(&self) -> Result<bool>
cl1_1 only.Is true if the device and the host have a unified memory subsystem and is false otherwise.
sourcepub fn il_version(&self) -> Result<String>
Available on crate feature cl2_1 only.
pub fn il_version(&self) -> Result<String>
cl2_1 only.The intermediate languages that can be supported by clCreateProgramWithIL for this device.
sourcepub fn image_support(&self) -> Result<bool>
pub fn image_support(&self) -> Result<bool>
Is true if images are supported by the OpenCL device and false otherwise.
sourcepub fn image_max_array_size(&self) -> Result<Option<NonZeroUsize>>
Available on crate feature cl1_2 only.
pub fn image_max_array_size(&self) -> Result<Option<NonZeroUsize>>
cl1_2 only.Max number of images in a 1D or 2D image array. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE, the value is 0 otherwise.
sourcepub fn image_max_buffer_size(&self) -> Result<Option<NonZeroUsize>>
Available on crate feature cl1_2 only.
pub fn image_max_buffer_size(&self) -> Result<Option<NonZeroUsize>>
cl1_2 only.Max number of pixels for a 1D image created from a buffer object. The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE, the value is 0 otherwise.
sourcepub fn image_pitch_alignment(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn image_pitch_alignment(&self) -> Result<Option<NonZeroU32>>
cl2 only.The row pitch alignment size in pixels for 2D images created from a buffer. The value returned must be a power of 2.
sourcepub fn image_base_address_alignment(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn image_base_address_alignment(&self) -> Result<Option<NonZeroU32>>
cl2 only.This query specifies the minimum alignment in pixels of the host_ptr specified to clCreateBuffer or clCreateBufferWithProperties when a 2D image is created from a buffer which was created using CL_MEM_USE_HOST_PTR. The value returned must be a power of 2.
sourcepub fn image2d_max_height(&self) -> Result<Option<NonZeroUsize>>
pub fn image2d_max_height(&self) -> Result<Option<NonZeroUsize>>
Max height of 2D image in pixels. The minimum value is 8192 if image_support is true.
sourcepub fn image2d_max_width(&self) -> Result<Option<NonZeroUsize>>
pub fn image2d_max_width(&self) -> Result<Option<NonZeroUsize>>
Max width of 2D image in pixels. The minimum value is 8192 if image_support is true.
sourcepub fn image3d_max_depth(&self) -> Result<Option<NonZeroUsize>>
pub fn image3d_max_depth(&self) -> Result<Option<NonZeroUsize>>
Max depth of 3D image in pixels. The minimum value is 2048 if image_support is true.
sourcepub fn image3d_max_height(&self) -> Result<Option<NonZeroUsize>>
pub fn image3d_max_height(&self) -> Result<Option<NonZeroUsize>>
Max height of 3D image in pixels. The minimum value is 2048 if image_support is true.
sourcepub fn image3d_max_width(&self) -> Result<Option<NonZeroUsize>>
pub fn image3d_max_width(&self) -> Result<Option<NonZeroUsize>>
Max width of 3D image in pixels. The minimum value is 2048 if image_support is true.
sourcepub fn latest_conformance_version_passed(&self) -> Result<String>
Available on crate feature cl3 only.
pub fn latest_conformance_version_passed(&self) -> Result<String>
cl3 only.Returns the latest version of the conformance test suite that this device has fully passed in accordance with the official conformance process.
sourcepub fn local_mem_size(&self) -> Result<NonZeroU64>
pub fn local_mem_size(&self) -> Result<NonZeroU64>
Size of local memory arena in bytes. The minimum value is 16 KB.
sourcepub fn local_mem_type(&self) -> Result<LocalMemType>
pub fn local_mem_type(&self) -> Result<LocalMemType>
Type of local memory supported.
pub fn linker_available(&self) -> Result<bool>
cl1_2 only.sourcepub fn max_clock_frequency(&self) -> Result<u32>
Available on crate feature cl2_2 only.
pub fn max_clock_frequency(&self) -> Result<u32>
cl2_2 only.Maximum configured clock frequency of the device in MHz.
sourcepub fn max_compute_units(&self) -> Result<NonZeroU32>
pub fn max_compute_units(&self) -> Result<NonZeroU32>
The number of parallel compute cores on the OpenCL device. The minimum value is 1.
sourcepub fn max_constant_args(&self) -> Result<NonZeroU32>
pub fn max_constant_args(&self) -> Result<NonZeroU32>
Max number of arguments declared with the __constant qualifier in a kernel. The minimum value is 8.
sourcepub fn max_constant_buffer_size(&self) -> Result<NonZeroU64>
pub fn max_constant_buffer_size(&self) -> Result<NonZeroU64>
Max size in bytes of a constant buffer allocation. The minimum value is 64 KB.
sourcepub fn max_global_variable_size(&self) -> Result<Option<NonZeroUsize>>
Available on crate feature cl2 only.
pub fn max_global_variable_size(&self) -> Result<Option<NonZeroUsize>>
cl2 only.The maximum number of bytes of storage that may be allocated for any single variable in program scope or inside a function in an OpenCL kernel language declared in the global address space.
sourcepub fn max_mem_alloc_size(&self) -> Result<NonZeroU64>
pub fn max_mem_alloc_size(&self) -> Result<NonZeroU64>
Max size of memory object allocation in bytes. The minimum value is max (1/4th of global_mem_size, 12810241024)
sourcepub fn max_num_sub_groups(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2_1 only.
pub fn max_num_sub_groups(&self) -> Result<Option<NonZeroU32>>
cl2_1 only.Maximum number of sub-groups in a work-group that a device is capable of executing on a single compute unit, for any given kernel-instance running on the device. The minimum value is 1 if the device supports subgroups, and must be 0 for devices that do not support subgroups. Support for subgroups is required for an OpenCL 2.1 or 2.2 device.
sourcepub fn max_on_device_events(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn max_on_device_events(&self) -> Result<Option<NonZeroU32>>
cl2 only.The maximum number of events in use by a device queue. These refer to events returned by the enqueue_ built-in functions to a device queue or user events returned by the create_user_event built-in function that have not been released. The minimum value is 1024 for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
sourcepub fn max_on_device_queues(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn max_on_device_queues(&self) -> Result<Option<NonZeroU32>>
cl2 only.The maximum number of device queues that can be created for this device in a single context. The minimum value is 1 for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
sourcepub fn max_parameter_size(&self) -> Result<NonZeroUsize>
pub fn max_parameter_size(&self) -> Result<NonZeroUsize>
Max size in bytes of the arguments that can be passed to a kernel. The minimum value is 256.
sourcepub fn max_read_image_args(&self) -> Result<Option<NonZeroU32>>
pub fn max_read_image_args(&self) -> Result<Option<NonZeroU32>>
Max number of simultaneous image objects that can be read by a kernel. The minimum value is 128 if image_support is true.
sourcepub fn max_read_write_image_args(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn max_read_write_image_args(&self) -> Result<Option<NonZeroU32>>
cl2 only.Max number of image objects arguments of a kernel declared with the write_only or read_write qualifier.
sourcepub fn max_samplers(&self) -> Result<Option<NonZeroU32>>
pub fn max_samplers(&self) -> Result<Option<NonZeroU32>>
Maximum number of samplers that can be used in a kernel. The minimum value is 16 if image_support is true.
sourcepub fn max_work_group_size(&self) -> Result<NonZeroUsize>
pub fn max_work_group_size(&self) -> Result<NonZeroUsize>
Maximum number of work-items in a work-group executing a kernel using the data parallel execution model. The minimum value is 1.
sourcepub fn max_work_item_dimensions(&self) -> Result<NonZeroU32>
pub fn max_work_item_dimensions(&self) -> Result<NonZeroU32>
Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model. The minimum value is 3.
sourcepub fn max_work_item_sizes(&self) -> Result<Vec<NonZeroUsize>>
pub fn max_work_item_sizes(&self) -> Result<Vec<NonZeroUsize>>
Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel. Returns n usize entries, where n is the value returned by the query for max_work_item_dimensions. The minimum value is (1, 1, 1).
sourcepub fn max_write_image_args(&self) -> Result<Option<NonZeroU32>>
pub fn max_write_image_args(&self) -> Result<Option<NonZeroU32>>
Max number of simultaneous image objects that can be written to by a kernel. The minimum value is 8 if image_support is true.
sourcepub fn mem_base_addr_align(&self) -> Result<u32>
pub fn mem_base_addr_align(&self) -> Result<u32>
Describes the alignment in bits of the base address of any allocated memory object.
sourcepub fn min_data_type_align_size(&self) -> Result<u32>
👎Deprecated
pub fn min_data_type_align_size(&self) -> Result<u32>
The smallest alignment in bytes which can be used for any data type.
sourcepub fn native_vector_width_char(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_char(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn native_vector_width_short(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_short(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn native_vector_width_int(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_int(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn native_vector_width_long(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_long(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn native_vector_width_float(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_float(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn native_vector_width_double(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn native_vector_width_double(&self) -> Result<u32>
cl1_1 only.Returns the native ISA vector width. The vector width is defined as the number of scalar elements that can be stored in the vector
sourcepub fn non_uniform_work_group_support(&self) -> Result<bool>
Available on crate feature cl3 only.
pub fn non_uniform_work_group_support(&self) -> Result<bool>
cl3 only.Is true if the device supports non-uniform work-groups, and false otherwise.
sourcepub fn opencl_c_version(&self) -> Result<String>
👎DeprecatedAvailable on crate feature cl1_1 only.
pub fn opencl_c_version(&self) -> Result<String>
cl1_1 only.Returns the highest fully backwards compatible OpenCL C version supported by the compiler for the device.
sourcepub fn parent(&self) -> Result<Option<RawDevice>>
Available on crate feature cl1_2 only.
pub fn parent(&self) -> Result<Option<RawDevice>>
cl1_2 only.Returns the parent device to which this sub-device belongs. If device is a root-level device, a None value is returned.
sourcepub fn partition_affinity_domain(&self) -> Result<Option<AffinityDomain>>
Available on crate feature cl1_2 only.
pub fn partition_affinity_domain(&self) -> Result<Option<AffinityDomain>>
cl1_2 only.Returns the list of supported affinity domains for partitioning the device.
sourcepub fn partition_type(&self) -> Result<Option<PartitionProperty>>
Available on crate feature cl1_2 only.
pub fn partition_type(&self) -> Result<Option<PartitionProperty>>
cl1_2 only.Returns the properties argument specified in clCreateSubDevices if device is a sub-device.
sourcepub fn partition_max_sub_devices(&self) -> Result<u32>
Available on crate feature cl1_2 only.
pub fn partition_max_sub_devices(&self) -> Result<u32>
cl1_2 only.Returns the maximum number of sub-devices that can be created when a device is partitioned. The value returned cannot exceed max_compute_units.
sourcepub fn partition_properties(&self) -> Result<Option<PartitionProperty>>
Available on crate feature cl1_2 only.
pub fn partition_properties(&self) -> Result<Option<PartitionProperty>>
cl1_2 only.Returns the list of partition types supported by device.
sourcepub fn pipe_support(&self) -> Result<bool>
Available on crate feature cl3 only.
pub fn pipe_support(&self) -> Result<bool>
cl3 only.Is true if the device supports pipes, and false otherwise. Devices that return true must also return true for generic_address_space_support.
sourcepub fn pipe_max_active_reservations(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn pipe_max_active_reservations(&self) -> Result<Option<NonZeroU32>>
cl2 only.The maximum number of reservations that can be active for a pipe per work-item in a kernel. A work-group reservation is counted as one reservation per work-item. The minimum value is 1 for devices supporting pipes, and must be 0 for devices that do not support pipes.
sourcepub fn pipe_max_packet_size(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn pipe_max_packet_size(&self) -> Result<Option<NonZeroU32>>
cl2 only.The maximum size of pipe packet in bytes. Support for pipes is required for an OpenCL 2.0, 2.1, or 2.2 device. The minimum value is 1024 bytes if the device supports pipes, and must be 0 for devices that do not support pipes.
sourcepub fn platform(&self) -> Result<RawPlatform>
pub fn platform(&self) -> Result<RawPlatform>
The platform associated with this device.
sourcepub fn preferred_interop_user_sync(&self) -> Result<bool>
Available on crate feature cl1_2 only.
pub fn preferred_interop_user_sync(&self) -> Result<bool>
cl1_2 only.Is true if the devices preference is for the user to be responsible for synchronization, when sharing memory objects between OpenCL and other APIs such as DirectX, false if the device / implementation has a performant path for performing synchronization of memory object shared between OpenCL and other APIs such as DirectX.
sourcepub fn preferred_platform_atomic_alignment(&self) -> Result<u32>
Available on crate feature cl2 only.
pub fn preferred_platform_atomic_alignment(&self) -> Result<u32>
cl2 only.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 fine-grained SVM atomic types. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
sourcepub fn preferred_global_atomic_alignment(&self) -> Result<u32>
Available on crate feature cl2 only.
pub fn preferred_global_atomic_alignment(&self) -> Result<u32>
cl2 only.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 atomic types to global memory. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
sourcepub fn preferred_local_atomic_alignment(&self) -> Result<u32>
Available on crate feature cl2 only.
pub fn preferred_local_atomic_alignment(&self) -> Result<u32>
cl2 only.Returns the value representing the preferred alignment in bytes for OpenCL 2.0 atomic types to local memory. This query can return 0 which indicates that the preferred alignment is aligned to the natural size of the type.
sourcepub fn preferred_vector_width_char(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_char(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_short(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_short(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_int(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_int(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_long(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_long(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_half(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_half(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_float(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_float(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector.
sourcepub fn preferred_vector_width_double(&self) -> Result<u32>
Available on crate feature cl1_1 only.
pub fn preferred_vector_width_double(&self) -> Result<u32>
cl1_1 only.Preferred native vector width size for built-in scalar types that can be put into vectors. The vector width is defined as the number of scalar elements that can be stored in the vector. if the cl_khr_fp64 extension is not supported, it must return 0.
sourcepub fn preferred_work_group_size_multiple(&self) -> Result<u32>
Available on crate feature cl3 only.
pub fn preferred_work_group_size_multiple(&self) -> Result<u32>
cl3 only.Returns the preferred multiple of work-group size for the given device. This is a performance hint intended as a guide when specifying the local work size argument to clEnqueueNDRangeKernel.
sourcepub fn printf_buffer_size(&self) -> Result<NonZeroUsize>
Available on crate feature cl1_2 only.
pub fn printf_buffer_size(&self) -> Result<NonZeroUsize>
cl1_2 only.Maximum size in bytes of the internal buffer that holds the output of printf calls from a kernel. The minimum value for the FULL profile is 1 MB.
sourcepub fn profile(&self) -> String
pub fn profile(&self) -> String
OpenCL profile string. Returns the profile name supported by the device (see note)
sourcepub fn profiling_timer_resolution(&self) -> Result<usize>
pub fn profiling_timer_resolution(&self) -> Result<usize>
Describes the resolution of device timer. This is measured in nanoseconds.
sourcepub fn queue_properties(&self) -> Result<CommandQueueProperties>
👎Deprecated: see queue_on_host_properties
pub fn queue_properties(&self) -> Result<CommandQueueProperties>
queue_on_host_propertiesDescribes the command-queue properties supported by the device.
sourcepub fn queue_on_device_properties(&self) -> Result<CommandQueueProperties>
Available on crate feature cl2 only.
pub fn queue_on_device_properties(&self) -> Result<CommandQueueProperties>
cl2 only.Describes the on device command-queue properties supported by the device.
sourcepub fn queue_on_device_max_size(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn queue_on_device_max_size(&self) -> Result<Option<NonZeroU32>>
cl2 only.The maximum size of the device queue in bytes. The minimum value is 256 KB for the full profile and 64 KB for the embedded profile for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
sourcepub fn queue_on_device_preferred_size(&self) -> Result<Option<NonZeroU32>>
Available on crate feature cl2 only.
pub fn queue_on_device_preferred_size(&self) -> Result<Option<NonZeroU32>>
cl2 only.The preferred size of the device queue, in bytes. Applications should use this size for the device queue to ensure good performance. The minimum value is 16 KB for devices supporting on-device queues, and must be 0 for devices that do not support on-device queues.
sourcepub fn queue_on_host_properties(&self) -> Result<CommandQueueProperties>
Available on crate feature cl2 only.
pub fn queue_on_host_properties(&self) -> Result<CommandQueueProperties>
cl2 only.Describes the on host command-queue properties supported by the device.
pub fn reference_count(&self) -> Result<u32>
cl1_2 only.sourcepub fn single_fp_config(&self) -> Result<FpConfig>
pub fn single_fp_config(&self) -> Result<FpConfig>
Describes single precision floating-point capability of the device.
pub fn sub_group_independent_forward_progress(&self) -> Result<bool>
cl2_1 only.sourcepub fn svm_capabilities(&self) -> Result<SvmCapability>
Available on crate feature cl2 only.
pub fn svm_capabilities(&self) -> Result<SvmCapability>
cl2 only.Describes the various shared virtual memory (SVM) memory allocation types the device supports.
sourcepub fn ty(&self) -> Result<DeviceType>
pub fn ty(&self) -> Result<DeviceType>
The OpenCL device type.
sourcepub fn vendor_id(&self) -> Result<u32>
pub fn vendor_id(&self) -> Result<u32>
A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID.
sourcepub fn version_string(&self) -> Result<String>
pub fn version_string(&self) -> Result<String>
OpenCL version string.
sourcepub fn work_group_collective_functions_support(&self) -> Result<bool>
Available on crate feature cl3 only.
pub fn work_group_collective_functions_support(&self) -> Result<bool>
cl3 only.Is true if the device supports work-group collective functions (e.g. work_group_broadcast, work_group_reduce and work_group_scan), and false otherwise.
sourcepub fn driver_version_string(&self) -> Result<String>
pub fn driver_version_string(&self) -> Result<String>
OpenCL software driver version string in the form major_number.minor_number.
sourcepub fn driver_version(&self) -> Result<Version>
pub fn driver_version(&self) -> Result<Version>
OpenCL software driver version
sourcepub fn create_sub_devices(
&self,
prop: PartitionProperty
) -> Result<Vec<RawDevice>>
Available on crate feature cl1_2 only.
pub fn create_sub_devices( &self, prop: PartitionProperty ) -> Result<Vec<RawDevice>>
cl1_2 only.Creates an array of sub-devices that each reference a non-intersecting set of compute units within in_device, according to the partition scheme given by properties.
The output sub-devices may be used in every way that the root (or parent) device can be used, including creating contexts, building programs, further calls to create_sub_devices and creating command-queues.
When a command-queue is created against a sub-device, the commands enqueued on the queue are executed only on the sub-device.
sourcepub fn set_default_command_queue(
&self,
ctx: RawContext,
queue: RawCommandQueue
) -> Result<()>
Available on crate feature cl2_1 only.
pub fn set_default_command_queue( &self, ctx: RawContext, queue: RawCommandQueue ) -> Result<()>
cl2_1 only.Replaces the default command queue on the device.
sourcepub fn device_and_host_timer_nanos(&self) -> Result<[u64; 2]>
Available on crate feature cl2_1 only.
pub fn device_and_host_timer_nanos(&self) -> Result<[u64; 2]>
cl2_1 only.Query synchronized host and device timestamps.
sourcepub fn device_and_host_timer(&self) -> Result<(SystemTime, SystemTime)>
Available on crate feature cl2_1 only.
pub fn device_and_host_timer(&self) -> Result<(SystemTime, SystemTime)>
cl2_1 only.Query synchronized host and device timestamps.
sourcepub fn host_clock_nanos(&self) -> Result<u64>
Available on crate feature cl2_1 only.
pub fn host_clock_nanos(&self) -> Result<u64>
cl2_1 only.Query the host clock.
sourcepub fn host_clock(&self) -> Result<SystemTime>
Available on crate feature cl2_1 only.
pub fn host_clock(&self) -> Result<SystemTime>
cl2_1 only.Query the host clock.
pub fn has_f16(&self) -> Result<bool>
pub fn has_f64(&self) -> Result<bool>
pub fn all() -> &'static [RawDevice]
pub fn first() -> Option<&'static RawDevice>
pub unsafe fn retain(&self) -> Result<()>
cl1_2 only.