diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-04-26 16:59:04 +0200 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-04-26 16:59:04 +0200 |
commit | bf71b466e9ade0359c30ab5e672ca09bd9a58a57 (patch) | |
tree | d84ab372fb8674a93d168e988f5bb52217fbdd80 /Eigen/src/Core | |
parent | 17dbe6c743fa7baea884fbdbe142445db9531750 (diff) |
Removed ambiguity between Map and Matrix Options template parameter.
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/Map.h | 14 | ||||
-rw-r--r-- | Eigen/src/Core/util/ForwardDeclarations.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index eb7262bdb..a22779bf9 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -31,7 +31,7 @@ * \brief A matrix or vector expression mapping an existing array of data. * * \param PlainObjectType the equivalent matrix type of the mapped data - * \param Options specifies whether the pointer is \c Aligned, or \c Unaligned. + * \param MapOptions specifies whether the pointer is \c Aligned, or \c Unaligned. * The default is \c Unaligned. * \param StrideType optionnally specifies strides. By default, Map assumes the memory layout * of an ordinary, contiguous array. This can be overridden by specifying strides. @@ -73,8 +73,8 @@ * * \sa Matrix::Map() */ -template<typename PlainObjectType, int Options, typename StrideType> -struct ei_traits<Map<PlainObjectType, Options, StrideType> > +template<typename PlainObjectType, int MapOptions, typename StrideType> +struct ei_traits<Map<PlainObjectType, MapOptions, StrideType> > : public ei_traits<PlainObjectType> { typedef typename PlainObjectType::Scalar Scalar; @@ -84,7 +84,7 @@ struct ei_traits<Map<PlainObjectType, Options, StrideType> > HasNoInnerStride = InnerStrideAtCompileTime <= 1, HasNoOuterStride = OuterStrideAtCompileTime == 0, HasNoStride = HasNoInnerStride && HasNoOuterStride, - IsAligned = int(int(Options)&Aligned)==Aligned, + IsAligned = int(int(MapOptions)&Aligned)==Aligned, IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic, KeepsPacketAccess = bool(HasNoInnerStride) && ( bool(IsDynamicSize) @@ -96,10 +96,12 @@ struct ei_traits<Map<PlainObjectType, Options, StrideType> > Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit), Flags = KeepsPacketAccess ? int(Flags2) : (int(Flags2) & ~PacketAccessBit) }; +private: + enum { Options }; // Expressions don't support Options }; -template<typename PlainObjectType, int Options, typename StrideType> class Map - : public MapBase<Map<PlainObjectType, Options, StrideType> > +template<typename PlainObjectType, int MapOptions, typename StrideType> class Map + : public MapBase<Map<PlainObjectType, MapOptions, StrideType> > { public: diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index c884487b6..d660078c7 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -79,7 +79,7 @@ template<typename MatrixType, typename DiagonalType, int ProductOrder> class Dia template<typename MatrixType, int Index> class Diagonal; template<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride; -template<typename MatrixType, int Options=Unaligned, typename StrideType = Stride<0,0> > class Map; +template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map; template<typename Derived> class TriangularBase; template<typename MatrixType, unsigned int Mode> class TriangularView; |