IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
LoadPack.h
Go to the documentation of this file.
1 // LoadPack.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_LOADPACK_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_LOADPACK_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
29 // load implementation for SSE2 for integral types
30 template <typename T>
32  typename boost::enable_if_c<sizeof(T) == 1>::type>
33 {
34  static IPSDK_FORCEINLINE
35  BasePack<ePackType::ePT_Sse, T> act(const T* pT)
36  {
39  return pack;
40  }
41 
42  static IPSDK_FORCEINLINE
43  void act(BasePack<ePackType::ePT_Sse, T>& pack, const T* pT)
44  {
46  }
47 };
48 
49 template <typename T>
51  typename boost::enable_if_c<sizeof(T) == 2>::type>
52 {
53  static IPSDK_FORCEINLINE
54  BasePack<ePackType::ePT_Sse, T> act(const T* pT)
55  {
58  pack._val[1] =
60  return pack;
61  }
62 
63  static IPSDK_FORCEINLINE
64  void
65  act(BasePack<ePackType::ePT_Sse, T>& pack, const T* pT)
66  {
69  }
70 };
71 
72 template <typename T>
74  typename boost::enable_if_c<sizeof(T) == 4>::type>
75 {
76  static IPSDK_FORCEINLINE
77  BasePack<ePackType::ePT_Sse, T> act(const T* pT)
78  {
81  regs._val[1] =
83  regs._val[2] =
85  regs._val[3] =
87  return regs;
88  }
89 
90  static IPSDK_FORCEINLINE
91  void act(BasePack<ePackType::ePT_Sse, T>& pack, const T* pT)
92  {
97  }
98 };
99 
100 template <typename T>
102  typename boost::enable_if_c<sizeof(T) == 8>::type>
103 {
104  static IPSDK_FORCEINLINE
105  BasePack<ePackType::ePT_Sse, T> act(const T* pT)
106  {
109  regs._val[1] =
111  regs._val[2] =
113  regs._val[3] =
115  regs._val[4] =
117  regs._val[5] =
119  regs._val[6] =
121  regs._val[7] =
123  return regs;
124  }
125 
126  static IPSDK_FORCEINLINE
127  void
128  act(BasePack<ePackType::ePT_Sse, T>& pack, const T* pT)
129  {
138  }
139 };
140 
143 
144 } // end of namespace detail
145 } // end of namespace simd
146 } // end of namespace ipsdk
147 
148 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_SSE2_LOADPACK_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: LoadPack.h:31
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition: BasePack.h:30
Definition of import/export macro for library.
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
Definition: LoadRegDecl.h:30