Re: [eigen] Reusing a sparse matrix for SparseLU

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Gael,

The typical size is between 10 and 50, between 3 and 5 entries per row, but it has to run fast, without memory allocations.
I tried SpaseLU, but indeed, still twice as slow as dense Householder QR for the lower end of my range. The "nice" thing is that I can generate the structure offline (it's for a JIT PDE solver) and do lots of analysis before (column permutations and all that stuff).

Cheers,

Matthieu

Le lun. 3 déc. 2018 à 15:07, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> a écrit :

hm.... if you're thinking about using coeffs() << v0, v1, v2... then your matrix is likely very small. What is its typical size and number of non-zeros? If too small and not sparse enough better use a dense matrix/solver..

gael 

On Mon, Dec 3, 2018 at 2:28 PM Matthieu Brucher <matthieu.brucher@xxxxxxxxx> wrote:


Le lun.. 3 déc. 2018 à 11:43, Alberto Luaces <alberto.luaces@xxxxxxxxx> a écrit :
Matthieu Brucher writes:

> Hi Alberto,
>
> Thanks for the answer. Unfortunately, this still makes me create
> another array,

How so?

I need to create an array for the coifs, don't I? Seems like I could use valuePtr as well.
But the speed is very bad and profiles indicate that there may be mallocs inside the factorisation or the solve :/
 

> I'd rather populate the elements directly.

You can do precisely that, by using the coeffs() vector.

Oh, you mean I could do coeffs() << v0, v1, v2...? 

--


--
Quantitative analyst, Ph.D.
Blog: http://blog.audio-tk.com/
LinkedIn: http://www.linkedin.com/in/matthieubrucher


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/