[eigen] Re: inplace_transpose_selector

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


We're calling inplace_transpose_selector<Derived>::run. What template specialization will it choose?
 
template<typename Derived>
inline void DenseBase<Derived>::transposeInPlace()
{
  eigen_assert((rows() == cols() || (RowsAtCompileTime == Dynamic && ColsAtCompileTime == Dynamic))
               && "transposeInPlace() called on a non-square non-resizable matrix");
  internal::inplace_transpose_selector<Derived>::run(derived());
}
 
 
This?
template<typename MatrixType>
struct inplace_transpose_selector<MatrixType,true,true> { // PacketSize x PacketSize
 
or this?
template<typename MatrixType>
struct inplace_transpose_selector<MatrixType,true,false> { // square matrix
 
the difference is only in the 3rd argument (in the 1st - it's ture, 2nd has false)
--
Best wishes,
Ivan Kush
 
 
 
26.03.2016, 23:35, "Ivan Kush" <ivan.v.kush@xxxxxxxxx>:
Hello,
I'm lookong in the Eigen internals(want to be a bug fixer/contributor) and saw such construction. Could you please explain why is this construction .template triangularView<StrictlyUpper>().?
 
m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose());
 
--
Best wishes,
Ivan Kush
 
R&D Stadyo
Moscow, Russia


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/