IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ScatterRegDecl.h
1 // ScatterRegDecl.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_SCATTER_DETAIL_SSE2_SCATTERREGDECL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_SCATTER_DETAIL_SSE2_SCATTERREGDECL_H__
17 
23 
24 #include <boost/mpl/and.hpp>
25 #include <boost/mpl/equal_to.hpp>
26 #include <boost/mpl/int.hpp>
27 #include <boost/type_traits/is_same.hpp>
28 #include <boost/type_traits/is_signed.hpp>
29 
30 namespace ipsdk {
31 namespace simd {
32 namespace detail {
33 
36 
37 template <typename T>
39  typename boost::enable_if<
40  typename boost::mpl::and_<typename boost::is_integral<T>::type,
41  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<1> >::type
42  >::type
43  >::type
44 >
45 {
46  static
47  IPSDK_FORCEINLINE
48  void
49  act(const typename Sse2Type<T>::Type& in,
50  const ipUInt32* indexes,
51  T* const outBaseAddr);
52 
53  static
54  IPSDK_FORCEINLINE
55  void
56  act(const typename Sse2Type<T>::Type& in,
57  const typename Sse2Type<ipUInt32>::Type& indexes1,
58  const typename Sse2Type<ipUInt32>::Type& indexes2,
59  const typename Sse2Type<ipUInt32>::Type& indexes3,
60  const typename Sse2Type<ipUInt32>::Type& indexes4,
61  T* const outBaseAddr);
62 };
63 
64 template <typename T>
66  typename boost::enable_if<
67  typename boost::mpl::and_<typename boost::is_integral<T>::type,
68  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::type
69  >::type
70  >::type
71 >
72 {
73  static
74  IPSDK_FORCEINLINE
75  void
76  act(const typename Sse2Type<T>::Type& in,
77  const ipUInt32* indexes,
78  T* const outBaseAddr);
79 
80  static
81  IPSDK_FORCEINLINE
82  void
83  act(const typename Sse2Type<T>::Type& in,
84  const typename Sse2Type<ipUInt32>::Type& indexes1,
85  const typename Sse2Type<ipUInt32>::Type& indexes2,
86  T* const outBaseAddr);
87 };
88 
89 template <typename T>
91  typename boost::enable_if<
92  typename boost::mpl::and_<typename boost::is_integral<T>::type,
93  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
94  >::type
95  >::type
96 >
97 {
98  static
99  IPSDK_FORCEINLINE
100  void
101  act(const typename Sse2Type<T>::Type& in,
102  const ipUInt32* indexes,
103  T* const outBaseAddr);
104 
105  static
106  IPSDK_FORCEINLINE
107  void
108  act(const typename Sse2Type<T>::Type& in,
109  const typename Sse2Type<ipUInt32>::Type& indexes,
110  T* const outBaseAddr);
111 };
112 
113 template <>
115 {
116  static
117  IPSDK_FORCEINLINE
118  void
119  act(const Sse2Type<ipReal32>::Type& in,
120  const ipUInt32* indexes,
121  ipReal32* const outBaseAddr);
122 
123  static
124  IPSDK_FORCEINLINE
125  void
126  act(const Sse2Type<ipReal32>::Type& in,
127  const Sse2Type<ipUInt32>::Type& indexes,
128  ipReal32* const outBaseAddr);
129 };
130 
131 template <>
133 {
134  static
135  IPSDK_FORCEINLINE
136  void
137  act(const Sse2Type<ipReal64>::Type& in,
138  const ipUInt32* indexes,
139  ipReal64* const outBaseAddr);
140 };
141 
144 
145 } // end of namespace detail
146 } // end of namespace simd
147 } // end of namespace ipsdk
148 
149 #endif // __IPSDKUTIL_INSTRUCTIONSET_SCATTER_DETAIL_SSE2_SCATTERREGDECL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: ScatterReg.h:30
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Predefined types for Sse2 instruction set management.
Predefined types associated to 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
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53