Registered Member
|
Hi,
I need to solve a linear system with multiple right-hand-side vectors, i.e., A X = B_i, i = 1, 2, 3, where A is symmetric positive definite. In my code, I first compute the cholesky decomposition of A using SimplicialLDLt, and then solve for each vector B_i: SimplicialLDLt S; S.compute(A); for( int i = 0; i < 3; i++ ){ S.solve(B_i); } To speed it up, I would like to create three threads, each using the same solver object S to solve for a specific vector B_i. Is this thread-safe? Best regards, |
Moderator
|
Yes this should be thread safe.
Are the B_i matrices or a vectors? If vectors, then it might be faster to directly solve for X = S.solve(B) to make use of more efficient matrix-matrix operations. |
Registered Member
|
Yes B_i are vectors. Thanks for the advice! |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]