OpenCV453
クラス | 列挙型 | 関数
Initialization and Information

クラス

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

列挙型

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

関数

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

詳解

関数詳解

◆ convertFp16()

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

Converts an array to half precision floating number.

引数
_srcinput array.
_dstoutput array.
streamStream for the asynchronous version.
参照
convertFp16

◆ getCudaEnabledDeviceCount()

CV_EXPORTS_W 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.

◆ resetDevice()

CV_EXPORTS_W 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.

◆ setDevice()

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

Sets a device and initializes it for the current thread.

引数
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.