Developer Reference

Contents

mkl_peak_mem_usage

Reports the peak memory allocated by the
Intel® MKL
Memory Allocator.

Syntax

MKL_INT64
mkl_peak_mem_usage
(
int
mode
);
Include Files
  • mkl.h
Input Parameters
Name
Type
Description
mode
int
Requested mode of the function's operation. Possible values:
  • MKL_PEAK_MEM_ENABLE
    - start gathering the peak memory data
  • MKL_PEAK_MEM_DISABLE
    - stop gathering the peak memory data
  • MKL_PEAK_MEM
    - return the peak memory
  • MKL_PEAK_MEM_RESET
    - return the peak memory and reset the counter to start gathering the peak memory data from scratch
Description
The
mkl_peak_mem_usage
function reports the peak memory allocated by the
Intel® MKL
Memory Allocator.
Gathering the peak memory data is turned off by default. If you need to know the peak memory, explicitly turn the data gathering mode on by calling the function with the
MKL_PEAK_MEM_ENABLE
value of the parameter. Use the
MKL_PEAK_MEM
and
MKL_PEAK_MEM_RESET
values only when the data gathering mode is turned on. Otherwise the function returns -1. The data gathering mode leads to performance degradation, so when the mode is turned on, you can turn it off by calling the function with the
MKL_PEAK_MEM_DISABLE
value of the parameter.
  • If
    Intel® MKL
    is running in a threaded mode, the
    mkl_peak_mem_usage
    function may return different amounts of memory from run to run.
  • The function reports the peak memory for the entire application, not just for the calling thread.
Return Values
Name
Type
Description
AllocatedBytes
MKL_INT64
The peak memory allocated by the Memory Allocator (in bytes) or -1 in case of errors.

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