interface class for gradient calculators
Definition at line 25 of file GradientCalculator.h.
| bool ROOT::Minuit2::GradientCalculator::SetParallelOMP |
( |
bool | doParallel = true | ) |
|
|
static |
Enable parallelization of gradient calculation using OpenMP.
This is different from the default parallel mechanism elsewhere (IMT, threads, TBB, ...). It can only be used to minimise thread-safe functions in Minuit2.
- Parameters
-
| doParallel | true to enable, false to disable. |
- Note
- Enabling this function does not guarantee that the derived gradient calculator class has implemented a OMP-parallelized version of the code. For example, the numeric Hessian computation (HessianGradientCalculator) does not make any use of OpenMP, only Numerical2PGradientCalculator makes use of OMP pragmas at the moment.
-
If OPENMP is not available, i.e. ROOT was built without OpenMP support (minuit2_omp), and an error is printed if doParallel=true; parallelization is disabled in any case.
- Returns
- false if OPENMP is not available and doParallel=true, otherwise it returns true.
Definition at line 21 of file GradientCalculator.cxx.