From a5632fe1dbdf33a82c6e279bbc9707dc734479c8 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 13 Jan 2009 16:27:26 +0000 Subject: [PATCH] add EIGEN_FUNCTORS_PLUGIN --- Eigen/src/Core/Functors.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 struct ei_functor_traits > { enum { Cost = NumTraits::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.