-
Notifications
You must be signed in to change notification settings - Fork 149
Multithreaded ATLAS
You can link ATLAS against the multithreaded libraries from ATLAS. These have an additional “pt” in the name (like libptf77blas.a instead of libf77blas.a).
Note however, that this won’t speed up operations where the runtime is proportional to the number of elements involved. This includes all elementwise operations, addition and subtraction, and also matrix-vector multiplication. The reason is that JNI first copies the elements to the native space (see Java Native Code Background), which already takes as long as the actual computation.
The bottom line is that you’ll only see huge improvements if you rely on computation intensive operations like matrix-matrix-multiplication or more complex routines like computing eigenvectors or solving linear equations.
Also note that ATLAS determines the number of threads at compile time (AFAIK). So you need to do this yourself on the machine you want to perform the computation on. The shared libraries should also been build automatically, so you just compile ATLAS yourself, and then configure jblas with the —ptatlas flag.