openmp: Get or set number of threads for OpenMP

Description Usage Arguments Details Value

Description

Get or set the number of threads for OpenMP

Usage

1
2
3

Arguments

num

New number of threads for OpenMP

Details

Some functions in mpMap2 are parallelised. Depending on the number of cores available, and the type of workload, it may be advantageous to turn parallelisation on or off, by setting the number of OpenMP threads appropriately. Setting the number of threads to 1 turns parallelisation off

In particular, for small examples on a computer with a large number of threads, parallelisation may result in a huge decrease in performance.

This function returns an error if the package was not compiled with OpenMP.

Value

None

The number of threads for OpenMP


mpMap2 documentation built on Sept. 13, 2020, 5:17 p.m.