IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Namespaces | Macros
PolynomReg.h File Reference

specialization of ipsdk::simd::detail::PolynomReg structure for all instruction sets More...

#include <IPSDKUtil/IPSDKUtilExports.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/PolynomReg.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/FmaddReg.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/MulReg.h>
#include <IPSDKUtil/InstructionSet/detail/AssignReg.h>
#include <IPSDKUtil/InstructionSet/RegType.h>
#include <IPSDKUtil/Tools/ForceInline.h>
#include <boost/preprocessor/repetition/enum_params.hpp>

Go to the source code of this file.

Classes

struct  ipsdk::simd::detail::PolynomReg< IS, ISFma, 1, T >
 

Namespaces

 ipsdk
 Main namespace for IPSDK library.
 
 ipsdk::simd
 Namespace agregating IPSDK SIMD routines and classes.
 

Macros

#define DEFINE_POLYNOMREG(N)
 

Detailed Description

specialization of ipsdk::simd::detail::PolynomReg structure for all instruction sets

Author
H. Delestre
Date
2017/03/29

Macro Definition Documentation

◆ DEFINE_POLYNOMREG

#define DEFINE_POLYNOMREG (   N)
Value:
template <eInstructionSet::domain IS, eInstructionSet::domain ISFma, typename T> \
struct PolynomReg <IS, ISFma, N, T> \
{ \
static IPSDK_FORCEINLINE \
typename RegType<IS, T>::Type \
act(const typename RegType<IS, T>::Type& in, \
BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c)) \
{ \
typename RegType<IS, T>::Type out; \
act(in, BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), c), out); \
return out; \
} \
\
static IPSDK_FORCEINLINE \
void \
act(const typename RegType<IS, T>::Type& x, \
BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(N), const T& c), \
typename RegType<IS, T>::Type& out) \
{ \
typedef typename RegType<IS, T>::Type Reg; \
Reg tmp; \
PolynomReg<IS, ISFma, BOOST_PP_DEC(N), T>::act(x, BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(N), c), tmp); \
Reg r0; \
AssignReg<IS, T>::act(r0, c0); \
FmaddReg<ISFma, T>::act(x, tmp, r0, out); \
} \
};