Oj Algo concurrency

140 views Asked by At

I develop a program using ojAlgo library for computing matrix exponential. It includes eigen value decomposition. Does ojAlgo include multi-threaded algorithms ? For example is it possible to attach more than one thread to the decomposition task to reduce decomposition time?

eigenvalue = Eigenvalue.PRIMITIVE.make(matrix);
eigenvalue.decompose(matrix); //matrix dimension (3000x3000)
1

There are 1 answers

1
apete On BEST ANSWER

Yes it does. If you look inside that factory method Eigenvalue.PRIMITIVE.make(matrix); you'll se that it switches implementation depending on matrix size. The implementation used for the larger matrices is multi-threaded. The only problem for you is that the single-threaded implementation is so efficient that the factory doesn't switch to multi-threading until the matrices are larger than 8192.

Do you know if the matrices are symmetric or not? If you do I would recommend you to use Eigenvalue.PRIMITIVE.make(matrix, boolean); instead of Eigenvalue.PRIMITIVE.make(matrix);. Otherwise the algorithm will check for symmetry with every call to eigenvalue.decompose(matrix);.