43 #ifndef OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP
44 #define OPENCV_CUDA_TYPE_TRAITS_DETAIL_HPP
46 #include "../common.hpp"
47 #include "../vec_traits.hpp"
51 namespace cv {
namespace cuda {
namespace device
53 namespace type_traits_detail
55 template <
bool,
typename T1,
typename T2>
struct Select {
typedef T1
type; };
56 template <
typename T1,
typename T2>
struct Select<false, T1, T2> {
typedef T2
type; };
58 template <
typename T>
struct IsSignedIntergral {
enum {
value = 0}; };
59 template <>
struct IsSignedIntergral<
schar> {
enum {
value = 1}; };
60 template <>
struct IsSignedIntergral<char1> {
enum {
value = 1}; };
61 template <>
struct IsSignedIntergral<short> {
enum {
value = 1}; };
62 template <>
struct IsSignedIntergral<short1> {
enum {
value = 1}; };
63 template <>
struct IsSignedIntergral<int> {
enum {
value = 1}; };
64 template <>
struct IsSignedIntergral<int1> {
enum {
value = 1}; };
66 template <
typename T>
struct IsUnsignedIntegral {
enum {
value = 0}; };
67 template <>
struct IsUnsignedIntegral<
uchar> {
enum {
value = 1}; };
68 template <>
struct IsUnsignedIntegral<uchar1> {
enum {
value = 1}; };
69 template <>
struct IsUnsignedIntegral<
ushort> {
enum {
value = 1}; };
70 template <>
struct IsUnsignedIntegral<ushort1> {
enum {
value = 1}; };
71 template <>
struct IsUnsignedIntegral<
uint> {
enum {
value = 1}; };
72 template <>
struct IsUnsignedIntegral<uint1> {
enum {
value = 1}; };
75 template <>
struct IsIntegral<char> {
enum {
value = 1}; };
76 template <>
struct IsIntegral<bool> {
enum {
value = 1}; };
78 template <
typename T>
struct IsFloat {
enum {
value = 0}; };
79 template <>
struct IsFloat<float> {
enum {
value = 1}; };
80 template <>
struct IsFloat<double> {
enum {
value = 1}; };
82 template <
typename T>
struct IsVec {
enum {
value = 0}; };
83 template <>
struct IsVec<uchar1> {
enum {
value = 1}; };
84 template <>
struct IsVec<uchar2> {
enum {
value = 1}; };
85 template <>
struct IsVec<uchar3> {
enum {
value = 1}; };
86 template <>
struct IsVec<uchar4> {
enum {
value = 1}; };
87 template <>
struct IsVec<uchar8> {
enum {
value = 1}; };
88 template <>
struct IsVec<char1> {
enum {
value = 1}; };
89 template <>
struct IsVec<char2> {
enum {
value = 1}; };
90 template <>
struct IsVec<char3> {
enum {
value = 1}; };
91 template <>
struct IsVec<char4> {
enum {
value = 1}; };
92 template <>
struct IsVec<char8> {
enum {
value = 1}; };
93 template <>
struct IsVec<ushort1> {
enum {
value = 1}; };
94 template <>
struct IsVec<ushort2> {
enum {
value = 1}; };
95 template <>
struct IsVec<ushort3> {
enum {
value = 1}; };
96 template <>
struct IsVec<ushort4> {
enum {
value = 1}; };
97 template <>
struct IsVec<ushort8> {
enum {
value = 1}; };
98 template <>
struct IsVec<short1> {
enum {
value = 1}; };
99 template <>
struct IsVec<short2> {
enum {
value = 1}; };
100 template <>
struct IsVec<short3> {
enum {
value = 1}; };
101 template <>
struct IsVec<short4> {
enum {
value = 1}; };
102 template <>
struct IsVec<short8> {
enum {
value = 1}; };
103 template <>
struct IsVec<uint1> {
enum {
value = 1}; };
104 template <>
struct IsVec<uint2> {
enum {
value = 1}; };
105 template <>
struct IsVec<uint3> {
enum {
value = 1}; };
106 template <>
struct IsVec<uint4> {
enum {
value = 1}; };
107 template <>
struct IsVec<uint8> {
enum {
value = 1}; };
108 template <>
struct IsVec<int1> {
enum {
value = 1}; };
109 template <>
struct IsVec<int2> {
enum {
value = 1}; };
110 template <>
struct IsVec<int3> {
enum {
value = 1}; };
111 template <>
struct IsVec<int4> {
enum {
value = 1}; };
112 template <>
struct IsVec<int8> {
enum {
value = 1}; };
113 template <>
struct IsVec<float1> {
enum {
value = 1}; };
114 template <>
struct IsVec<float2> {
enum {
value = 1}; };
115 template <>
struct IsVec<float3> {
enum {
value = 1}; };
116 template <>
struct IsVec<float4> {
enum {
value = 1}; };
117 template <>
struct IsVec<float8> {
enum {
value = 1}; };
118 template <>
struct IsVec<double1> {
enum {
value = 1}; };
119 template <>
struct IsVec<double2> {
enum {
value = 1}; };
120 template <>
struct IsVec<double3> {
enum {
value = 1}; };
121 template <>
struct IsVec<double4> {
enum {
value = 1}; };
122 template <>
struct IsVec<double8> {
enum {
value = 1}; };
124 template <
class U>
struct AddParameterType {
typedef const U&
type; };
125 template <
class U>
struct AddParameterType<
U&> {
typedef U&
type; };
126 template <>
struct AddParameterType<void> {
typedef void type; };
128 template <
class U>
struct ReferenceTraits
130 enum {
value =
false };
133 template <
class U>
struct ReferenceTraits<
U&>
135 enum {
value =
true };
139 template <
class U>
struct PointerTraits
141 enum {
value =
false };
144 template <
class U>
struct PointerTraits<
U*>
146 enum {
value =
true };
149 template <
class U>
struct PointerTraits<
U*&>
151 enum {
value =
true };
155 template <
class U>
struct UnConst
160 template <
class U>
struct UnConst<const
U>
165 template <
class U>
struct UnConst<const
U&>
171 template <
class U>
struct UnVolatile
176 template <
class U>
struct UnVolatile<volatile
U>
181 template <
class U>
struct UnVolatile<volatile
U&>
int CvScalar value
Definition: core_c.h:720
int int type
Definition: core_c.h:221
const CvArr * U
Definition: core_c.h:1340
signed char schar
Definition: interface.h:48
uint32_t uint
Definition: interface.h:42
unsigned char uchar
Definition: interface.h:51
unsigned short ushort
Definition: interface.h:52
"black box" representation of the file storage associated with a file on disk.
Definition: calib3d.hpp:441