hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox Chapter Introduction

X06 — Multi-threading Utilities

Scope of the Chapter

This chapter contains utilities for controlling the number of threads used for multi-threaded NAG functions.

Background to the Problems

These functions have been designed to be used with multi-threaded implementations of the NAG Toolbox. They enable you to change and interrogate the number of threads used for multi-threaded NAG functions.

Recommendations on Choice and Use of Available Functions

Parallel Implementations of the NAG Toolbox

The number of threads to use for multi-threaded NAG Toolbox functions can be set with nag_omp_set_num_threads (x06aa), and can be changed at any time.
You can check how many threads will be used for subsequent NAG functions, regardless of whether it has been set with nag_omp_set_num_threads (x06aa) or not, with a call to nag_omp_get_max_threads (x06ac). See Multi-threaded Functions for further information on setting the number of threads.

Serial Implementations of the NAG Toolbox

When using a serial implementation of the NAG Toolbox nag_omp_set_num_threads (x06aa) has no effect as the number of threads that will be used for NAG functions will be 1. This is reflected by nag_omp_get_max_threads (x06ac) always returning 1.

Functionality Index

Number of threads 
    get number for next NAG function nag_omp_get_max_threads (x06ac)
    set number for next NAG function nag_omp_set_num_threads (x06aa)

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015