Intel® Math Kernel Library 2019 Developer Reference - C
On Linux, sets the limit of memory that Intel MKL can allocate for a specified type of memory.
int mkl_set_memory_limit (int mem_type, size_t limit);
Name |
Type |
Description |
---|---|---|
mem_type |
int |
Type of memory to limit. Possible values: MKL_MEM_MCDRAM - Multi-Channel Dynamic Random Access Memory (MCDRAM) (for more details, see https://software.intel.com/en-us/articles/mcdram-high-bandwidth-memory-on-knights-landing-analysis-methods-tools). |
limit |
size_t |
Memory limit in megabytes. |
This function sets the limit for the amount of memory that Intel MKL can allocate for the specified memory type. The limit bounds both internal allocations (inside Intel MKL computation routines) and external allocations (in a call to mkl_malloc, mkl_calloc, or mkl_realloc). By default no limit is set for memory allocation.
Call mkl_set_memory_limit at most once, prior to calling any other Intel MKL function in your application except mkl_set_interface_layer and mkl_set_threading_layer.
The mkl_set_memory_limit function takes precedence over the MKL_FAST_MEMORY_LIMIT environment variable.
Type |
Description |
---|---|
int |
Status of the function completion:
|