Go to the documentation of this file.
34 #ifndef EIGEN_ASSIGN_VML_H
35 #define EIGEN_ASSIGN_VML_H
41 template<
typename Dst,
typename Src>
49 InnerSize =
int(Dst::IsVectorAtCompileTime) ?
int(Dst::SizeAtCompileTime)
51 :
int(Dst::RowsAtCompileTime),
54 :
int(Dst::MaxRowsAtCompileTime),
69 #define EIGEN_PP_EXPAND(ARG) ARG
70 #if !defined (EIGEN_FAST_MATH) || (EIGEN_FAST_MATH != 1)
71 #define EIGEN_VMLMODE_EXPAND_xLA , VML_HA
73 #define EIGEN_VMLMODE_EXPAND_xLA , VML_LA
76 #define EIGEN_VMLMODE_EXPAND_x_
78 #define EIGEN_VMLMODE_PREFIX_xLA vm
79 #define EIGEN_VMLMODE_PREFIX_x_ v
80 #define EIGEN_VMLMODE_PREFIX(VMLMODE) EIGEN_CAT(EIGEN_VMLMODE_PREFIX_x,VMLMODE)
82 #define EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE) \
83 template< typename DstXprType, typename SrcXprNested> \
84 struct Assignment<DstXprType, CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested>, assign_op<EIGENTYPE,EIGENTYPE>, \
85 Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> { \
86 typedef CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested> SrcXprType; \
87 static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) { \
88 resize_if_allowed(dst, src, func); \
89 eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); \
90 if(vml_assign_traits<DstXprType,SrcXprNested>::Traversal==LinearTraversal) { \
91 VMLOP(dst.size(), (const VMLTYPE*)src.nestedExpression().data(), \
92 (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE) ); \
94 const Index outerSize = dst.outerSize(); \
95 for(Index outer = 0; outer < outerSize; ++outer) { \
96 const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.nestedExpression().coeffRef(outer,0)) : \
97 &(src.nestedExpression().coeffRef(0, outer)); \
98 EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer)); \
99 VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr, \
100 (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE)); \
107 #define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE) \
108 EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),s##VMLOP), float, float, VMLMODE) \
109 EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),d##VMLOP), double, double, VMLMODE)
111 #define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE) \
112 EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),c##VMLOP), scomplex, MKL_Complex8, VMLMODE) \
113 EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, EIGEN_CAT(EIGEN_VMLMODE_PREFIX(VMLMODE),z##VMLOP), dcomplex, MKL_Complex16, VMLMODE)
115 #define EIGEN_MKL_VML_DECLARE_UNARY_CALLS(EIGENOP, VMLOP, VMLMODE) \
116 EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE) \
117 EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE)
141 #define EIGEN_MKL_VML_DECLARE_POW_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE) \
142 template< typename DstXprType, typename SrcXprNested, typename Plain> \
143 struct Assignment<DstXprType, CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested, \
144 const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> >, assign_op<EIGENTYPE,EIGENTYPE>, \
145 Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> { \
146 typedef CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested, \
147 const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> > SrcXprType; \
148 static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) { \
149 resize_if_allowed(dst, src, func); \
150 eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); \
151 VMLTYPE exponent = reinterpret_cast<const VMLTYPE&>(src.rhs().functor().m_other); \
152 if(vml_assign_traits<DstXprType,SrcXprNested>::Traversal==LinearTraversal) \
154 VMLOP( dst.size(), (const VMLTYPE*)src.lhs().data(), exponent, \
155 (VMLTYPE*)dst.data() EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE) ); \
157 const Index outerSize = dst.outerSize(); \
158 for(Index outer = 0; outer < outerSize; ++outer) { \
159 const EIGENTYPE *src_ptr = src.IsRowMajor ? &(src.lhs().coeffRef(outer,0)) : \
160 &(src.lhs().coeffRef(0, outer)); \
161 EIGENTYPE *dst_ptr = dst.IsRowMajor ? &(dst.coeffRef(outer,0)) : &(dst.coeffRef(0, outer)); \
162 VMLOP( dst.innerSize(), (const VMLTYPE*)src_ptr, exponent, \
163 (VMLTYPE*)dst_ptr EIGEN_PP_EXPAND(EIGEN_VMLMODE_EXPAND_x##VMLMODE)); \
178 #endif // EIGEN_ASSIGN_VML_H
Namespace containing all symbols from the Eigen library.
const EIGEN_DEVICE_FUNC AtanReturnType atan() const
Jet< T, N > sin(const Jet< T, N > &f)
const unsigned int RowMajorBit
#define EIGEN_MKL_VML_DECLARE_POW_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE)
const EIGEN_DEVICE_FUNC LogReturnType log() const
#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS(EIGENOP, VMLOP, VMLMODE)
const EIGEN_DEVICE_FUNC AsinReturnType asin() const
const EIGEN_DEVICE_FUNC ExpReturnType exp() const
Jet< T, N > acos(const Jet< T, N > &f)
const unsigned int DirectAccessBit
Jet< T, N > cos(const Jet< T, N > &f)
const EIGEN_DEVICE_FUNC CoshReturnType cosh() const
const EIGEN_DEVICE_FUNC SquareReturnType square() const
std::complex< float > scomplex
#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_CPLX(EIGENOP, VMLOP, VMLMODE)
std::complex< double > dcomplex
const EIGEN_DEVICE_FUNC TanReturnType tan() const
Jet< T, N > pow(const Jet< T, N > &f, double g)
const unsigned int LinearAccessBit
const EIGEN_DEVICE_FUNC TanhReturnType tanh() const
#define EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(EIGENOP, VMLOP, VMLMODE)
const EIGEN_DEVICE_FUNC CeilReturnType ceil() const
const EIGEN_DEVICE_FUNC SinhReturnType sinh() const
constexpr descr< N - 1 > _(char const (&text)[N])
Jet< T, N > sqrt(const Jet< T, N > &f)
const EIGEN_DEVICE_FUNC Log10ReturnType log10() const
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:08