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_AVX2_ASSIGNREGDECL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_ASSIGNREGDECL_H__
17 
23 
24 #include <boost/type_traits/is_same.hpp>
25 #include <boost/type_traits/is_signed.hpp>
26 
27 namespace ipsdk {
28 namespace simd {
29 namespace detail {
30 
33 
34 template <typename T>
36  typename boost::enable_if_c<sizeof(T)==1>::type>
37 {
38  static IPSDK_FORCEINLINE
39  typename AvxType<T>::Type
40  act(const T& value);
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(typename AvxType<T>::Type& reg, const T& value);
45 };
46 
47 template <typename T>
49  typename boost::enable_if_c<sizeof(T)==2>::type>
50 {
51  static IPSDK_FORCEINLINE
52  typename AvxType<T>::Type
53  act(const T& value);
54 
55  static IPSDK_FORCEINLINE
56  void
57  act(typename AvxType<T>::Type& reg, const T& value);
58 };
59 
60 template <typename T>
62  typename boost::enable_if_c<boost::is_integral<T>::value
63  && sizeof(T)==4>::type>
64 {
65  static IPSDK_FORCEINLINE
66  typename AvxType<T>::Type
67  act(const T& value);
68 
69  static IPSDK_FORCEINLINE
70  void
71  act(typename AvxType<T>::Type& reg, const T& value);
72 };
73 
74 template <typename T>
76  typename boost::enable_if_c<boost::is_integral<T>::value
77  && sizeof(T)==8>::type>
78 {
79  static IPSDK_FORCEINLINE
80  typename AvxType<T>::Type
81  act(const T& value);
82 
83  static IPSDK_FORCEINLINE
84  void
85  act(typename AvxType<T>::Type& reg, const T& value);
86 };
87 
88 // load implementation for AVX2 for real32 types
89 template <>
91 {
92  static IPSDK_FORCEINLINE
94  act(const ipReal32& value);
95 
96  static IPSDK_FORCEINLINE
97  void
98  act(AvxType<ipReal32>::Type& reg, const ipReal32& value);
99 };
100 
101 // load implementation for AVX2 for real64 types
102 template <>
104 {
105  static IPSDK_FORCEINLINE
107  act(const ipReal64& value);
108 
109  static IPSDK_FORCEINLINE
110  void
111  act(AvxType<ipReal64>::Type& reg, const ipReal64& value);
112 };
113 
116 
117 } // end of namespace detail
118 } // end of namespace simd
119 } // end of namespace ipsdk
120 
121 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_ASSIGNREGDECL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Predefined types for Avx instruction set management.
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Predefined types associated to instruction set management.
Definition of import/export macro for library.
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33
Definition: AssignRegDecl.h:31
float ipReal32
Base types definition.
Definition: BaseTypes.h:56