15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_ASSIGNPACKIMPL_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_ASSIGNPACKIMPL_H__ 25 #include <boost/type_traits/is_same.hpp> 26 #include <boost/type_traits/is_signed.hpp> 37 BasePack<ePackType::ePT_Avx, T>
39 typename boost::enable_if_c<sizeof(T)==1>::type>::act(
const T& value)
41 BasePack<ePackType::ePT_Avx, T> out;
42 out._val[0] = AssignReg<eInstructionSet::eIS_Avx2, T>::act(value);
50 typename boost::enable_if_c<sizeof(T)==1>::type>::act(
51 BasePack<ePackType::ePT_Avx, T>& pack,
const T& value)
53 AssignReg<eInstructionSet::eIS_Avx2, T>::act(pack._val[0], value);
58 BasePack<ePackType::ePT_Avx, T>
60 typename boost::enable_if_c<sizeof(T)==2>::type>::act(
const T& value)
62 const typename AvxType<T>::Type value256 = AssignReg<eInstructionSet::eIS_Avx2, T>::act(value);
63 BasePack<ePackType::ePT_Avx, T> out;
64 out._val[0] = value256;
65 out._val[1] = value256;
73 typename boost::enable_if_c<sizeof(T)==2>::type>::act(
74 BasePack<ePackType::ePT_Avx, T>& pack,
const T& value)
76 typename AvxType<T>::Type value256;
77 AssignReg<eInstructionSet::eIS_Avx2, T>::act(value256, value);
78 pack._val[0] = value256;
79 pack._val[1] = value256;
84 BasePack<ePackType::ePT_Avx, T>
86 typename boost::enable_if_c<sizeof(T)==4>::type>::act(
const T& value)
88 const typename AvxType<T>::Type value256 = AssignReg<eInstructionSet::eIS_Avx2, T>::act(value);
89 BasePack<ePackType::ePT_Avx, T> out;
90 out._val[0] = value256;
91 out._val[1] = value256;
92 out._val[2] = value256;
93 out._val[3] = value256;
101 typename boost::enable_if_c<sizeof(T)==4>::type>::act(
102 BasePack<ePackType::ePT_Avx, T>& pack,
const T& value)
104 typename AvxType<T>::Type value256;
105 AssignReg<eInstructionSet::eIS_Avx2, T>::act(value256, value);
106 pack._val[0] = value256;
107 pack._val[1] = value256;
108 pack._val[2] = value256;
109 pack._val[3] = value256;
112 template <
typename T>
114 BasePack<ePackType::ePT_Avx, T>
116 typename boost::enable_if_c<sizeof(T)==8>::type>::act(
const T& value)
118 const typename AvxType<T>::Type value256 =
119 AssignReg<eInstructionSet::eIS_Avx2, T>::act(value);
121 BasePack<ePackType::ePT_Avx, T> out;
122 out._val[0] = value256;
123 out._val[1] = value256;
124 out._val[2] = value256;
125 out._val[3] = value256;
126 out._val[4] = value256;
127 out._val[5] = value256;
128 out._val[6] = value256;
129 out._val[7] = value256;
133 template <
typename T>
137 typename boost::enable_if_c<sizeof(T)==8>::type>::act(
138 BasePack<ePackType::ePT_Avx, T>& pack,
const T& value)
140 typename AvxType<T>::Type value256;
141 AssignReg<eInstructionSet::eIS_Avx2, T>::act(value256, value);
142 pack._val[0] = value256;
143 pack._val[1] = value256;
144 pack._val[2] = value256;
145 pack._val[3] = value256;
146 pack._val[4] = value256;
147 pack._val[5] = value256;
148 pack._val[6] = value256;
149 pack._val[7] = value256;
161 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_ASSIGNPACKIMPL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Definition of import/export macro for library.