15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX_POLYNOMPACK_H__ 16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX_POLYNOMPACK_H__ 20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/PolynomReg.h> 23 #include <boost/mpl/not_equal_to.hpp> 32 #define DEFINE_POLYNOMPACK_AVX(N) \ 33 template <typename T> \ 34 struct PolynomPack<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Avx, N, T, typename boost::enable_if_c<boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::value>::type> \ 36 static IPSDK_FORCEINLINE \ 37 BasePack<ePackType::ePT_Avx, T> \ 38 act(const BasePack<ePackType::ePT_Avx, 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_Avx, T>& in, \ 49 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \ 50 BasePack<ePackType::ePT_Avx, T>& out) \ 52 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Avx, N, T>::act(in._val[0], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[0]); \ 53 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Avx, N, T>::act(in._val[1], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[1]); \ 54 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Avx, N, T>::act(in._val[2], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[2]); \ 55 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Avx, N, T>::act(in._val[3], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[3]); \ 59 template <typename T> \ 60 struct PolynomPack<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Fma3, N, T, typename boost::enable_if_c<boost::mpl::equal_to<boost::mpl::int_<sizeof(T)>, boost::mpl::int_<4> >::value>::type> \ 62 static IPSDK_FORCEINLINE \ 63 BasePack<ePackType::ePT_Avx, T> \ 64 act(const BasePack<ePackType::ePT_Avx, T>& in, \ 65 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \ 67 BasePack<ePackType::ePT_Scalar, T> out; \ 68 act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \ 72 static IPSDK_FORCEINLINE \ 74 act(const BasePack<ePackType::ePT_Avx, T>& in, \ 75 BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \ 76 BasePack<ePackType::ePT_Avx, T>& out) \ 78 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Fma3, N, T>::act(in._val[0], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[0]); \ 79 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Fma3, N, T>::act(in._val[1], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[1]); \ 80 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Fma3, N, T>::act(in._val[2], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[2]); \ 81 PolynomReg<eInstructionSet::eIS_Avx, eInstructionSet::eIS_Fma3, N, T>::act(in._val[3], BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val[3]); \ 85 DEFINE_POLYNOMPACK_AVX(20)
86 DEFINE_POLYNOMPACK_AVX(19)
87 DEFINE_POLYNOMPACK_AVX(18)
88 DEFINE_POLYNOMPACK_AVX(17)
89 DEFINE_POLYNOMPACK_AVX(16)
90 DEFINE_POLYNOMPACK_AVX(15)
91 DEFINE_POLYNOMPACK_AVX(14)
92 DEFINE_POLYNOMPACK_AVX(13)
93 DEFINE_POLYNOMPACK_AVX(12)
94 DEFINE_POLYNOMPACK_AVX(11)
95 DEFINE_POLYNOMPACK_AVX(10)
96 DEFINE_POLYNOMPACK_AVX(9)
97 DEFINE_POLYNOMPACK_AVX(8)
98 DEFINE_POLYNOMPACK_AVX(7)
99 DEFINE_POLYNOMPACK_AVX(6)
100 DEFINE_POLYNOMPACK_AVX(5)
101 DEFINE_POLYNOMPACK_AVX(4)
102 DEFINE_POLYNOMPACK_AVX(3)
103 DEFINE_POLYNOMPACK_AVX(2)
104 DEFINE_POLYNOMPACK_AVX(1)
113 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX_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.