vkostyukov / la4j

Linear Algebra for Java
http://la4j.org
Apache License 2.0
371 stars 109 forks source link

Parallelized matrix operations? #191

Open SamoylovMD opened 10 years ago

SamoylovMD commented 10 years ago

We could improve performance of matrix addition and multiplication using parallelized computations. For example, we can start from these papers: http://www.cse.buffalo.edu/faculty/miller/Courses/CSE633/Sandeep-Raghuraman-Fall-2011.pdf http://www.cse.buffalo.edu/faculty/miller/Courses/CSE633/Ortega-Fall-2012-CSE633.pdf

Also, we could implement Karatsuba multiplication which has better asymptotic work time: http://en.wikipedia.org/wiki/Karatsuba_algorithm

vkostyukov commented 10 years ago

Yeah. Having a parallel LA library for Java is awesome. Is that is Parallel Colt is trying to handle. I was thinking quite a lot of this problem and decided to focus on a single-threaded solution. I see the la4j library as a very-simple and lightweight tool for solving LA problems in small- middle-size projects (Android Apps?). In such projects you usually don't need multithreading (the problem size is not big). But if you want to handle a huge science problem using cluster/supercomputer then the Java language as well as la4j library isn't the right tool for you. You will probably end up writing a custom low-level multithreading code using MPI/OpenMP and C++ instead for your partucualr problem (using particular consttraints and knowledges).

I'ts just impossible to write an efficient general soltuion (especially for sparse data). Trust me, even almost all the universities with their resources failed to do that.

So, the lighweight tool that work as fast as possible in a single-thread is somthing that we can handle by ourselfs. Let's focus on this.