mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Removed ambiguity between Map and Matrix Options template parameter.
This commit is contained in:
parent
17dbe6c743
commit
bf71b466e9
@ -31,7 +31,7 @@
|
|||||||
* \brief A matrix or vector expression mapping an existing array of data.
|
* \brief A matrix or vector expression mapping an existing array of data.
|
||||||
*
|
*
|
||||||
* \param PlainObjectType the equivalent matrix type of the mapped 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.
|
* The default is \c Unaligned.
|
||||||
* \param StrideType optionnally specifies strides. By default, Map assumes the memory layout
|
* \param StrideType optionnally specifies strides. By default, Map assumes the memory layout
|
||||||
* of an ordinary, contiguous array. This can be overridden by specifying strides.
|
* of an ordinary, contiguous array. This can be overridden by specifying strides.
|
||||||
@ -73,8 +73,8 @@
|
|||||||
*
|
*
|
||||||
* \sa Matrix::Map()
|
* \sa Matrix::Map()
|
||||||
*/
|
*/
|
||||||
template<typename PlainObjectType, int Options, typename StrideType>
|
template<typename PlainObjectType, int MapOptions, typename StrideType>
|
||||||
struct ei_traits<Map<PlainObjectType, Options, StrideType> >
|
struct ei_traits<Map<PlainObjectType, MapOptions, StrideType> >
|
||||||
: public ei_traits<PlainObjectType>
|
: public ei_traits<PlainObjectType>
|
||||||
{
|
{
|
||||||
typedef typename PlainObjectType::Scalar Scalar;
|
typedef typename PlainObjectType::Scalar Scalar;
|
||||||
@ -84,7 +84,7 @@ struct ei_traits<Map<PlainObjectType, Options, StrideType> >
|
|||||||
HasNoInnerStride = InnerStrideAtCompileTime <= 1,
|
HasNoInnerStride = InnerStrideAtCompileTime <= 1,
|
||||||
HasNoOuterStride = OuterStrideAtCompileTime == 0,
|
HasNoOuterStride = OuterStrideAtCompileTime == 0,
|
||||||
HasNoStride = HasNoInnerStride && HasNoOuterStride,
|
HasNoStride = HasNoInnerStride && HasNoOuterStride,
|
||||||
IsAligned = int(int(Options)&Aligned)==Aligned,
|
IsAligned = int(int(MapOptions)&Aligned)==Aligned,
|
||||||
IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,
|
IsDynamicSize = PlainObjectType::SizeAtCompileTime==Dynamic,
|
||||||
KeepsPacketAccess = bool(HasNoInnerStride)
|
KeepsPacketAccess = bool(HasNoInnerStride)
|
||||||
&& ( bool(IsDynamicSize)
|
&& ( bool(IsDynamicSize)
|
||||||
@ -96,10 +96,12 @@ struct ei_traits<Map<PlainObjectType, Options, StrideType> >
|
|||||||
Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit),
|
Flags2 = HasNoStride ? int(Flags1) : int(Flags1 & ~LinearAccessBit),
|
||||||
Flags = KeepsPacketAccess ? int(Flags2) : (int(Flags2) & ~PacketAccessBit)
|
Flags = KeepsPacketAccess ? int(Flags2) : (int(Flags2) & ~PacketAccessBit)
|
||||||
};
|
};
|
||||||
|
private:
|
||||||
|
enum { Options }; // Expressions don't support Options
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename PlainObjectType, int Options, typename StrideType> class Map
|
template<typename PlainObjectType, int MapOptions, typename StrideType> class Map
|
||||||
: public MapBase<Map<PlainObjectType, Options, StrideType> >
|
: public MapBase<Map<PlainObjectType, MapOptions, StrideType> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ template<typename MatrixType, typename DiagonalType, int ProductOrder> class Dia
|
|||||||
template<typename MatrixType, int Index> class Diagonal;
|
template<typename MatrixType, int Index> class Diagonal;
|
||||||
|
|
||||||
template<int InnerStrideAtCompileTime, int OuterStrideAtCompileTime> class Stride;
|
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 Derived> class TriangularBase;
|
||||||
template<typename MatrixType, unsigned int Mode> class TriangularView;
|
template<typename MatrixType, unsigned int Mode> class TriangularView;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user