Visible to Intel only — GUID: GUID-96B169D0-53CE-43F4-9587-78C4C182BF8F
Visible to Intel only — GUID: GUID-96B169D0-53CE-43F4-9587-78C4C182BF8F
Limiting the number of usable threads
This page describes how to limit the number of CPU threads that a descriptor object may use in compute functions. When non-native, all the relevant types and enumerations mentioned below belong to the oneapi::mkl::dft namespace and are declared in oneapi/mkl/dft.hpp (file to be included). The usage of prepended namespace specifiers oneapi::mkl::dft is omitted below for conciseness.
Description
The number of threads that a CPU-committed descriptor object may use within a compute function can be limited by the configuration value associated with configuration parameter config_param::THREAD_LIMIT. A positive value associated with that parameter effectively sets as a limit on the maximum number of CPU threads that the object can use. A zero value associated with that parameter effectively bypasses any such restriction on the number of usable threads (default behavior).
By definition, this configuration parameter is irrelevant if oneMKL is used in sequential mode, and the configuration value associated with configuration parameter config_param::THREAD_LIMIT is permanently set to in such cases; any attempt to modify it using the relevant configuration-setting member function is ignored in that case.
This configuration parameter is also irrelevant for (and ignored by) descriptor objects committed to a GPU device.