eigen-3.3.4.2: Eigen C++ library (linear algebra: matrices, sparse matrices, vectors, numerical solvers).

Safe HaskellNone
LanguageHaskell2010

Eigen.Parallel

Description

Some of Eigen's algorithms can exploit the multiple cores present in your hardware. To this end, it is enough to enable OpenMP on your compiler, for instance: GCC: -fopenmp. You can control the number of threads that will be used using either by the OpenMP API or by Eigen's API using the following priority:

  1. OMP_NUM_THREADS=n ./my_program
  2. setNbThreads n

Unless setNbThreads has been called, Eigen uses the number of threads specified by OpenMP. You can restore this behaviour by calling setNbThreads n

Currently, the following algorithms can make use of multi-threading: general matrix - matrix products PartialPivLU.

Synopsis

Documentation

setNbThreads :: Int -> IO () Source #

Sets the max number of threads reserved for Eigen

getNbThreads :: IO Int Source #

Gets the max number of threads reserved for Eigen