Boost logo

Ublas :

Subject: Re: [ublas] Matrix with vector interface.
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2012-09-18 15:55:43


Hi,

> Regarding uBlas: Long time ago there was a design decision to not
> handle
> a matrix as a set of vectors in order to avoid bad surprises when
> playing with the storage layout and iteration order. However, I'd
> gladly
> accept a new matrix view as list of vectors using boost:range .
So a matrix which also behaves as a range? or just a range adaptor
which maps a matrix_expression to a range_of_vectors which isn't
interpreted as matrix_expression anymore? In the last case i have the
code lying around somewhere in my codebase and i just need to boostify
it :).

> (Though I still believe that a few copies to/from a suitable data
> structure might get better performance than a complicated proxy of a
> full matrix ...)
I don't think that it costs a lot. Creating the
matrix_row/matrix_column is free. And the dense layout of a matrix is
ideal for cache based cpus. Maybe ublas won't have that much of an
advantage from a dense structure since, as you said, it is not cutting
edge performance at all.

Having said that: are there any plans for an ublas2? Or something like
that? At the moment the advise i hear a lot from people having looked at
ublas is: "don't use it. There are many better libraries our there". I
don't think that this is an ideal state for a boost library :/.

Greetings,
Oswin