Parallelize random starts with multithreading #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR adds
use_threads=
option to therotate()
method (off by default).If enabled, it would use
Threads.foreach()
to parallelize the optimization across the random starts.rotate()
heavily relies on SVD, but it looks like the default LAPACK library on my system (OpenBLAS?) does not take advantage of multi-threading.Might be different for the other BLAS libraries, but
use_threads
would provide an alternative way to utilize multi-threading.Also note that this PR is based on #55 branch anticipating it would be merged first.But I can also rebase it to the main branch depending on what the package author will decide.