[eigen] Re: inplace_transpose_selector |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: "eigen@xxxxxxxxxxxxxxxxxxx" <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Re: inplace_transpose_selector
- From: Ivan Kush <ivan.v.kush@xxxxxxxxx>
- Date: Sat, 26 Mar 2016 23:41:54 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1459024915; bh=r7WYPgBahDLhj0CYTS99mvVH3b/7TW6/aWA1UfrmdIU=; h=From:To:In-Reply-To:References:Subject:Date; b=XDjXByhMxli4397bJTTGTXaAwE4YT7qSWqDWbq/0IRtarxwALOMYspjiMdl9ERr21 xv7YPwt3o+vcwlVyytbU/90sekDMEUse03OIoRIbZ/51JOytpX3jn4/EFj0xMVkBuY Zl5Yujr/y00cZ/GGDMIucjfWtlEHVPm46h+CWjZg=
- Envelope-from: ivan-v-kush@xxxxxxxxx
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