IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MinRegDecl.h
1 // MinRegDecl.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE2_MINREGDECL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE2_MINREGDECL_H__
17 
22 
23 #include <boost/mpl/contains.hpp>
24 #include <boost/mpl/vector.hpp>
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 
34 
35 typedef boost::mpl::vector<ipUInt8, ipInt16, ipReal32> SpecificTypesForSSE2MinRegImpl;
36 
37 template <typename T>
38 struct MinReg<
40  T,
41  typename boost::enable_if<typename boost::mpl::not_<typename boost::mpl::contains<SpecificTypesForSSE2MinRegImpl, T>::type>::type>::type
42 >
43 {
44  static
45  IPSDK_FORCEINLINE
46  typename Sse2Type<T>::Type
47  act(const typename Sse2Type<T>::Type& in1,
48  const typename Sse2Type<T>::Type& in2);
49 
50  static
51  IPSDK_FORCEINLINE
52  void
53  act(const typename Sse2Type<T>::Type& in1,
54  const typename Sse2Type<T>::Type& in2,
55  typename Sse2Type<T>::Type& out);
56 };
57 
60 template <>
62 {
63  static
64  IPSDK_FORCEINLINE
66  act(const Sse2Type<ipUInt8>::Type& in1,
67  const Sse2Type<ipUInt8>::Type& in2);
68 
69  static
70  IPSDK_FORCEINLINE
71  void
72  act(const Sse2Type<ipUInt8>::Type& in1,
73  const Sse2Type<ipUInt8>::Type& in2,
75 };
76 
79 template <>
81 {
82  static
83  IPSDK_FORCEINLINE
85  act(const Sse2Type<ipUInt16>::Type& in1,
86  const Sse2Type<ipUInt16>::Type& in2);
87 
88  static
89  IPSDK_FORCEINLINE
90  void
91  act(const Sse2Type<ipUInt16>::Type& in1,
92  const Sse2Type<ipUInt16>::Type& in2,
94 };
95 
98 template <>
100 {
101  static
102  IPSDK_FORCEINLINE
104  act(const Sse2Type<ipReal32>::Type& in1,
105  const Sse2Type<ipReal32>::Type& in2);
106 
107  static
108  IPSDK_FORCEINLINE
109  void
110  act(const Sse2Type<ipReal32>::Type& in1,
111  const Sse2Type<ipReal32>::Type& in2,
113 };
114 
117 
118 } // end of namespace detail
119 } // end of namespace simd
120 } // end of namespace ipsdk
121 
122 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE2_MINREGDECL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: MinRegDecl.h:29
template structure which is specialized to implement the minimum computation on 2 scalars or 2 regist...
int16_t ipInt16
Base types definition.
Definition: BaseTypes.h:50
uint8_t ipUInt8
Base types definition.
Definition: BaseTypes.h:49
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Predefined types for Sse2 instruction set management.
Definition of import/export macro for library.
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
structure used to retrieve SSE2 type associated to a base type
Definition: Sse2Types.h:32
float ipReal32
Base types definition.
Definition: BaseTypes.h:56