Intel® Math Kernel Library 2018 Developer Reference - C

mkl_mic_get_meminfo

Retrieves the amount of total and free memory for the specified coprocessor or host CPU.

Syntax

int mkl_mic_get_meminfo (MKL_MIC_TARGET_TYPE target_type, int target_number, int* totalmem, int* freemem);

Include Files

Input Parameters

Name

Type

Description

target_type

MKL_MIC_TARGET_TYPE

Type of the target device. Use one of the following values:

  • MKL_TARGET_HOST - host CPU

  • MKL_TARGET_MIC - Intel Xeon Phi coprocessor, default

target_number

int

The device to retrieve the memory information for. Takes the following values:

  • 0. Specifies execution on a specific coprocessor. The coprocessor is determined by target_number modulo the number of Intel Xeon Phi coprocessors on the system as returned by mkl_mic_get_device_count(). For example: for a system with 4 Intel Xeon Phi coprocessors, target_number = 6 determines the coprocessor number 2.

  • <0. Reserved.

If target_type = MKL_TARGET_HOST, the function ignores the target_number parameter, which may have any value.

Output Parameters

Name

Type

Description

totalmem

int*

The total amount of memory on the target device in kilobytes.

freemem

int*

The amount of free memory available on the target device in kilobytes.

Description

Use this function to retrieve the amount of total and free memory (in kilobytes) available on an offload device or host CPU.

Return Values

Name

Type

Description

ierr

int

Result status:

= 0  Indicates that the memory information for the target device is successfully returned.

< 0  Indicates a failure to return the information.

See Also