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_SSE2_UNLOADPACK_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_UNLOADPACK_H__
17 
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
31 // unload implementation for SSE2 for integral types
32 template <typename T>
34  typename boost::enable_if_c<boost::is_integral<T>::value
35  && sizeof(T) == 1>::type>
36 {
37  static IPSDK_FORCEINLINE
38  void act(const BasePack<ePackType::ePT_Sse, T>& pack, T* pT)
39  {
41  }
42 };
43 
44 template <typename T>
46  typename boost::enable_if_c<boost::is_integral<T>::value
47  && sizeof(T) == 2>::type>
48 {
49  static IPSDK_FORCEINLINE
50  void act(const BasePack<ePackType::ePT_Sse, T>& pack, T* pT)
51  {
54  pT + SseStep<T>::Value);
55  }
56 };
57 
58 template <typename T>
60  typename boost::enable_if_c<sizeof(T) == 4>::type>
61 {
62  static IPSDK_FORCEINLINE
63  void act(const BasePack<ePackType::ePT_Sse, T>& pack, T* pT)
64  {
67  pT + SseStep<T>::Value);
69  pT + 2*SseStep<T>::Value);
71  pT + 3*SseStep<T>::Value);
72  }
73 };
74 
75 // unload implementation for SSE2 for real64 types
76 template <typename T>
78  typename boost::enable_if_c<sizeof(T) == 8>::type>
79 {
80  static IPSDK_FORCEINLINE
81  void act(const BasePack<ePackType::ePT_Sse, T>& pack, T* pT)
82  {
85  pT+ SseStep<T>::Value);
87  pT+2*SseStep<T>::Value);
89  pT+3*SseStep<T>::Value);
91  pT+4*SseStep<T>::Value);
93  pT+5*SseStep<T>::Value);
95  pT+6*SseStep<T>::Value);
97  pT+7*SseStep<T>::Value);
98  }
99 };
100 
103 
104 } // end of namespace detail
105 } // end of namespace simd
106 } // end of namespace ipsdk
107 
108 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_UNLOADPACK_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: UnloadPack.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
Predefined types associated to instruction set management.
Definition: BasePack.h:30
Definition of import/export macro for library.
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
Definition: UnloadReg.h:30