OpenCV  3.4.20-dev
Open Source Computer Vision
Classes | Enumerations | Functions
Initialization and Information

Classes

class  cv::cuda::DeviceInfo
 Class providing functionality for querying the specified GPU properties. More...
 
class  cv::cuda::TargetArchs
 Class providing a set of static methods to check what NVIDIA* card architecture the CUDA module was built for. More...
 

Enumerations

enum  cv::cuda::FeatureSet {
  cv::cuda::FEATURE_SET_COMPUTE_10 = 10,
  cv::cuda::FEATURE_SET_COMPUTE_11 = 11,
  cv::cuda::FEATURE_SET_COMPUTE_12 = 12,
  cv::cuda::FEATURE_SET_COMPUTE_13 = 13,
  cv::cuda::FEATURE_SET_COMPUTE_20 = 20,
  cv::cuda::FEATURE_SET_COMPUTE_21 = 21,
  cv::cuda::FEATURE_SET_COMPUTE_30 = 30,
  cv::cuda::FEATURE_SET_COMPUTE_32 = 32,
  cv::cuda::FEATURE_SET_COMPUTE_35 = 35,
  cv::cuda::FEATURE_SET_COMPUTE_50 = 50,
  cv::cuda::GLOBAL_ATOMICS = FEATURE_SET_COMPUTE_11,
  cv::cuda::SHARED_ATOMICS = FEATURE_SET_COMPUTE_12,
  cv::cuda::NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13,
  cv::cuda::WARP_SHUFFLE_FUNCTIONS = FEATURE_SET_COMPUTE_30,
  cv::cuda::DYNAMIC_PARALLELISM = FEATURE_SET_COMPUTE_35
}
 Enumeration providing CUDA computing features. More...
 

Functions

void cv::cuda::convertFp16 (InputArray _src, OutputArray _dst, Stream &stream=Stream::Null())
 Converts an array to half precision floating number. More...
 
bool cv::cuda::deviceSupports (FeatureSet feature_set)
 checks whether current device supports the given feature More...
 
int cv::cuda::getCudaEnabledDeviceCount ()
 Returns the number of installed CUDA-enabled devices. More...
 
int cv::cuda::getDevice ()
 Returns the current device index set by cuda::setDevice or initialized by default. More...
 
void cv::cuda::printCudaDeviceInfo (int device)
 
void cv::cuda::printShortCudaDeviceInfo (int device)
 
void cv::cuda::resetDevice ()
 Explicitly destroys and cleans up all resources associated with the current device in the current process. More...
 
void cv::cuda::setDevice (int device)
 Sets a device and initializes it for the current thread. More...
 

Detailed Description

Enumeration Type Documentation

◆ 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

◆ convertFp16()

void cv::cuda::convertFp16 ( InputArray  _src,
OutputArray  _dst,
Stream stream = Stream::Null() 
)

#include <opencv2/core/cuda.hpp>

Converts an array to half precision floating number.

Parameters
_srcinput array.
_dstoutput array.
streamStream for the asynchronous version.
See also
convertFp16

◆ 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>

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.

Examples:
samples/cpp/stitching_detailed.cpp.

◆ getDevice()

int cv::cuda::getDevice ( )

#include <opencv2/core/cuda.hpp>

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

◆ printCudaDeviceInfo()

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

◆ printShortCudaDeviceInfo()

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

◆ resetDevice()

void cv::cuda::resetDevice ( )

#include <opencv2/core/cuda.hpp>

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>

Sets a device and initializes it for the current thread.

Parameters
deviceSystem index of a CUDA device starting with 0.

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