pub struct DeviceInfo { /* private fields */ }Expand description
Class providing functionality for querying the specified GPU properties.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn default() -> Result<DeviceInfo>
pub fn default() -> Result<DeviceInfo>
creates DeviceInfo object for the current GPU
Trait Implementations§
Source§impl Boxed for DeviceInfo
impl Boxed for DeviceInfo
Source§unsafe fn from_raw(ptr: <DeviceInfo as OpenCVFromExtern>::ExternReceive) -> Self
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
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
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
fn as_raw_mut( &mut self, ) -> <DeviceInfo as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Debug for DeviceInfo
impl Debug for DeviceInfo
Source§impl DeviceInfoTrait for DeviceInfo
impl DeviceInfoTrait for DeviceInfo
fn as_raw_mut_DeviceInfo(&mut self) -> *mut c_void
Source§impl DeviceInfoTraitConst for DeviceInfo
impl DeviceInfoTraitConst for DeviceInfo
fn as_raw_DeviceInfo(&self) -> *const c_void
Source§fn total_global_mem(&self) -> Result<size_t>
fn total_global_mem(&self) -> Result<size_t>
global memory available on device in bytes
shared memory available per block in bytes
Source§fn regs_per_block(&self) -> Result<i32>
fn regs_per_block(&self) -> Result<i32>
32-bit registers available per block
Source§fn max_threads_per_block(&self) -> Result<i32>
fn max_threads_per_block(&self) -> Result<i32>
maximum number of threads per block
Source§fn max_threads_dim(&self) -> Result<Vec3i>
fn max_threads_dim(&self) -> Result<Vec3i>
maximum size of each dimension of a block
Source§fn max_grid_size(&self) -> Result<Vec3i>
fn max_grid_size(&self) -> Result<Vec3i>
maximum size of each dimension of a grid
Source§fn clock_rate(&self) -> Result<i32>
fn clock_rate(&self) -> Result<i32>
clock frequency in kilohertz
Source§fn total_const_mem(&self) -> Result<size_t>
fn total_const_mem(&self) -> Result<size_t>
constant memory available on device in bytes
Source§fn major_version(&self) -> Result<i32>
fn major_version(&self) -> Result<i32>
major compute capability
Source§fn minor_version(&self) -> Result<i32>
fn minor_version(&self) -> Result<i32>
minor compute capability
Source§fn texture_alignment(&self) -> Result<size_t>
fn texture_alignment(&self) -> Result<size_t>
alignment requirement for textures
Source§fn texture_pitch_alignment(&self) -> Result<size_t>
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>
fn multi_processor_count(&self) -> Result<i32>
number of multiprocessors on device
Source§fn kernel_exec_timeout_enabled(&self) -> Result<bool>
fn kernel_exec_timeout_enabled(&self) -> Result<bool>
specified whether there is a run time limit on kernels
Source§fn integrated(&self) -> Result<bool>
fn integrated(&self) -> Result<bool>
device is integrated as opposed to discrete
Source§fn can_map_host_memory(&self) -> Result<bool>
fn can_map_host_memory(&self) -> Result<bool>
device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer
Source§fn compute_mode(&self) -> Result<DeviceInfo_ComputeMode>
fn compute_mode(&self) -> Result<DeviceInfo_ComputeMode>
compute mode
Source§fn max_texture1_d(&self) -> Result<i32>
fn max_texture1_d(&self) -> Result<i32>
maximum 1D texture size
Source§fn max_texture1_d_mipmap(&self) -> Result<i32>
fn max_texture1_d_mipmap(&self) -> Result<i32>
maximum 1D mipmapped texture size
Source§fn max_texture1_d_linear(&self) -> Result<i32>
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>
fn max_texture_2d(&self) -> Result<Vec2i>
maximum 2D texture dimensions
Source§fn max_texture_2d_mipmap(&self) -> Result<Vec2i>
fn max_texture_2d_mipmap(&self) -> Result<Vec2i>
maximum 2D mipmapped texture dimensions
Source§fn max_texture_2d_linear(&self) -> Result<Vec3i>
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>
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>
fn max_texture_3d(&self) -> Result<Vec3i>
maximum 3D texture dimensions
Source§fn max_texture_cubemap(&self) -> Result<i32>
fn max_texture_cubemap(&self) -> Result<i32>
maximum Cubemap texture dimensions
Source§fn max_texture1_d_layered(&self) -> Result<Vec2i>
fn max_texture1_d_layered(&self) -> Result<Vec2i>
maximum 1D layered texture dimensions
Source§fn max_texture_2d_layered(&self) -> Result<Vec3i>
fn max_texture_2d_layered(&self) -> Result<Vec3i>
maximum 2D layered texture dimensions
Source§fn max_texture_cubemap_layered(&self) -> Result<Vec2i>
fn max_texture_cubemap_layered(&self) -> Result<Vec2i>
maximum Cubemap layered texture dimensions
Source§fn max_surface1_d(&self) -> Result<i32>
fn max_surface1_d(&self) -> Result<i32>
maximum 1D surface size
Source§fn max_surface_2d(&self) -> Result<Vec2i>
fn max_surface_2d(&self) -> Result<Vec2i>
maximum 2D surface dimensions
Source§fn max_surface_3d(&self) -> Result<Vec3i>
fn max_surface_3d(&self) -> Result<Vec3i>
maximum 3D surface dimensions
Source§fn max_surface1_d_layered(&self) -> Result<Vec2i>
fn max_surface1_d_layered(&self) -> Result<Vec2i>
maximum 1D layered surface dimensions
Source§fn max_surface_2d_layered(&self) -> Result<Vec3i>
fn max_surface_2d_layered(&self) -> Result<Vec3i>
maximum 2D layered surface dimensions
Source§fn max_surface_cubemap(&self) -> Result<i32>
fn max_surface_cubemap(&self) -> Result<i32>
maximum Cubemap surface dimensions
Source§fn max_surface_cubemap_layered(&self) -> Result<Vec2i>
fn max_surface_cubemap_layered(&self) -> Result<Vec2i>
maximum Cubemap layered surface dimensions
Source§fn surface_alignment(&self) -> Result<size_t>
fn surface_alignment(&self) -> Result<size_t>
alignment requirements for surfaces
Source§fn concurrent_kernels(&self) -> Result<bool>
fn concurrent_kernels(&self) -> Result<bool>
device can possibly execute multiple kernels concurrently
Source§fn ecc_enabled(&self) -> Result<bool>
fn ecc_enabled(&self) -> Result<bool>
device has ECC support enabled
Source§fn pci_bus_id(&self) -> Result<i32>
fn pci_bus_id(&self) -> Result<i32>
PCI bus ID of the device
Source§fn pci_device_id(&self) -> Result<i32>
fn pci_device_id(&self) -> Result<i32>
PCI device ID of the device
Source§fn pci_domain_id(&self) -> Result<i32>
fn pci_domain_id(&self) -> Result<i32>
PCI domain ID of the device
Source§fn tcc_driver(&self) -> Result<bool>
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>
fn async_engine_count(&self) -> Result<i32>
number of asynchronous engines
Source§fn unified_addressing(&self) -> Result<bool>
fn unified_addressing(&self) -> Result<bool>
device shares a unified address space with the host
Source§fn memory_clock_rate(&self) -> Result<i32>
fn memory_clock_rate(&self) -> Result<i32>
peak memory clock frequency in kilohertz
Source§fn memory_bus_width(&self) -> Result<i32>
fn memory_bus_width(&self) -> Result<i32>
global memory bus width in bits
Source§fn l2_cache_size(&self) -> Result<i32>
fn l2_cache_size(&self) -> Result<i32>
size of L2 cache in bytes
Source§fn max_threads_per_multi_processor(&self) -> Result<i32>
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<()>
fn query_memory( &self, total_memory: &mut size_t, free_memory: &mut size_t, ) -> Result<()>
gets free and total device memory
fn free_memory(&self) -> Result<size_t>
fn total_memory(&self) -> Result<size_t>
Source§impl Drop for DeviceInfo
impl Drop for DeviceInfo
impl Send for DeviceInfo
Auto Trait Implementations§
impl !Sync for DeviceInfo
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
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