add EIGEN_FUNCTORS_PLUGIN

This commit is contained in:
Benoit Jacob 2009-01-13 16:27:26 +00:00
parent e8e1084267
commit a5632fe1db

View File

@ -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.