mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
Add evaluator for Ref
This commit is contained in:
parent
a08cba6b5f
commit
1b5de5a37b
@ -587,7 +587,7 @@ struct evaluator<MapBase<Derived, AccessorsType> >
|
||||
CoeffReturnType coeff(Index index) const
|
||||
{
|
||||
return coeff(RowsAtCompileTime == 1 ? 0 : index,
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
}
|
||||
|
||||
Scalar& coeffRef(Index row, Index col)
|
||||
@ -598,7 +598,7 @@ struct evaluator<MapBase<Derived, AccessorsType> >
|
||||
Scalar& coeffRef(Index index)
|
||||
{
|
||||
return coeffRef(RowsAtCompileTime == 1 ? 0 : index,
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
}
|
||||
|
||||
template<int LoadMode>
|
||||
@ -612,7 +612,7 @@ struct evaluator<MapBase<Derived, AccessorsType> >
|
||||
PacketReturnType packet(Index index) const
|
||||
{
|
||||
return packet<LoadMode>(RowsAtCompileTime == 1 ? 0 : index,
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
RowsAtCompileTime == 1 ? index : 0);
|
||||
}
|
||||
|
||||
template<int StoreMode>
|
||||
@ -626,8 +626,8 @@ struct evaluator<MapBase<Derived, AccessorsType> >
|
||||
void writePacket(Index index, const PacketScalar& x)
|
||||
{
|
||||
return writePacket<StoreMode>(RowsAtCompileTime == 1 ? 0 : index,
|
||||
RowsAtCompileTime == 1 ? index : 0,
|
||||
x);
|
||||
RowsAtCompileTime == 1 ? index : 0,
|
||||
x);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -647,6 +647,19 @@ struct evaluator<Map<PlainObjectType, MapOptions, StrideType> >
|
||||
{ }
|
||||
};
|
||||
|
||||
// -------------------- Ref --------------------
|
||||
|
||||
template<typename PlainObjectType, int RefOptions, typename StrideType>
|
||||
struct evaluator<Ref<PlainObjectType, RefOptions, StrideType> >
|
||||
: public evaluator<MapBase<Ref<PlainObjectType, RefOptions, StrideType> > >
|
||||
{
|
||||
typedef Ref<PlainObjectType, RefOptions, StrideType> XprType;
|
||||
|
||||
evaluator(const XprType& map)
|
||||
: evaluator<MapBase<XprType> >(map)
|
||||
{ }
|
||||
};
|
||||
|
||||
// -------------------- Block --------------------
|
||||
|
||||
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel,
|
||||
|
Loading…
x
Reference in New Issue
Block a user