powered by
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.
omp_set_num_threads(n)
Integer, number of threads
# NOT RUN { omp_set_num_threads(2) # do something requiring 2 OMP threads omp_set_num_threads(4) # do something else requiring 4 OMP threads # }
Run the code above in your browser using DataLab