| NMathConfigurationSetMKLNumThreads Method |
Sets the suggested number of threads for MKL to use.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static void SetMKLNumThreads(
int i
)
Public Shared Sub SetMKLNumThreads (
i As Integer
)
public:
static void SetMKLNumThreads(
int i
)
static member SetMKLNumThreads :
i : int -> unit
Parameters
- i Int32
- The suggested number of threads.
Remarks
MKL contains highly optimized, extensively threaded math routines. In rare cases, these can cause
conflicts between the Intel OMP threading library (libiomp5md.dll) and the .NET threading model.
If your .NET application is itself highly multi-threaded, you may wish to use MKL in single-threaded mode
by calling SetMKLNumThreads(1).
NOTE: MKL does not always have a choice on the number of threads for certain reasons, such as
system resources. Although Intel MKL may actually use a different number of threads from the number
suggested, this method enables you to instruct the library to try using the suggested number when
the number used in the calling application is unavailable.
See Also