Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

mkl_finalize

Terminates
Intel® oneAPI Math Kernel Library
execution environment and frees resources allocated by the library.

Syntax

void
mkl_finalize
(
void
);
Include Files
  • mkl.h
Description
This function frees resources allocated by
Intel® oneAPI Math Kernel Library
. Once this function is called, the application can no longer call
Intel® oneAPI Math Kernel Library
functions other than
mkl_finalize
.
In particular, the
mkl_finalize
function enables you to free resources when a third-party shared library is statically linked to
Intel® oneAPI Math Kernel Library
. To avoid resource leaks that may happen when a shared library is loaded and unloaded multiple times, call
mkl_finalize
each time the library is unloaded. The recommended method to do this depends on the operating system:
  • On Linux* or macOS*, place the call into a shared library destructor.
  • On Windows*, call
    mkl_finalize
    from the
    DLL_PROCESS_DETACH
    handler of
    DllMain
    .
Intel® oneAPI Math Kernel Library
shared libraries automatically perform finalization when they are unloaded. If an application is statically linked to
Intel® oneAPI Math Kernel Library
, the operating system frees all resources allocated by
Intel® oneAPI Math Kernel Library
during termination of the process associated with the application.

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