aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-13 16:27:26 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-13 16:27:26 +0000
commita5632fe1dbdf33a82c6e279bbc9707dc734479c8 (patch)
treea9f2943d8c0c545c9b1b58d5a83f82514a0faa81 /Eigen/src
parente8e1084267161d831c9b132bfffbccb9b4f25d9a (diff)
add EIGEN_FUNCTORS_PLUGIN
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Core/Functors.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h
index 347f1b252..c8ca3dac1 100644
--- a/Eigen/src/Core/Functors.h
+++ b/Eigen/src/Core/Functors.h
@@ -348,6 +348,12 @@ template<typename Scalar>
struct ei_functor_traits<ei_scalar_identity_op<Scalar> >
{ 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
// to indicate whether a functor allows linear access, just always answering 'yes' except for
// ei_scalar_identity_op.