Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-06-30 11:06:43


Carlos Coelho sent me these questions about uBlas for the review:


I will try to take another look
at the documentation before I go my major "concerns"

- Can (or are) the dense level 3 blas routines,
especially matrix-matrix product evaluated using some
form of blocking as in MTL?

- Can sparse_matrix store replicated/unsorted entries.
I am not sure that this is a real issue for most
people and dealing with it complicates most of the

- Can the sparse structure of a sparse matrix be
shared and fixed or is a non-const sparse matrix
always assumed to allow having its sparse structure


I think we know the current answer to the first question ("no, not yet").

I think I can shed some light on the next 2 questions. Carlos and I used to
work together on simulation software. After much consideration, we
discovered that for some probelms, log(N) random-access to the elements of
a sparse matrix row was much less-important than being able to control the
order in which the elements appeared. Being able to choose a non-sorted
order allowed us to write the inner loop of our algorithm so that it simply
marched through continguous addresses, writing data to consecutive
locations in memory. In fact, this loop never had to touch the sparse
matrix structure at all.

The last question arises because in these problems, it is very common to
have to perform a calculation over and over again using the same sparse
matrix structure with different values (think Newton's method). For maximal
efficiency it's important not only to be able to re-use a sparse structure
for the inputs to this algorithm, but also to compute the result's sparse
structure just once, and re-use that.


                  David Abrahams
      C++ Booster ( O__ ==
      Pythonista ( c/ /'_ ==
  resume: (*) \(*) ==
          email: david.abrahams_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at