15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE2_POLYNOMPACK_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE_POLYNOMPACK_H__ 20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/PolynomReg.h> 23 #include <boost/mpl/not_equal_to.hpp> 32 #define DEFINE_POLYNOMPACK_SSE2(N) \ 33 template <typename T> \ 34 struct PolynomPack<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T, typename boost::enable_if_c<boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<1> >::value>::type> \ 36 static IPSDK_FORCEINLINE \ 37 BasePack<ePackType::ePT_Sse, T> \ 38 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 39 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \ 41 BasePack<ePackType::ePT_Scalar, T> out; \ 42 act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \ 46 static IPSDK_FORCEINLINE \ 48 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 49 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \ 50 BasePack<ePackType::ePT_Sse, T>& out) \ 52 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[0], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[0]); \ 56 template <typename T> \ 57 struct PolynomPack<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T, typename boost::enable_if_c<boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<2> >::value>::type> \ 59 static IPSDK_FORCEINLINE \ 60 BasePack<ePackType::ePT_Sse, T> \ 61 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 62 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \ 64 BasePack<ePackType::ePT_Scalar, T> out; \ 65 act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \ 69 static IPSDK_FORCEINLINE \ 71 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 72 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \ 73 BasePack<ePackType::ePT_Sse, T>& out) \ 75 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[0], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[0]); \ 76 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[1], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[1]); \ 80 template <typename T> \ 81 struct PolynomPack<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T, typename boost::enable_if_c<boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::value>::type> \ 83 static IPSDK_FORCEINLINE \ 84 BasePack<ePackType::ePT_Sse, T> \ 85 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 86 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \ 88 BasePack<ePackType::ePT_Scalar, T> out; \ 89 act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \ 93 static IPSDK_FORCEINLINE \ 95 act(const BasePack<ePackType::ePT_Sse, T>& in, \ 96 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \ 97 BasePack<ePackType::ePT_Sse, T>& out) \ 99 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[0], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[0]); \ 100 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[1], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[1]); \ 101 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[2], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[2]); \ 102 PolynomReg<eInstructionSet::eIS_Sse2, eInstructionSet::eIS_Sse2, N, T>::act(in._val[3], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[3]); \ 106 DEFINE_POLYNOMPACK_SSE2(20)
107 DEFINE_POLYNOMPACK_SSE2(19)
108 DEFINE_POLYNOMPACK_SSE2(18)
109 DEFINE_POLYNOMPACK_SSE2(17)
110 DEFINE_POLYNOMPACK_SSE2(16)
111 DEFINE_POLYNOMPACK_SSE2(15)
112 DEFINE_POLYNOMPACK_SSE2(14)
113 DEFINE_POLYNOMPACK_SSE2(13)
114 DEFINE_POLYNOMPACK_SSE2(12)
115 DEFINE_POLYNOMPACK_SSE2(11)
116 DEFINE_POLYNOMPACK_SSE2(10)
117 DEFINE_POLYNOMPACK_SSE2(9)
118 DEFINE_POLYNOMPACK_SSE2(8)
119 DEFINE_POLYNOMPACK_SSE2(7)
120 DEFINE_POLYNOMPACK_SSE2(6)
121 DEFINE_POLYNOMPACK_SSE2(5)
122 DEFINE_POLYNOMPACK_SSE2(4)
123 DEFINE_POLYNOMPACK_SSE2(3)
124 DEFINE_POLYNOMPACK_SSE2(2)
125 DEFINE_POLYNOMPACK_SSE2(1)
134 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_SSE2_POLYNOMPACK_H__ Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
BasePack class; defines a set of scalars (for instruction set "standard") or registers (for all other...
Definition of import/export macro for library.