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

Thread safety with SimplicialLDLt

Tags: None
(comma "," separated)
bldeng
Registered Member
Posts
4
Karma
0

Thread safety with SimplicialLDLt

Tue Jul 10, 2012 7:38 am
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,
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
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.
bldeng
Registered Member
Posts
4
Karma
0
ggael wrote: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.


Yes B_i are vectors. Thanks for the advice!


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]