mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-14 18:33:16 +08:00
add EIGEN_FUNCTORS_PLUGIN
This commit is contained in:
parent
e8e1084267
commit
a5632fe1db
@ -348,6 +348,12 @@ template<typename Scalar>
|
|||||||
struct ei_functor_traits<ei_scalar_identity_op<Scalar> >
|
struct ei_functor_traits<ei_scalar_identity_op<Scalar> >
|
||||||
{ enum { Cost = NumTraits<Scalar>::AddCost, PacketAccess = false, IsRepeatable = true }; };
|
{ enum { Cost = NumTraits<Scalar>::AddCost, PacketAccess = false, IsRepeatable = true }; };
|
||||||
|
|
||||||
|
// allow to add new functors and specializations of ei_functor_traits from outside Eigen.
|
||||||
|
// this macro is really needed because ei_functor_traits must be specialized after it is declared but before it is used...
|
||||||
|
#ifdef EIGEN_FUNCTORS_PLUGIN
|
||||||
|
#include EIGEN_FUNCTORS_PLUGIN
|
||||||
|
#endif
|
||||||
|
|
||||||
// all functors allow linear access, except ei_scalar_identity_op. So we fix here a quick meta
|
// all functors allow linear access, except ei_scalar_identity_op. So we fix here a quick meta
|
||||||
// to indicate whether a functor allows linear access, just always answering 'yes' except for
|
// to indicate whether a functor allows linear access, just always answering 'yes' except for
|
||||||
// ei_scalar_identity_op.
|
// ei_scalar_identity_op.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user