IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
UnloadPack.h
Go to the documentation of this file.
1 // UnloadPack.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_UNLOADPACK_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_UNLOADPACK_H__
17 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
30 // unload implementation for AVX2 for integral types
31 template <typename T>
33  typename boost::enable_if_c<sizeof(T) == 1>::type>
34 {
35  static IPSDK_FORCEINLINE
36  void act(const BasePack<ePackType::ePT_Avx, T>& pack, T* pT)
37  {
39  }
40 };
41 
42 template <typename T>
44  typename boost::enable_if_c<sizeof(T) == 2 >::type>
45 {
46  static IPSDK_FORCEINLINE
47  void act(const BasePack<ePackType::ePT_Avx, T>& pack, T* pT)
48  {
51  pT + AvxStep<T>::Value);
52  }
53 };
54 
55 template <typename T>
57  typename boost::enable_if_c<sizeof(T) == 4>::type>
58 {
59  static IPSDK_FORCEINLINE
60  void act(const BasePack<ePackType::ePT_Avx, T>& pack, T* pT)
61  {
64  pT + AvxStep<T>::Value);
66  pT + 2*AvxStep<T>::Value);
68  pT + 3*AvxStep<T>::Value);
69  }
70 };
71 
72 template <typename T>
74  typename boost::enable_if_c<sizeof(T) == 8>::type>
75 {
76  static IPSDK_FORCEINLINE
77  void act(const BasePack<ePackType::ePT_Avx, T>& pack, T* pT)
78  {
81  pT + AvxStep<T>::Value);
83  pT + 2*AvxStep<T>::Value);
85  pT + 3*AvxStep<T>::Value);
87  pT + 4*AvxStep<T>::Value);
89  pT + 5*AvxStep<T>::Value);
91  pT + 6*AvxStep<T>::Value);
93  pT + 7*AvxStep<T>::Value);
94  }
95 };
96 
99 
100 } // end of namespace detail
101 } // end of namespace simd
102 } // end of namespace ipsdk
103 
104 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_UNLOADPACK_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: UnloadPack.h:30
Definition: BasePack.h:30
BasePack class; defines a set of scalars (for instruction set "standard") or registers (for all other...
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.
Definition: UnloadReg.h:30