Intel® Math Kernel Library 2018 Developer Reference - C

mkl_mic_free_memory

Frees the coprocessor memory reserved for the Automatic Offload computations.

Syntax

int mkl_mic_free_memory (MKL_MIC_TARGET_TYPE target_type, int target_number);

Include Files

Input Parameters

Name

Type

Description

target_type

MKL_MIC_TARGET_TYPE

Type of the target device. Use the value of
MKL_TARGET_MIC - Intel Xeon Phi coprocessor, default.

target_number

int

The coprocessor number for which the memory reserved for Automatic Offload computations is freed. 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.

Description

The mkl_mic_free_memory function frees the coprocessor memory reserved for the Automatic Offload computations. If you call mkl_mic_set_max_memory to specify the maximum coprocessor memory for Automatic Offload computations, Intel MKL reserves and reuses the specified coprocessor memory during multiple Automatic Offload calls. You can reclaim the coprocessor memory by calling mkl_mic_free_memory.

Note

  • Currently, Intel MKL reserves the coprocessor memory only if the mkl_mic_set_max_memory function is called. Therefore, mkl_mic_free_memory has no effect unless there is a prior call to the mkl_mic_set_max_memory function.

  • If you do not call mkl_mic_free_memory, Intel MKL frees the coprocessor memory at the program exit.

Return Values

Name

Type

Description

ierr

int

Result status:

= 0 Indicates the coprocessor memory reserved for Automatic Offload is freed successfully.

< 0 Indicates an error.

See Also