我要评分
获取效率
正确性
完整性
易理解

BlasSetNumThreads

Specify the number of running threads.

Interface Definition

void BlasSetNumThreads(int numThreads)

Parameters

Parameter

Type

Description

Input/Output

numThreads

Integer

Number of threads. The value of numThreads must be greater than 0.

Input

Dependency

#include "kblas.h"

Examples

BlasSetNumThreads(4); // Set the number of running threads to 4.

You can specify the number of threads by setting either of the following environment variables:

export BLAS_NUM_THREADS=4

export OMP_NUM_TRHREADS=4

When only one environment variable is used, it can be set to 4. If both of the environment variables are configured, BLAS_NUM_THREADS has higher priority.