mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 06:43:13 +08:00
fix implicit conversion warning in vectorwise_reverse_inplace
This commit is contained in:
parent
708fd6d136
commit
ff4dffc34d
@ -175,10 +175,10 @@ struct vectorwise_reverse_inplace_impl<Vertical>
|
|||||||
template<typename ExpressionType>
|
template<typename ExpressionType>
|
||||||
static void run(ExpressionType &xpr)
|
static void run(ExpressionType &xpr)
|
||||||
{
|
{
|
||||||
const int HalfAtCompileTime = ExpressionType::RowsAtCompileTime==Dynamic?Dynamic:ExpressionType::RowsAtCompileTime/2;
|
constexpr Index HalfAtCompileTime = ExpressionType::RowsAtCompileTime==Dynamic?Dynamic:ExpressionType::RowsAtCompileTime/2;
|
||||||
Index half = xpr.rows()/2;
|
Index half = xpr.rows()/2;
|
||||||
xpr.topRows(fix<HalfAtCompileTime>(half))
|
xpr.template topRows<HalfAtCompileTime>(half)
|
||||||
.swap(xpr.bottomRows(fix<HalfAtCompileTime>(half)).colwise().reverse());
|
.swap(xpr.template bottomRows<HalfAtCompileTime>(half).colwise().reverse());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -188,10 +188,10 @@ struct vectorwise_reverse_inplace_impl<Horizontal>
|
|||||||
template<typename ExpressionType>
|
template<typename ExpressionType>
|
||||||
static void run(ExpressionType &xpr)
|
static void run(ExpressionType &xpr)
|
||||||
{
|
{
|
||||||
const int HalfAtCompileTime = ExpressionType::ColsAtCompileTime==Dynamic?Dynamic:ExpressionType::ColsAtCompileTime/2;
|
constexpr Index HalfAtCompileTime = ExpressionType::ColsAtCompileTime==Dynamic?Dynamic:ExpressionType::ColsAtCompileTime/2;
|
||||||
Index half = xpr.cols()/2;
|
Index half = xpr.cols()/2;
|
||||||
xpr.leftCols(fix<HalfAtCompileTime>(half))
|
xpr.template leftCols<HalfAtCompileTime>(half)
|
||||||
.swap(xpr.rightCols(fix<HalfAtCompileTime>(half)).rowwise().reverse());
|
.swap(xpr.template rightCols<HalfAtCompileTime>(half).rowwise().reverse());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user