# mkl_domain_set_num_threads

Suggests the number of threads for a particular function domain.

## Syntax

Fortran:

call integer mkl_domain_set_num_threads( num, mask )

C:

int mkl_domain_set_num_threads( int num, int mask );

## Input Parameters

Name | Type | Description
--- | --- | ---
num | FORTRAN: INTEGER C: int | Number of threads suggested by user
mask | FORTRAN: INTEGER C: int | Name of the targeted domain

## Description

This function allows the user to request different domains of Intel MKL to use different numbers of threads. The currently supported domains are:

- MKL_BLAS - BLAS domain
- MKL_FFT - FFT domain (excluding cluster FFT)
- MKL_VML - vector math library
- MKL_ALL - another way to do what mkl_set_num_threads does

This is just a hint, and it is not guaranteed that this number of threads will be used. The user must enter a valid domain and a positive integer for the number of threads. This routine has precedence over the MKL_DOMAIN_NUM_THREADS environment variable.

See Intel MKL User’s Guide for implementation details.

## Return Values

1(true)

  Indicates no error, execution is successful.

0(false)

  Indicates failure, possibly because the inputs were invalid.

Parent topic: Threading Control Functions