mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-17 22:25:55 +08:00
Remove useless reshape row/col ctor
This commit is contained in:
parent
342c8e5321
commit
03723abda0
@ -118,16 +118,6 @@ template<typename XprType, int ReshapeRows, int ReshapeCols, bool InnerPanel> cl
|
|||||||
EIGEN_GENERIC_PUBLIC_INTERFACE(Reshape)
|
EIGEN_GENERIC_PUBLIC_INTERFACE(Reshape)
|
||||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Reshape)
|
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Reshape)
|
||||||
|
|
||||||
/** Column or Row constructor
|
|
||||||
*/
|
|
||||||
EIGEN_DEVICE_FUNC
|
|
||||||
inline Reshape(XprType& xpr, Index i) : Impl(xpr,i)
|
|
||||||
{
|
|
||||||
eigen_assert( (i>=0) && (
|
|
||||||
((ReshapeRows==1) && (ReshapeCols==XprType::ColsAtCompileTime) && i<xpr.rows())
|
|
||||||
||((ReshapeRows==XprType::RowsAtCompileTime) && (ReshapeCols==1) && i<xpr.cols())));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fixed-size constructor
|
/** Fixed-size constructor
|
||||||
*/
|
*/
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
@ -182,19 +172,6 @@ template<typename XprType, int ReshapeRows, int ReshapeCols, bool InnerPanel, bo
|
|||||||
|
|
||||||
class InnerIterator;
|
class InnerIterator;
|
||||||
|
|
||||||
/** Column or Row constructor
|
|
||||||
*/
|
|
||||||
EIGEN_DEVICE_FUNC
|
|
||||||
inline ReshapeImpl_dense(XprType& xpr, Index i)
|
|
||||||
: m_xpr(xpr),
|
|
||||||
// It is a row if and only if ReshapeRows==1 and ReshapeCols==XprType::ColsAtCompileTime,
|
|
||||||
// and it is a column if and only if ReshapeRows==XprType::RowsAtCompileTime and ReshapeCols==1,
|
|
||||||
// all other cases are invalid.
|
|
||||||
// The case a 1x1 matrix seems ambiguous, but the result is the same anyway.
|
|
||||||
m_reshapeRows(ReshapeRows==1 ? 1 : xpr.rows()),
|
|
||||||
m_reshapeCols(ReshapeCols==1 ? 1 : xpr.cols())
|
|
||||||
{}
|
|
||||||
|
|
||||||
/** Fixed-size constructor
|
/** Fixed-size constructor
|
||||||
*/
|
*/
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user