IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Pack2MaskPackType.h
Go to the documentation of this file.
1 // Pack2MaskPackType.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_PACK2MASKPACKTYPE_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_PACK2MASKPACKTYPE_H__
17 
20 
26 #include <IPSDKUtil/BaseTypes.h>
27 
28 namespace ipsdk {
29 namespace simd {
30 
33 
34 template <class PackT>
36 {
37 };
38 
39 template <>
41 {
43 };
44 
45 #define DEFINE_BASEPACK2BASEMASKPACKTYPE(packType, dataType) \
46 template <> \
47 struct Pack2MaskPackType<BasePack<packType, dataType> > \
48 { \
49  typedef BaseMaskPack<packType, dataType> Type; \
50 };
51 
52 #define DEFINE_PACK2MASKPACKTYPE(is, dataType) \
53 template <> \
54 struct Pack2MaskPackType<Pack<is, dataType> > \
55 { \
56  typedef MaskPack<is, dataType> Type; \
57 };
58 
59 //DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipInt8)
60 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipUInt8)
61 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipInt16)
62 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipUInt16)
63 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipInt32)
64 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipUInt32)
65 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipInt64)
66 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipUInt64)
67 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipReal32)
68 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Scalar, ipReal64)
69 
70 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipInt8)
71 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipUInt8)
72 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipInt16)
73 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipUInt16)
74 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipInt32)
75 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipUInt32)
76 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipInt64)
77 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipUInt64)
78 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipReal32)
79 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Standard, ipReal64)
80 
81 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipInt8)
82 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipUInt8)
83 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipInt16)
84 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipUInt16)
85 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipInt32)
86 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipUInt32)
87 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipInt64)
88 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipUInt64)
89 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipReal32)
90 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Sse, ipReal64)
91 
92 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipInt8)
93 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipUInt8)
94 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipInt16)
95 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipUInt16)
96 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipInt32)
97 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipUInt32)
98 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipInt64)
99 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipUInt64)
100 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipReal32)
101 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Sse2, ipReal64)
102 
103 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipInt8)
104 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipUInt8)
105 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipInt16)
106 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipUInt16)
107 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipInt32)
108 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipUInt32)
109 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipInt64)
110 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipUInt64)
111 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipReal32)
112 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx, ipReal64)
113 
114 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipInt8)
115 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipUInt8)
116 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipInt16)
117 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipUInt16)
118 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipInt32)
119 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipUInt32)
120 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipInt64)
121 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipUInt64)
122 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipReal32)
123 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx, ipReal64)
124 
125 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipInt8)
126 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipUInt8)
127 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipInt16)
128 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipUInt16)
129 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipInt32)
130 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipUInt32)
131 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipInt64)
132 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipUInt64)
133 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipReal32)
134 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx2, ipReal64)
135 
136 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipInt8)
137 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipUInt8)
138 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipInt16)
139 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipUInt16)
140 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipInt32)
141 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipUInt32)
142 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipInt64)
143 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipUInt64)
144 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipReal32)
145 DEFINE_BASEPACK2BASEMASKPACKTYPE(ePackType::ePT_Avx512, ipReal64)
146 
147 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipInt8)
148 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipUInt8)
149 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipInt16)
150 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipUInt16)
151 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipInt32)
152 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipUInt32)
153 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipInt64)
154 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipUInt64)
155 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipReal32)
156 DEFINE_PACK2MASKPACKTYPE(eInstructionSet::eIS_Avx512, ipReal64)
157 
158 
161 } // end of namespace simd
162 } // end of namespace ipsdk
163 
164 #endif // __IPSDKUTIL_INSTRUCTIONSET_PACK2MASKPACKTYPE_H__
int8_t ipInt8
Base types definition.
Definition: BaseTypes.h:48
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
structure containing set of masks for vectorized operations
Definition: BaseMaskPackDecl.h:29
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
packs of avx512 registers (ex.: Packs of __m512)
Definition: PackTypes.h:45
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
int32_t ipInt32
Base types definition.
Definition: BaseTypes.h:52
(including fundation and byte and word instructions)
Definition: InstructionSetTypes.h:51
Definition: Pack2MaskPackType.h:35
int16_t ipInt16
Base types definition.
Definition: BaseTypes.h:50
uint8_t ipUInt8
Base types definition.
Definition: BaseTypes.h:49
Base types for multiplatform compatibility.
Advanced Vector Extensions.
Definition: InstructionSetTypes.h:44
ePackType
Enumerate describing a pack type.
Definition: PackTypes.h:35
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Predefined types associated to instruction set management.
Definition of import/export macro for library.
packs of scalars
Definition: PackTypes.h:39
packs of avx/avx2 registers (ex.: Packs of __m256i)
Definition: PackTypes.h:43
int64_t ipInt64
Base types definition.
Definition: BaseTypes.h:54
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
compiler optimisations only
Definition: InstructionSetTypes.h:34
simd::Pack types
uint16_t ipUInt16
Base types definition.
Definition: BaseTypes.h:51
packs of sse/sse2 registers (ex.: Packs of __m128i)
Definition: PackTypes.h:41
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53
structure containing intrinsic registers used to store vectorized data
Definition: BasePackDecl.h:29