1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
5 #ifndef OPENCV_DNN_SRC_CUDA_LIMITS_HPP
6 #define OPENCV_DNN_SRC_CUDA_LIMITS_HPP
8 #include <cuda_runtime.h>
13 namespace cv { namespace dnn { namespace cuda4dnn { namespace csl { namespace device {
16 struct numeric_limits;
19 struct numeric_limits<__half> {
20 __device__ static __half min() { return 0.0000610; }
21 __device__ static __half max() { return 65504.0; }
22 __device__ static __half lowest() { return -65504.0; }
26 struct numeric_limits<float> {
27 __device__ static float min() { return FLT_MIN; }
28 __device__ static float max() { return FLT_MAX; }
29 __device__ static float lowest() { return -FLT_MAX; }
32 }}}}} /* namespace cv::dnn::cuda4dnn::csl::device */
34 #endif /* OPENCV_DNN_SRC_CUDA_LIMITS_HPP */