IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
polynomial.h
Go to the documentation of this file.
1 // polynomial.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_POLYNOMIAL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_POLYNOMIAL_H__
17 
19 
20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/PolynomPack.h>
22 
23 namespace ipsdk {
24 namespace simd {
25 
28 
30 
31 #define DEFINE_POLYNOMIAL_FUNCTION(N) \
32 template < \
33  eInstructionSet::domain instructionSet, \
34  eInstructionSet::domain instructionSetFma, \
35  class PackT \
36 > \
37 IPSDK_FORCEINLINE \
38 PackT \
39 BOOST_PP_CAT(polynomial, N)(const PackT& in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const typename PackT::DataType& c)) \
40 { \
41  typedef typename PackT::DataType T; \
42  return detail::PolynomPack<instructionSet, instructionSetFma, N, T>::act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c)); \
43 } \
44  \
45 template < \
46  eInstructionSet::domain instructionSet, \
47  eInstructionSet::domain instructionSetFma, \
48  class PackT> \
49 IPSDK_FORCEINLINE \
50 void \
51 BOOST_PP_CAT(polynomial, N)(const PackT& in1, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const typename PackT::DataType& c), PackT& out) \
52 { \
53  typedef typename PackT::DataType T; \
54  detail::PolynomPack<instructionSet, instructionSetFma, N, T>::act(in1, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \
55 }
56 
77 
80 
81 } // end of namespace simd
82 } // end of namespace ipsdk
83 
84 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_POLYNOMIAL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define DEFINE_POLYNOMIAL_FUNCTION(N)
returns the result of polynomial application on input value x
Definition: polynomial.h:31
Definition of import/export macro for library.