Initalization and Information
Overview
// enums enum cv::cuda::FeatureSet; // classes class cv::cuda::DeviceInfo; class cv::cuda::TargetArchs; // global functions void cv::cuda::convertFp16( InputArray _src, OutputArray _dst, Stream& stream = Stream::Null() ); bool cv::cuda::deviceSupports(FeatureSet feature_set); int cv::cuda::getCudaEnabledDeviceCount(); int cv::cuda::getDevice(); void cv::cuda::printCudaDeviceInfo(int device); void cv::cuda::printShortCudaDeviceInfo(int device); void cv::cuda::resetDevice(); void cv::cuda::setDevice(int device);
Detailed Documentation
Global Functions
void cv::cuda::convertFp16( InputArray _src, OutputArray _dst, Stream& stream = Stream::Null() )
Converts an array to half precision floating number.
Parameters:
_src | input array. |
_dst | output array. |
stream | Stream for the asynchronous version. |
See also:
bool cv::cuda::deviceSupports(FeatureSet feature_set)
checks whether current device supports the given feature
int cv::cuda::getCudaEnabledDeviceCount()
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.
int cv::cuda::getDevice()
Returns the current device index set by cuda::setDevice or initialized by default.
void 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.
void cv::cuda::setDevice(int 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. |