Initialization and Information#

Detailed Description#

Classes#

Name

Description

class cv::cuda::DeviceInfo

Class providing functionality for querying the specified GPU properties. View details

class cv::cuda::TargetArchs

Class providing a set of static methods to check what NVIDIA* card architecture the CUDA module was built for. View details

Enumerations#

Enumeration providing CUDA computing features. View details

Enumeration Type Documentation#

FeatureSet#

enum cv::cuda::FeatureSet

#include <opencv2/core/cuda.hpp>

Enumeration providing CUDA computing features.

Enumerator:

FEATURE_SET_COMPUTE_10
Python: cv.cuda.FEATURE_SET_COMPUTE_10

FEATURE_SET_COMPUTE_11
Python: cv.cuda.FEATURE_SET_COMPUTE_11

FEATURE_SET_COMPUTE_12
Python: cv.cuda.FEATURE_SET_COMPUTE_12

FEATURE_SET_COMPUTE_13
Python: cv.cuda.FEATURE_SET_COMPUTE_13

FEATURE_SET_COMPUTE_20
Python: cv.cuda.FEATURE_SET_COMPUTE_20

FEATURE_SET_COMPUTE_21
Python: cv.cuda.FEATURE_SET_COMPUTE_21

FEATURE_SET_COMPUTE_30
Python: cv.cuda.FEATURE_SET_COMPUTE_30

FEATURE_SET_COMPUTE_32
Python: cv.cuda.FEATURE_SET_COMPUTE_32

FEATURE_SET_COMPUTE_35
Python: cv.cuda.FEATURE_SET_COMPUTE_35

FEATURE_SET_COMPUTE_50
Python: cv.cuda.FEATURE_SET_COMPUTE_50

GLOBAL_ATOMICS
Python: cv.cuda.GLOBAL_ATOMICS

SHARED_ATOMICS
Python: cv.cuda.SHARED_ATOMICS

NATIVE_DOUBLE
Python: cv.cuda.NATIVE_DOUBLE

WARP_SHUFFLE_FUNCTIONS
Python: cv.cuda.WARP_SHUFFLE_FUNCTIONS

DYNAMIC_PARALLELISM
Python: cv.cuda.DYNAMIC_PARALLELISM

Function Documentation#

deviceSupports()#

bool cv::cuda::deviceSupports(FeatureSet feature_set)

#include <opencv2/core/cuda.hpp>

checks whether current device supports the given feature

getCudaEnabledDeviceCount()#

int cv::cuda::getCudaEnabledDeviceCount()

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.getCudaEnabledDeviceCount() -> retval

Returns the number of installed CUDA-enabled devices.

Use this function before any other CUDA functions calls. If OpenCV is compiled without CUDA support, this function returns 0. If the CUDA driver is not installed, or is incompatible, this function returns -1.

getDevice()#

int cv::cuda::getDevice()

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.getDevice() -> retval

Returns the current device index set by cuda::setDevice or initialized by default.

printCudaDeviceInfo()#

void cv::cuda::printCudaDeviceInfo(int device)

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.printCudaDeviceInfo(device)

printShortCudaDeviceInfo()#

void cv::cuda::printShortCudaDeviceInfo(int device)

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.printShortCudaDeviceInfo(device)

resetDevice()#

void cv::cuda::resetDevice()

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.resetDevice()

Explicitly destroys and cleans up all resources associated with the current device in the current process.

Any subsequent API call to this device will reinitialize the device.

setDevice()#

void cv::cuda::setDevice(int device)

#include <opencv2/core/cuda.hpp>

Python:

cv.cuda.setDevice(device)

Sets a device and initializes it for the current thread.

If the call of this function is omitted, a default device is initialized at the fist CUDA usage.

Parameters

  • device — System index of a CUDA device starting with 0.