Opened 4 years ago

Last modified 3 years ago

#835 new discussion

Fast Matrix Transpose

Reported by: Peter Owned by: Jari Häkkinen
Priority: major Milestone: yat 0.x+
Component: utility Version: 0.12.2
Keywords: Cc:

Description

related to ticket:474 and ticket:202

I have an algorithm which with matrices that involves some matrix transpose and multiplication, but it's not really possible to write fast and readable code with current (0.12) yat API. I have e.g. algorithm where I wanna do

B = B * Ct * A

C = C * A * Bt

and then I wanna loop over this plus some other thingies. The first problem is that I cannot create a transpose fast, but it involves copying a matrix. Why not allow an Adaptor or a View class that behaves like Matrix Transpose?

Change History (2)

comment:1 Changed 3 years ago by Peter

Milestone: yat 0.x+yat 0.15

comment:2 Changed 3 years ago by Peter

Milestone: yat 0.15yat 0.x+

Ticket #880 has been marked as related.

Ticket #880 would solve my use case.

The way to implement this is probably to have same tree of classes as for Vector with a MatrixBase and MatrixMutable from which ConstTransposedMatrixView and TranposedMatrixView inherit. Having that we should do the GSL-style views as well by slicing sub-matrices.

I havent analysed that in detailed, but noticed this old comment from Brian Gough which suggests there is some problem. Possible that problem goes away with the extra layer we introduce with a C++ wrapper.

I don't think this will be go in 0.15 though.

Note: See TracTickets for help on using tickets.