IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PolynomPack.h
Go to the documentation of this file.
1 // PolynomPack.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_POLYNOMPACK_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_POLYNOMPACK_H__
17 
20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/PolynomReg.h>
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
30 #define DEFINE_POLYNOMPACK_STD(N) \
31 template <typename T> \
32 struct PolynomPack<eInstructionSet::eIS_Standard, eInstructionSet::eIS_Standard, N, T> \
33 { \
34  static IPSDK_FORCEINLINE \
35  BasePack<ePackType::ePT_Scalar, T> \
36  act(const BasePack<ePackType::ePT_Scalar, T>& in, \
37  BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \
38  { \
39  BasePack<ePackType::ePT_Scalar, T> out; \
40  act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \
41  return out; \
42  } \
43  \
44  static IPSDK_FORCEINLINE \
45  void \
46  act(const BasePack<ePackType::ePT_Scalar, T>& in, \
47  BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \
48  BasePack<ePackType::ePT_Scalar, T>& out) \
49  { \
50  PolynomReg<eInstructionSet::eIS_Standard, eInstructionSet::eIS_Standard, N, T>::act(in._val, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out._val); \
51  } \
52 };
53 
54 DEFINE_POLYNOMPACK_STD(20)
55 DEFINE_POLYNOMPACK_STD(19)
56 DEFINE_POLYNOMPACK_STD(18)
57 DEFINE_POLYNOMPACK_STD(17)
58 DEFINE_POLYNOMPACK_STD(16)
59 DEFINE_POLYNOMPACK_STD(15)
60 DEFINE_POLYNOMPACK_STD(14)
61 DEFINE_POLYNOMPACK_STD(13)
62 DEFINE_POLYNOMPACK_STD(12)
63 DEFINE_POLYNOMPACK_STD(11)
64 DEFINE_POLYNOMPACK_STD(10)
65 DEFINE_POLYNOMPACK_STD(9)
66 DEFINE_POLYNOMPACK_STD(8)
67 DEFINE_POLYNOMPACK_STD(7)
68 DEFINE_POLYNOMPACK_STD(6)
69 DEFINE_POLYNOMPACK_STD(5)
70 DEFINE_POLYNOMPACK_STD(4)
71 DEFINE_POLYNOMPACK_STD(3)
72 DEFINE_POLYNOMPACK_STD(2)
73 DEFINE_POLYNOMPACK_STD(1)
74 
77 
78 } // end of namespace detail
79 } // end of namespace simd
80 } // end of namespace ipsdk
81 
82 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_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.