Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of gr-peach-opencv-project-sd-card by
DeviceInfo Class Reference
[Initalization and Information]
Class providing functionality for querying the specified GPU properties. More...
#include <cuda.hpp>
Public Types | |
enum | ComputeMode { ComputeModeDefault, ComputeModeExclusive, ComputeModeProhibited, ComputeModeExclusiveProcess } |
Public Member Functions | |
DeviceInfo () | |
creates DeviceInfo object for the current GPU | |
DeviceInfo (int device_id) | |
The constructors. | |
int | deviceID () const |
Returns system index of the CUDA device starting with 0. | |
const char * | name () const |
ASCII string identifying device. | |
size_t | totalGlobalMem () const |
global memory available on device in bytes | |
size_t | sharedMemPerBlock () const |
shared memory available per block in bytes | |
int | regsPerBlock () const |
32-bit registers available per block | |
int | warpSize () const |
warp size in threads | |
size_t | memPitch () const |
maximum pitch in bytes allowed by memory copies | |
int | maxThreadsPerBlock () const |
maximum number of threads per block | |
Vec3i | maxThreadsDim () const |
maximum size of each dimension of a block | |
Vec3i | maxGridSize () const |
maximum size of each dimension of a grid | |
int | clockRate () const |
clock frequency in kilohertz | |
size_t | totalConstMem () const |
constant memory available on device in bytes | |
int | majorVersion () const |
major compute capability | |
int | minorVersion () const |
minor compute capability | |
size_t | textureAlignment () const |
alignment requirement for textures | |
size_t | texturePitchAlignment () const |
pitch alignment requirement for texture references bound to pitched memory | |
int | multiProcessorCount () const |
number of multiprocessors on device | |
bool | kernelExecTimeoutEnabled () const |
specified whether there is a run time limit on kernels | |
bool | integrated () const |
device is integrated as opposed to discrete | |
bool | canMapHostMemory () const |
device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer | |
ComputeMode | computeMode () const |
compute mode | |
int | maxTexture1D () const |
maximum 1D texture size | |
int | maxTexture1DMipmap () const |
maximum 1D mipmapped texture size | |
int | maxTexture1DLinear () const |
maximum size for 1D textures bound to linear memory | |
Vec2i | maxTexture2D () const |
maximum 2D texture dimensions | |
Vec2i | maxTexture2DMipmap () const |
maximum 2D mipmapped texture dimensions | |
Vec3i | maxTexture2DLinear () const |
maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory | |
Vec2i | maxTexture2DGather () const |
maximum 2D texture dimensions if texture gather operations have to be performed | |
Vec3i | maxTexture3D () const |
maximum 3D texture dimensions | |
int | maxTextureCubemap () const |
maximum Cubemap texture dimensions | |
Vec2i | maxTexture1DLayered () const |
maximum 1D layered texture dimensions | |
Vec3i | maxTexture2DLayered () const |
maximum 2D layered texture dimensions | |
Vec2i | maxTextureCubemapLayered () const |
maximum Cubemap layered texture dimensions | |
int | maxSurface1D () const |
maximum 1D surface size | |
Vec2i | maxSurface2D () const |
maximum 2D surface dimensions | |
Vec3i | maxSurface3D () const |
maximum 3D surface dimensions | |
Vec2i | maxSurface1DLayered () const |
maximum 1D layered surface dimensions | |
Vec3i | maxSurface2DLayered () const |
maximum 2D layered surface dimensions | |
int | maxSurfaceCubemap () const |
maximum Cubemap surface dimensions | |
Vec2i | maxSurfaceCubemapLayered () const |
maximum Cubemap layered surface dimensions | |
size_t | surfaceAlignment () const |
alignment requirements for surfaces | |
bool | concurrentKernels () const |
device can possibly execute multiple kernels concurrently | |
bool | ECCEnabled () const |
device has ECC support enabled | |
int | pciBusID () const |
PCI bus ID of the device. | |
int | pciDeviceID () const |
PCI device ID of the device. | |
int | pciDomainID () const |
PCI domain ID of the device. | |
bool | tccDriver () const |
true if device is a Tesla device using TCC driver, false otherwise | |
int | asyncEngineCount () const |
number of asynchronous engines | |
bool | unifiedAddressing () const |
device shares a unified address space with the host | |
int | memoryClockRate () const |
peak memory clock frequency in kilohertz | |
int | memoryBusWidth () const |
global memory bus width in bits | |
int | l2CacheSize () const |
size of L2 cache in bytes | |
int | maxThreadsPerMultiProcessor () const |
maximum resident threads per multiprocessor | |
void | queryMemory (size_t &totalMemory, size_t &freeMemory) const |
gets free and total device memory | |
bool | supports (FeatureSet feature_set) const |
Provides information on CUDA feature support. | |
bool | isCompatible () const |
Checks the CUDA module and device compatibility. |
Detailed Description
Class providing functionality for querying the specified GPU properties.
Definition at line 629 of file cuda.hpp.
Member Enumeration Documentation
enum ComputeMode |
- Enumerator:
Constructor & Destructor Documentation
DeviceInfo | ( | ) |
creates DeviceInfo object for the current GPU
DeviceInfo | ( | int | device_id ) |
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.
Member Function Documentation
int asyncEngineCount | ( | ) | const |
number of asynchronous engines
Definition at line 826 of file cuda_info.cpp.
bool canMapHostMemory | ( | ) | const |
device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer
Definition at line 528 of file cuda_info.cpp.
int clockRate | ( | ) | const |
clock frequency in kilohertz
Definition at line 438 of file cuda_info.cpp.
DeviceInfo::ComputeMode computeMode | ( | ) | const |
compute mode
Definition at line 538 of file cuda_info.cpp.
bool concurrentKernels | ( | ) | const |
device can possibly execute multiple kernels concurrently
Definition at line 766 of file cuda_info.cpp.
int deviceID | ( | ) | const |
Returns system index of the CUDA device starting with 0.
bool ECCEnabled | ( | ) | const |
device has ECC support enabled
Definition at line 776 of file cuda_info.cpp.
bool integrated | ( | ) | const |
device is integrated as opposed to discrete
Definition at line 518 of file cuda_info.cpp.
bool isCompatible | ( | ) | const |
Checks the CUDA module and device compatibility.
This function returns true if the CUDA module can be run on the specified device. Otherwise, it returns false .
Definition at line 904 of file cuda_info.cpp.
bool kernelExecTimeoutEnabled | ( | ) | const |
specified whether there is a run time limit on kernels
Definition at line 508 of file cuda_info.cpp.
int l2CacheSize | ( | ) | const |
size of L2 cache in bytes
Definition at line 866 of file cuda_info.cpp.
int majorVersion | ( | ) | const |
major compute capability
Definition at line 458 of file cuda_info.cpp.
Vec3i maxGridSize | ( | ) | const |
maximum size of each dimension of a grid
Definition at line 428 of file cuda_info.cpp.
int maxSurface1D | ( | ) | const |
maximum 1D surface size
Definition at line 686 of file cuda_info.cpp.
Vec2i maxSurface1DLayered | ( | ) | const |
maximum 1D layered surface dimensions
Definition at line 716 of file cuda_info.cpp.
Vec2i maxSurface2D | ( | ) | const |
maximum 2D surface dimensions
Definition at line 696 of file cuda_info.cpp.
Vec3i maxSurface2DLayered | ( | ) | const |
maximum 2D layered surface dimensions
Definition at line 726 of file cuda_info.cpp.
Vec3i maxSurface3D | ( | ) | const |
maximum 3D surface dimensions
Definition at line 706 of file cuda_info.cpp.
int maxSurfaceCubemap | ( | ) | const |
maximum Cubemap surface dimensions
Definition at line 736 of file cuda_info.cpp.
Vec2i maxSurfaceCubemapLayered | ( | ) | const |
maximum Cubemap layered surface dimensions
Definition at line 746 of file cuda_info.cpp.
int maxTexture1D | ( | ) | const |
maximum 1D texture size
Definition at line 556 of file cuda_info.cpp.
Vec2i maxTexture1DLayered | ( | ) | const |
maximum 1D layered texture dimensions
Definition at line 656 of file cuda_info.cpp.
int maxTexture1DLinear | ( | ) | const |
maximum size for 1D textures bound to linear memory
Definition at line 581 of file cuda_info.cpp.
int maxTexture1DMipmap | ( | ) | const |
maximum 1D mipmapped texture size
Definition at line 566 of file cuda_info.cpp.
Vec2i maxTexture2D | ( | ) | const |
maximum 2D texture dimensions
Definition at line 591 of file cuda_info.cpp.
Vec2i maxTexture2DGather | ( | ) | const |
maximum 2D texture dimensions if texture gather operations have to be performed
Definition at line 626 of file cuda_info.cpp.
Vec3i maxTexture2DLayered | ( | ) | const |
maximum 2D layered texture dimensions
Definition at line 666 of file cuda_info.cpp.
Vec3i maxTexture2DLinear | ( | ) | const |
maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory
Definition at line 616 of file cuda_info.cpp.
Vec2i maxTexture2DMipmap | ( | ) | const |
maximum 2D mipmapped texture dimensions
Definition at line 601 of file cuda_info.cpp.
Vec3i maxTexture3D | ( | ) | const |
maximum 3D texture dimensions
Definition at line 636 of file cuda_info.cpp.
int maxTextureCubemap | ( | ) | const |
maximum Cubemap texture dimensions
Definition at line 646 of file cuda_info.cpp.
Vec2i maxTextureCubemapLayered | ( | ) | const |
maximum Cubemap layered texture dimensions
Definition at line 676 of file cuda_info.cpp.
Vec3i maxThreadsDim | ( | ) | const |
maximum size of each dimension of a block
Definition at line 418 of file cuda_info.cpp.
int maxThreadsPerBlock | ( | ) | const |
maximum number of threads per block
Definition at line 408 of file cuda_info.cpp.
int maxThreadsPerMultiProcessor | ( | ) | const |
maximum resident threads per multiprocessor
Definition at line 876 of file cuda_info.cpp.
int memoryBusWidth | ( | ) | const |
global memory bus width in bits
Definition at line 856 of file cuda_info.cpp.
int memoryClockRate | ( | ) | const |
peak memory clock frequency in kilohertz
Definition at line 846 of file cuda_info.cpp.
size_t memPitch | ( | ) | const |
maximum pitch in bytes allowed by memory copies
Definition at line 398 of file cuda_info.cpp.
int minorVersion | ( | ) | const |
minor compute capability
Definition at line 468 of file cuda_info.cpp.
int multiProcessorCount | ( | ) | const |
number of multiprocessors on device
Definition at line 498 of file cuda_info.cpp.
const char * name | ( | ) | const |
ASCII string identifying device.
Definition at line 348 of file cuda_info.cpp.
int pciBusID | ( | ) | const |
PCI bus ID of the device.
Definition at line 786 of file cuda_info.cpp.
int pciDeviceID | ( | ) | const |
PCI device ID of the device.
Definition at line 796 of file cuda_info.cpp.
int pciDomainID | ( | ) | const |
PCI domain ID of the device.
Definition at line 806 of file cuda_info.cpp.
void queryMemory | ( | size_t & | totalMemory, |
size_t & | freeMemory | ||
) | const |
gets free and total device memory
Definition at line 886 of file cuda_info.cpp.
int regsPerBlock | ( | ) | const |
32-bit registers available per block
Definition at line 378 of file cuda_info.cpp.
size_t sharedMemPerBlock | ( | ) | const |
shared memory available per block in bytes
Definition at line 368 of file cuda_info.cpp.
bool supports | ( | FeatureSet | feature_set ) | const |
Provides information on CUDA feature support.
- Parameters:
-
feature_set Features to be checked. See cuda::FeatureSet.
This function returns true if the device has the specified CUDA feature. Otherwise, it returns false
size_t surfaceAlignment | ( | ) | const |
alignment requirements for surfaces
Definition at line 756 of file cuda_info.cpp.
bool tccDriver | ( | ) | const |
true if device is a Tesla device using TCC driver, false otherwise
Definition at line 816 of file cuda_info.cpp.
size_t textureAlignment | ( | ) | const |
alignment requirement for textures
Definition at line 478 of file cuda_info.cpp.
size_t texturePitchAlignment | ( | ) | const |
pitch alignment requirement for texture references bound to pitched memory
Definition at line 488 of file cuda_info.cpp.
size_t totalConstMem | ( | ) | const |
constant memory available on device in bytes
Definition at line 448 of file cuda_info.cpp.
size_t totalGlobalMem | ( | ) | const |
global memory available on device in bytes
Definition at line 358 of file cuda_info.cpp.
bool unifiedAddressing | ( | ) | const |
device shares a unified address space with the host
Definition at line 836 of file cuda_info.cpp.
int warpSize | ( | ) | const |
warp size in threads
Definition at line 388 of file cuda_info.cpp.
Generated on Tue Jul 12 2022 14:48:02 by
