irlba
A C++ library for IRLBA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
irlba::EigenThreadScope Class Reference

Restrict the number of available threads for Eigen. More...

#include <parallel.hpp>

Public Member Functions

 EigenThreadScope (int num_threads)
 

Detailed Description

Restrict the number of available threads for Eigen.

Creating an instance of this class will call Eigen::setNbThreads() to control the number of available OpenMP threads in Eigen operations. Destruction will then reset the number of available threads to its prior value.

If the parallelization scheme is not OpenMP, num_threads is ignored and the number of Eigen threads is always set to 1 when an instance of this class is created. This is done to avoid unintended parallelization via OpenMP when another scheme has already been specified. We assume that OpenMP is not the parallelization scheme if:

If OpenMP is not available, the creation/destruction of a class instance has no effect.


The documentation for this class was generated from the following file: