Remove useless reshape row/col ctor

This commit is contained in:
yoco 2014-01-20 00:22:16 +08:00
parent 342c8e5321
commit 03723abda0

View File

@ -117,16 +117,6 @@ template<typename XprType, int ReshapeRows, int ReshapeCols, bool InnerPanel> cl
typedef Impl Base;
EIGEN_GENERIC_PUBLIC_INTERFACE(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
*/
@ -182,19 +172,6 @@ template<typename XprType, int ReshapeRows, int ReshapeCols, bool InnerPanel, bo
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
*/
EIGEN_DEVICE_FUNC