Boost logo

Ublas :

Subject: [ublas] profiling shows most time is consumed by indexing_matrix_assign
From: Heiko Schroeder (heiko_at_[hidden])
Date: 2010-04-09 12:20:41


Dear all,

I have just recently begun to use uBLAS to do some numerics, solving a
system of ordinary linear differential equations. The ODE solver
repeatedly invokes a function that computes the right hand side of the
ODE, and that contains almost the whole computational effort. In this
function, I have about 8 matrix-matrix multiplications (with prod()) and
about the same number of additions/subtractions of matrices or
multiplications with a scalar. The involved matrices are dense with
std::complex<double> entries and are of dimension 800x800.

The program, especially the evaluation of the rhs function, seems to be
running fairly slow and profiling with gprof shows that the rhs
evaluation takes 95%
of the computation time. Deeper inspection shows that two
versions of indexing_matrix_assign() account for almost all
of the time needed. Now comes my question: Is this the expected
behaviour for the described situation?

Some additional information: I am using uBLAS 1.41.0 with NDEBUG set to
1.

Any help is appreciated.

Best regards,

Heiko Schröder