Skip to main content

DeviceInfo

Struct DeviceInfo 

Source
pub struct DeviceInfo { /* private fields */ }
Expand description

Class providing functionality for querying the specified GPU properties.

Implementations§

Source§

impl DeviceInfo

Source

pub fn default() -> Result<DeviceInfo>

creates DeviceInfo object for the current GPU

Source

pub fn new(device_id: i32) -> Result<DeviceInfo>

The constructors.

§Parameters
  • device_id: System index of the CUDA device starting with 0.

Constructs the DeviceInfo object for the specified device. If device_id parameter is missed, it constructs an object for the current device.

Trait Implementations§

Source§

impl Boxed for DeviceInfo

Source§

unsafe fn from_raw(ptr: <DeviceInfo as OpenCVFromExtern>::ExternReceive) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <DeviceInfo as OpenCVTypeExternContainer>::ExternSendMut

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

fn as_raw(&self) -> <DeviceInfo as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut( &mut self, ) -> <DeviceInfo as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl Debug for DeviceInfo

Source§

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

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

impl DeviceInfoTrait for DeviceInfo

Source§

impl DeviceInfoTraitConst for DeviceInfo

Source§

fn as_raw_DeviceInfo(&self) -> *const c_void

Source§

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

Returns system index of the CUDA device starting with 0.
Source§

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

ASCII string identifying device
Source§

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

global memory available on device in bytes
Source§

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

shared memory available per block in bytes
Source§

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

32-bit registers available per block
Source§

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

warp size in threads
Source§

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

maximum pitch in bytes allowed by memory copies
Source§

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

maximum number of threads per block
Source§

fn max_threads_dim(&self) -> Result<Vec3i>

maximum size of each dimension of a block
Source§

fn max_grid_size(&self) -> Result<Vec3i>

maximum size of each dimension of a grid
Source§

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

clock frequency in kilohertz
Source§

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

constant memory available on device in bytes
Source§

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

major compute capability
Source§

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

minor compute capability
Source§

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

alignment requirement for textures
Source§

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

pitch alignment requirement for texture references bound to pitched memory
Source§

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

number of multiprocessors on device
Source§

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

specified whether there is a run time limit on kernels
Source§

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

device is integrated as opposed to discrete
Source§

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

device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer
Source§

fn compute_mode(&self) -> Result<DeviceInfo_ComputeMode>

compute mode
Source§

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

maximum 1D texture size
Source§

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

maximum 1D mipmapped texture size
Source§

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

maximum size for 1D textures bound to linear memory
Source§

fn max_texture_2d(&self) -> Result<Vec2i>

maximum 2D texture dimensions
Source§

fn max_texture_2d_mipmap(&self) -> Result<Vec2i>

maximum 2D mipmapped texture dimensions
Source§

fn max_texture_2d_linear(&self) -> Result<Vec3i>

maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory
Source§

fn max_texture_2d_gather(&self) -> Result<Vec2i>

maximum 2D texture dimensions if texture gather operations have to be performed
Source§

fn max_texture_3d(&self) -> Result<Vec3i>

maximum 3D texture dimensions
Source§

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

maximum Cubemap texture dimensions
Source§

fn max_texture1_d_layered(&self) -> Result<Vec2i>

maximum 1D layered texture dimensions
Source§

fn max_texture_2d_layered(&self) -> Result<Vec3i>

maximum 2D layered texture dimensions
Source§

fn max_texture_cubemap_layered(&self) -> Result<Vec2i>

maximum Cubemap layered texture dimensions
Source§

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

maximum 1D surface size
Source§

fn max_surface_2d(&self) -> Result<Vec2i>

maximum 2D surface dimensions
Source§

fn max_surface_3d(&self) -> Result<Vec3i>

maximum 3D surface dimensions
Source§

fn max_surface1_d_layered(&self) -> Result<Vec2i>

maximum 1D layered surface dimensions
Source§

fn max_surface_2d_layered(&self) -> Result<Vec3i>

maximum 2D layered surface dimensions
Source§

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

maximum Cubemap surface dimensions
Source§

fn max_surface_cubemap_layered(&self) -> Result<Vec2i>

maximum Cubemap layered surface dimensions
Source§

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

alignment requirements for surfaces
Source§

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

device can possibly execute multiple kernels concurrently
Source§

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

device has ECC support enabled
Source§

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

PCI bus ID of the device
Source§

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

PCI device ID of the device
Source§

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

PCI domain ID of the device
Source§

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

true if device is a Tesla device using TCC driver, false otherwise
Source§

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

number of asynchronous engines
Source§

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

device shares a unified address space with the host
Source§

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

peak memory clock frequency in kilohertz
Source§

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

global memory bus width in bits
Source§

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

size of L2 cache in bytes
Source§

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

maximum resident threads per multiprocessor
Source§

fn query_memory( &self, total_memory: &mut size_t, free_memory: &mut size_t, ) -> Result<()>

gets free and total device memory
Source§

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

Source§

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

Source§

fn supports(&self, feature_set: FeatureSet) -> Result<bool>

Provides information on CUDA feature support. Read more
Source§

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

Checks the CUDA module and device compatibility. Read more
Source§

impl Drop for DeviceInfo

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for DeviceInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.