class cv::cuda::DeviceInfo

Overview

Class providing functionality for querying the specified GPU properties. Moreā€¦

#include <cuda.hpp>

class DeviceInfo
{
public:
    // enums

    enum ComputeMode;

    // construction

    DeviceInfo();
    DeviceInfo(int device_id);

    // methods

    int
    asyncEngineCount() const;

    bool
    canMapHostMemory() const;

    int
    clockRate() const;

    ComputeMode
    computeMode() const;

    bool
    concurrentKernels() const;

    int
    deviceID() const;

    bool
    ECCEnabled() const;

    size_t
    freeMemory() const;

    bool
    integrated() const;

    bool
    isCompatible() const;

    bool
    kernelExecTimeoutEnabled() const;

    int
    l2CacheSize() const;

    int
    majorVersion() const;

    Vec3i
    maxGridSize() const;

    int
    maxSurface1D() const;

    Vec2i
    maxSurface1DLayered() const;

    Vec2i
    maxSurface2D() const;

    Vec3i
    maxSurface2DLayered() const;

    Vec3i
    maxSurface3D() const;

    int
    maxSurfaceCubemap() const;

    Vec2i
    maxSurfaceCubemapLayered() const;

    int
    maxTexture1D() const;

    Vec2i
    maxTexture1DLayered() const;

    int
    maxTexture1DLinear() const;

    int
    maxTexture1DMipmap() const;

    Vec2i
    maxTexture2D() const;

    Vec2i
    maxTexture2DGather() const;

    Vec3i
    maxTexture2DLayered() const;

    Vec3i
    maxTexture2DLinear() const;

    Vec2i
    maxTexture2DMipmap() const;

    Vec3i
    maxTexture3D() const;

    int
    maxTextureCubemap() const;

    Vec2i
    maxTextureCubemapLayered() const;

    Vec3i
    maxThreadsDim() const;

    int
    maxThreadsPerBlock() const;

    int
    maxThreadsPerMultiProcessor() const;

    int
    memoryBusWidth() const;

    int
    memoryClockRate() const;

    size_t
    memPitch() const;

    int
    minorVersion() const;

    int
    multiProcessorCount() const;

    const char*
    name() const;

    int
    pciBusID() const;

    int
    pciDeviceID() const;

    int
    pciDomainID() const;

    void
    queryMemory(
        size_t& totalMemory,
        size_t& freeMemory
        ) const;

    int
    regsPerBlock() const;

    size_t
    sharedMemPerBlock() const;

    bool
    supports(FeatureSet feature_set) const;

    size_t
    surfaceAlignment() const;

    bool
    tccDriver() const;

    size_t
    textureAlignment() const;

    size_t
    texturePitchAlignment() const;

    size_t
    totalConstMem() const;

    size_t
    totalGlobalMem() const;

    size_t
    totalMemory() const;

    bool
    unifiedAddressing() const;

    int
    warpSize() const;
};

Detailed Documentation

Class providing functionality for querying the specified GPU properties.

Construction

DeviceInfo()

creates DeviceInfo object for the current GPU

DeviceInfo(int device_id)

The constructors.

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

Parameters:

device_id System index of the CUDA device starting with 0.

Methods

int
asyncEngineCount() const

number of asynchronous engines

bool
canMapHostMemory() const

device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer

int
clockRate() const

clock frequency in kilohertz

ComputeMode
computeMode() const

compute mode

bool
concurrentKernels() const

device can possibly execute multiple kernels concurrently

int
deviceID() const

Returns system index of the CUDA device starting with 0.

bool
ECCEnabled() const

device has ECC support enabled

bool
integrated() const

device is integrated as opposed to discrete

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 .

bool
kernelExecTimeoutEnabled() const

specified whether there is a run time limit on kernels

int
l2CacheSize() const

size of L2 cache in bytes

int
majorVersion() const

major compute capability

Vec3i
maxGridSize() const

maximum size of each dimension of a grid

int
maxSurface1D() const

maximum 1D surface size

Vec2i
maxSurface1DLayered() const

maximum 1D layered surface dimensions

Vec2i
maxSurface2D() const

maximum 2D surface dimensions

Vec3i
maxSurface2DLayered() const

maximum 2D layered surface dimensions

Vec3i
maxSurface3D() const

maximum 3D surface dimensions

int
maxSurfaceCubemap() const

maximum Cubemap surface dimensions

Vec2i
maxSurfaceCubemapLayered() const

maximum Cubemap layered surface dimensions

int
maxTexture1D() const

maximum 1D texture size

Vec2i
maxTexture1DLayered() const

maximum 1D layered texture dimensions

int
maxTexture1DLinear() const

maximum size for 1D textures bound to linear memory

int
maxTexture1DMipmap() const

maximum 1D mipmapped texture size

Vec2i
maxTexture2D() const

maximum 2D texture dimensions

Vec2i
maxTexture2DGather() const

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

Vec3i
maxTexture2DLayered() const

maximum 2D layered texture dimensions

Vec3i
maxTexture2DLinear() const

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

Vec2i
maxTexture2DMipmap() const

maximum 2D mipmapped texture dimensions

Vec3i
maxTexture3D() const

maximum 3D texture dimensions

int
maxTextureCubemap() const

maximum Cubemap texture dimensions

Vec2i
maxTextureCubemapLayered() const

maximum Cubemap layered texture dimensions

Vec3i
maxThreadsDim() const

maximum size of each dimension of a block

int
maxThreadsPerBlock() const

maximum number of threads per block

int
maxThreadsPerMultiProcessor() const

maximum resident threads per multiprocessor

int
memoryBusWidth() const

global memory bus width in bits

int
memoryClockRate() const

peak memory clock frequency in kilohertz

size_t
memPitch() const

maximum pitch in bytes allowed by memory copies

int
minorVersion() const

minor compute capability

int
multiProcessorCount() const

number of multiprocessors on device

const char*
name() const

ASCII string identifying device.

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.

void
queryMemory(
    size_t& totalMemory,
    size_t& freeMemory
    ) const

gets free and total device memory

int
regsPerBlock() const

32-bit registers available per block

size_t
sharedMemPerBlock() const

shared memory available per block in bytes

bool
supports(FeatureSet feature_set) const

Provides information on CUDA feature support.

This function returns true if the device has the specified CUDA feature. Otherwise, it returns false

Parameters:

feature_set Features to be checked. See cuda::FeatureSet.
size_t
surfaceAlignment() const

alignment requirements for surfaces

bool
tccDriver() const

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

size_t
textureAlignment() const

alignment requirement for textures

size_t
texturePitchAlignment() const

pitch alignment requirement for texture references bound to pitched memory

size_t
totalConstMem() const

constant memory available on device in bytes

size_t
totalGlobalMem() const

global memory available on device in bytes

bool
unifiedAddressing() const

device shares a unified address space with the host

int
warpSize() const

warp size in threads