Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_thread_free_buffers

Frees unused memory allocated by the Intel® oneAPI Math Kernel Library (oneMKL) Memory Allocator in the current thread.

Syntax

call mkl_thread_free_buffers

Fortran Include Files/Modules

  • Include file: mkl.fi
  • Module (compiled): mkl_service.mod
  • Module (source): mkl_service.f90

Description

To improve performance of Intel® oneAPI Math Kernel Library (oneMKL), the Memory Allocator uses per-thread memory pools where buffers may be collected for fast reuse. Themkl_thread_free_buffers function frees unused memory allocated by the Memory Allocator in the current thread only.

You should call mkl_thread_free_buffersafter the last call to Intel® oneAPI Math Kernel Library (oneMKL) functions in the current thread. In large applications, if you suspect that the memory may get insufficient, you may call this function earlier, but anticipate a drop in performance that may occur due to reallocation of buffers for subsequent calls to Intel® oneAPI Math Kernel Library (oneMKL) functions.