Struct opencv::core::Device

source ·
pub struct Device { /* private fields */ }

Implementations§

source§

impl Device

source

pub fn default() -> Device

source

pub unsafe fn new(d: *mut c_void) -> Result<Device>

source

pub fn copy(d: &Device) -> Result<Device>

source

pub fn copy_mut(d: Device) -> Device

source

pub fn get_default() -> Result<Device>

source

pub unsafe fn from_handle(d: *mut c_void) -> Result<Device>

Parameters
  • d: OpenCL handle (cl_device_id). clRetainDevice() is called on success.

Note: Ownership of the passed device is passed to OpenCV on success. The caller should additionally call clRetainDevice on it if it intends to continue using the device.

Trait Implementations§

source§

impl Boxed for Device

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Clone for Device

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Device

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Device

source§

fn default() -> Self

Forwards to infallible Self::default()

source§

impl DeviceTrait for Device

source§

fn as_raw_mut_Device(&mut self) -> *mut c_void

source§

unsafe fn set(&mut self, d: *mut c_void) -> Result<()>

source§

impl DeviceTraitConst for Device

source§

fn as_raw_Device(&self) -> *const c_void

source§

fn name(&self) -> Result<String>

source§

fn extensions(&self) -> Result<String>

source§

fn is_extension_supported(&self, extension_name: &str) -> Result<bool>

source§

fn version(&self) -> Result<String>

source§

fn vendor_name(&self) -> Result<String>

source§

fn opencl_c_version(&self) -> Result<String>

source§

fn opencl_version(&self) -> Result<String>

source§

fn device_version_major(&self) -> Result<i32>

source§

fn device_version_minor(&self) -> Result<i32>

source§

fn driver_version(&self) -> Result<String>

source§

fn ptr(&self) -> Result<*mut c_void>

source§

fn typ(&self) -> Result<i32>

source§

fn address_bits(&self) -> Result<i32>

source§

fn available(&self) -> Result<bool>

source§

fn compiler_available(&self) -> Result<bool>

source§

fn linker_available(&self) -> Result<bool>

source§

fn double_fp_config(&self) -> Result<i32>

source§

fn single_fp_config(&self) -> Result<i32>

source§

fn half_fp_config(&self) -> Result<i32>

source§

fn endian_little(&self) -> Result<bool>

source§

fn error_correction_support(&self) -> Result<bool>

source§

fn execution_capabilities(&self) -> Result<i32>

source§

fn global_mem_cache_size(&self) -> Result<size_t>

source§

fn global_mem_cache_type(&self) -> Result<i32>

source§

fn global_mem_cache_line_size(&self) -> Result<i32>

source§

fn global_mem_size(&self) -> Result<size_t>

source§

fn local_mem_size(&self) -> Result<size_t>

source§

fn local_mem_type(&self) -> Result<i32>

source§

fn host_unified_memory(&self) -> Result<bool>

source§

fn image_support(&self) -> Result<bool>

source§

fn image_from_buffer_support(&self) -> Result<bool>

source§

fn image_pitch_alignment(&self) -> Result<u32>

source§

fn image_base_address_alignment(&self) -> Result<u32>

source§

fn intel_subgroups_support(&self) -> Result<bool>

deprecated, use isExtensionSupported() method (probably with “cl_khr_subgroups” value)
source§

fn image2_d_max_width(&self) -> Result<size_t>

source§

fn image2_d_max_height(&self) -> Result<size_t>

source§

fn image3_d_max_width(&self) -> Result<size_t>

source§

fn image3_d_max_height(&self) -> Result<size_t>

source§

fn image3_d_max_depth(&self) -> Result<size_t>

source§

fn image_max_buffer_size(&self) -> Result<size_t>

source§

fn image_max_array_size(&self) -> Result<size_t>

source§

fn vendor_id(&self) -> Result<i32>

source§

fn is_amd(&self) -> Result<bool>

source§

fn is_intel(&self) -> Result<bool>

source§

fn is_n_vidia(&self) -> Result<bool>

source§

fn max_clock_frequency(&self) -> Result<i32>

source§

fn max_compute_units(&self) -> Result<i32>

source§

fn max_constant_args(&self) -> Result<i32>

source§

fn max_constant_buffer_size(&self) -> Result<size_t>

source§

fn max_mem_alloc_size(&self) -> Result<size_t>

source§

fn max_parameter_size(&self) -> Result<size_t>

source§

fn max_read_image_args(&self) -> Result<i32>

source§

fn max_write_image_args(&self) -> Result<i32>

source§

fn max_samplers(&self) -> Result<i32>

source§

fn max_work_group_size(&self) -> Result<size_t>

source§

fn max_work_item_dims(&self) -> Result<i32>

source§

fn max_work_item_sizes(&self, unnamed: &mut size_t) -> Result<()>

source§

fn mem_base_addr_align(&self) -> Result<i32>

source§

fn native_vector_width_char(&self) -> Result<i32>

source§

fn native_vector_width_short(&self) -> Result<i32>

source§

fn native_vector_width_int(&self) -> Result<i32>

source§

fn native_vector_width_long(&self) -> Result<i32>

source§

fn native_vector_width_float(&self) -> Result<i32>

source§

fn native_vector_width_double(&self) -> Result<i32>

source§

fn native_vector_width_half(&self) -> Result<i32>

source§

fn preferred_vector_width_char(&self) -> Result<i32>

source§

fn preferred_vector_width_short(&self) -> Result<i32>

source§

fn preferred_vector_width_int(&self) -> Result<i32>

source§

fn preferred_vector_width_long(&self) -> Result<i32>

source§

fn preferred_vector_width_float(&self) -> Result<i32>

source§

fn preferred_vector_width_double(&self) -> Result<i32>

source§

fn preferred_vector_width_half(&self) -> Result<i32>

source§

fn printf_buffer_size(&self) -> Result<size_t>

source§

fn profiling_timer_resolution(&self) -> Result<size_t>

source§

fn empty(&self) -> Result<bool>

source§

impl Drop for Device

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for Device

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.