Re: [eigen] Block CG(p=1) vs CG Classic

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


On 23.07.2013 00:13, Pedro Torres wrote:
For example as you can see in the snapshop, block version took 4.8s  and
classic version 3.8s, for a sparse matrix with n=14200. The number of
iterations for both was 2400.

It might be that you have an aliasing problem.
If you have expressions like P=A*Z; or P+=A*Z can you try P.noAlias()=A*Z; (or +=)?

In general, I would like to set p at runtime.

I assume, that in practice the case p==1 will be very uncommon? If so it would not make much sense to test that at runtime (although that would be a very cheap test).

Could you recommend some tips or reference where I can read about this
optimization Sparse*MatrixXd(n,p) on Eigen's side?.

What I meant was that Eigen's Sparse*Dense product implementation may have room for optimization. I did not look closely into that, though -- so don't take my word for granted here. Maybe Gael can give you some pointers, if you really want to optimize that.

Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



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