Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

mkl_set_threading_layer

Sets the threading layer for
Intel® oneAPI Math Kernel Library
at run time. Use with the Single Dynamic Library (SDL).

Syntax

int
mkl_set_threading_layer
(
int
required_threading
);
Include Files
  • mkl.h
Input Parameters
Name
Type
Description
required_threading
int
Determines the threading layer. Possible values:
MKL_THREADING_INTEL
for Intel threading.
MKL_THREADING_SEQUENTIAL
for the sequential mode of
Intel® oneAPI Math Kernel Library
.
MKL_THREADING_TBB
for threading with the Intel® Threading Building Blocks.
MKL_THREADING_PGI
for PGI threading on Windows* or Linux* operating system only.
Do not use this value with the SDL for Intel® Many Integrated Core (Intel® MIC) Architecture.
MKL_THREADING_GNU
for GNU threading on Linux* operating system only.
Do not use this value with the SDL for Intel MIC Architecture.
Description
If you are using the Single Dynamic Library (SDL), the
mkl_set_threading_layer
function sets the specified threading layer for
Intel® oneAPI Math Kernel Library
at run time.
Call this function prior to calling any other
Intel® oneAPI Math Kernel Library
function in your application except
mkl_set_interface_layer
.
You can call
mkl_set_threading_layer
and
mkl_set_interface_layer
in any order.
The
mkl_set_threading_layer
function takes precedence over the
MKL_THREADING_LAYER
environment variable.
See
Intel® oneAPI Math Kernel Library
Developer Guide
for the layered model concept and usage details of the SDL.
Return Values
Type
Description
int
  • Current threading layer if it is set in a call to
    mkl_set_threading_layer
    or specified by environment variables or defaults. Possible values are specified in Input Parameters.
  • -1, if the layer was not specified prior to the call and the input parameter is incorrect.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804