This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Block CG (p=1) vs Classic CG

Tags: None
(comma "," separated)
ptorres
Registered Member
Posts
1
Karma
0

Block CG (p=1) vs Classic CG

Mon Jul 22, 2013 8:07 pm
Dear Eigen Team and Users,


I'm new here and I have a newbie question. I have implemented a version of Block Conjugate Gradient, to resolve AX=B where A(nxn), X(nxp) and B(nxp). Then, I compare the walltime of this block version (using p=1) agains Classics CG using just VectorXd. Result: the block version took more time.

Specifically I see that the operation A*V, with V defined as MatrixXd V(n,1) took more time than the operations A*v, with v defined as VectorXd v(n). For example, with a sparse matrix with n=14800, the kernel A*V took 5.4 seconds and A*v took 3.8 seconds, both resolve the problem in 2400 iterations.

My questions, is this an expected result?, if yes why?... can I do something to get approximately more closer results?.

Thanks in advance.

Best Regards

Pedro Torres
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Block CG (p=1) vs Classic CG

Tue Jul 23, 2013 11:34 pm
Can you show some piece of code, because there should not be much difference between VectorXd and a column major MatrixXd for CG.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]