Package 'OpenMPController'

Title: Control Number of OpenMP Threads Dynamically
Description: The OpenMPController package provides a function omp_set_num_threads() to set 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. Compatibility updates by Renova.
Authors: Simon Guest [aut, cre]
Maintainer: Simon Guest <[email protected]>
License: GPL-2
Version: 0.2.5.9001
Built: 2026-11-16 17:57:22 UTC
Source: https://github.com/renova-r/OpenMPController

Help Index


Set number of OpenMP threads

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

omp_set_num_threads(n)

Arguments

n

Integer, number of threads

Author(s)

The R interface was written by Simon Guest.

Examples

omp_set_num_threads(2)

# do something requiring 2 OMP threads

omp_set_num_threads(4)

# do something else requiring 4 OMP threads