omp_set_num_threads: Set number of OpenMP threads

Description Usage Arguments Author(s) Examples

View source: R/omp_set_num_threads.R

Description

Sets the number of OpenMP threads to be used. This may be useful, for example, when linking against a vendor optimised BLAS/LAPACK library (e.g. the AMD Core Math Library), since the defaults used by those libraries may not be highly performant.

Usage

1

Arguments

n

Integer, number of threads

Author(s)

The R interface was written by Simon Guest.

Examples

1
2
3
4
5
6
7
omp_set_num_threads(2)

# do something requiring 2 OMP threads

omp_set_num_threads(4)

# do something else requiring 4 OMP threads

Example output

[[1]]
[1] 2

[[1]]
[1] 4

OpenMPController documentation built on May 2, 2019, 8:55 a.m.