From 4ecd782c31eb1fe6d3dc060fdfae756e891f5c15 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Sat, 1 Feb 2014 20:49:48 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20#734=20(thanks=20to=20Philipp?= =?UTF-8?q?=20B=C3=BCttgenbach=20for=20reporting=20the=20issue=20and=20pro?= =?UTF-8?q?posing=20a=20fix).=20Kept=20ColMajor=20layout=20if=20possible?= =?UTF-8?q?=20in=20order=20to=20keep=20derivatives=20of=20the=20same=20ord?= =?UTF-8?q?er=20adjacent=20in=20memory.=20(grafted=20from=20e722f36ffa80f1?= =?UTF-8?q?31e19428bab275dbc2df522093=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unsupported/Eigen/src/Splines/SplineFwd.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unsupported/Eigen/src/Splines/SplineFwd.h b/unsupported/Eigen/src/Splines/SplineFwd.h index 49db8d35d..5d9bfacf8 100644 --- a/unsupported/Eigen/src/Splines/SplineFwd.h +++ b/unsupported/Eigen/src/Splines/SplineFwd.h @@ -31,6 +31,8 @@ namespace Eigen enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ }; enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime /*!< The number of derivatives defined for the current spline. */ }; + + enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ }; /** \brief The data type used to store non-zero basis functions. */ typedef Array BasisVectorType; @@ -39,7 +41,7 @@ namespace Eigen typedef Array BasisDerivativeType; /** \brief The data type used to store the spline's derivative values. */ - typedef Array DerivativeType; + typedef Array DerivativeType; /** \brief The point type the spline is representing. */ typedef Array PointType; @@ -67,7 +69,7 @@ namespace Eigen typedef Array<_Scalar,Dynamic,Dynamic,RowMajor,NumOfDerivativesAtCompileTime,OrderAtCompileTime> BasisDerivativeType; /** \brief The data type used to store the spline's derivative values. */ - typedef Array<_Scalar,_Dim,Dynamic,ColMajor,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; + typedef Array<_Scalar,_Dim,Dynamic,DerivativeMemoryLayout,_Dim,NumOfDerivativesAtCompileTime> DerivativeType; }; /** \brief 2D float B-spline with dynamic degree. */