IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
AssignRegDecl.h
Go to the documentation of this file.
1 // AssignRegDecl.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_ASSIGNREGDECL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_ASSIGNREGDECL_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  typename Sse2Type<T>::Type
49  act(const T& value);
50 
51  static
52  IPSDK_FORCEINLINE
53  void
54  act(typename Sse2Type<T>::Type& reg, const T& value);
55 };
56 
57 template <typename T>
59  typename boost::enable_if<
60  typename boost::mpl::and_<typename boost::is_integral<T>::type,
61  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::type
62  >::type
63  >::type
64 >
65 {
66  static
67  IPSDK_FORCEINLINE
68  typename Sse2Type<T>::Type
69  act(const T& value);
70 
71  static
72  IPSDK_FORCEINLINE
73  void
74  act(typename Sse2Type<T>::Type& reg, const T& value);
75 };
76 
77 template <typename T>
79  typename boost::enable_if<
80  typename boost::mpl::and_<typename boost::is_integral<T>::type,
81  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::type
82  >::type
83  >::type
84 >
85 {
86  static
87  IPSDK_FORCEINLINE
88  typename Sse2Type<T>::Type
89  act(const T& value);
90 
91  static
92  IPSDK_FORCEINLINE
93  void
94  act(typename Sse2Type<T>::Type& reg, const T& value);
95 };
96 
97 template <typename T>
99  typename boost::enable_if<
100  typename boost::mpl::and_<typename boost::is_integral<T>::type,
101  typename boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<8> >::type
102  >::type
103  >::type
104 >
105 {
106  static
107  IPSDK_FORCEINLINE
108  typename Sse2Type<T>::Type
109  act(const T& value);
110 
111  static
112  IPSDK_FORCEINLINE
113  void
114  act(typename Sse2Type<T>::Type& reg, const T& value);
115 };
116 
117 template <>
119 {
120  static
121  IPSDK_FORCEINLINE
123  act(const ipReal32& value);
124 
125  static
126  IPSDK_FORCEINLINE
127  void
128  act(Sse2Type<ipReal32>::Type& reg, const ipReal32& value);
129 };
130 
131 template <>
133 {
134  static
135  IPSDK_FORCEINLINE
137  act(const ipReal64& value);
138 
139  static
140  IPSDK_FORCEINLINE
141  void
142  act(Sse2Type<ipReal64>::Type& reg, const ipReal64& value);
143 };
144 
147 
148 } // end of namespace detail
149 } // end of namespace simd
150 } // end of namespace ipsdk
151 
152 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_ASSIGNREGDECL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
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
Definition: AssignRegDecl.h:31
float ipReal32
Base types definition.
Definition: BaseTypes.h:56