Intel® oneAPI Math Kernel Library Developer Reference - C

Support Functions

Intel® oneAPI Math Kernel Library (oneMKL) support functions are subdivided into the following groups according to their purpose:

Version Information

Threading Control

Error Handling

Character Equality Testing

Timing

Memory Management

Single Dynamic Library Control

Conditional Numerical Reproducibility Control

Miscellaneous

The following table lists Intel® oneAPI Math Kernel Library support functions.

oneMKL Support Functions

Function Name

Operation

Version Information

mkl_get_version

Returns the Intel® oneAPI Math Kernel Library version.

mkl_get_version_string

Returns the Intel® oneAPI Math Kernel Library version in a character string.

Threading Control

mkl_set_num_threads

Specifies the number of OpenMP* threads to use.

mkl_domain_set_num_threads

Specifies the number of OpenMP* threads for a particular function domain.

mkl_set_num_threads_local

Specifies the number of OpenMP* threads for all Intel® oneAPI Math Kernel Library functions on the current execution thread.

mkl_set_dynamic

Enables Intel® oneAPI Math Kernel Library to dynamically change the number of OpenMP* threads.

mkl_get_max_threads

Gets the number of OpenMP* threads targeted for parallelism.

mkl_domain_get_max_threads

Gets the number of OpenMP* threads targeted for parallelism for a particular function domain.

mkl_get_dynamic

Determines whether Intel® oneAPI Math Kernel Library is enabled to dynamically change the number of OpenMP* threads.

mkl_set_num_stripes

Specifies the number of partitions along the leading dimension of the output matrix for parallel ?gemm functions.

mkl_get_num_stripes

Gets the number of partitions along the leading dimension of the output matrix for parallel ?gemm functions.

Error Handling

xerbla

Error handling function called by BLAS, LAPACK, Vector Math, and Vector Statistics functions.

pxerbla

Handles error conditions for the ScaLAPACK routines.

LAPACKE_xerbla

Error handling function called by the C interface to LAPACK functions.

mkl_set_exit_handler

Sets the custom handler of fatal errors.

Character Equality Testing

lsame

Tests two characters for equality regardless of the case.

lsamen

Tests two character strings for equality regardless of the case.

Timing

second/dsecnd

Returns elapsed time in seconds. Use to estimate real time between two calls to this function.

mkl_get_cpu_clocks

Returns elapsed CPU clocks.

mkl_get_cpu_frequency

Returns CPU frequency value in GHz.

mkl_get_max_cpu_frequency

Returns the maximum CPU frequency value in GHz.

mkl_get_clocks_frequency

Returns the frequency value in GHz based on constant-rate Time Stamp Counter.

Memory Management

mkl_free_buffers

Frees unused memory allocated by the Intel® oneAPI Math Kernel Library Memory Allocator.

mkl_thread_free_buffers

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

mkl_mem_stat

Reports the status of the Intel® oneAPI Math Kernel Library Memory Allocator.

mkl_peak_mem_usage

Reports the peak memory allocated by the Intel® oneAPI Math Kernel Library Memory Allocator.

mkl_disable_fast_mm

Turns off the Intel® oneAPI Math Kernel Library Memory Allocator for Intel® oneAPI Math Kernel Library functions to directly use the systemmalloc/free functions.

mkl_malloc

Allocates an aligned memory buffer.

mkl_calloc

Allocates and initializes an aligned memory buffer.

mkl_realloc

Changes the size of memory buffer allocated by mkl_malloc/mkl_calloc.

mkl_free

Frees the aligned memory buffer allocated by mkl_malloc/mkl_calloc.

mkl_set_memory_limit

On Linux, sets the limit of memory that Intel® oneAPI Math Kernel Library can allocate for a specified type of memory.

Single Dynamic Library (SDL) Control

mkl_set_interface_layer

Sets the interface layer for Intel® oneAPI Math Kernel Library at run time.

mkl_set_threading_layer

Sets the threading layer for Intel® oneAPI Math Kernel Library at run time.

mkl_set_xerbla

Replaces the error handling routine. Use with the Single Dynamic Library .

mkl_set_progress

Replaces the progress information routine.

mkl_set_pardiso_pivot

Replaces the routine handling Intel® oneAPI Math Kernel Library PARDISO pivots with a user-defined routine. Use with the Single Dynamic Library (SDL).

Conditional Numerical Reproducibility (CNR) Control

mkl_cbwr_set

Configures the CNR mode of Intel® oneAPI Math Kernel Library.

mkl_cbwr_get

Returns the current CNR settings.

mkl_cbwr_get_auto_branch

Automatically detects the CNR code branch for your platform.

Miscellaneous

mkl_progress

Provides progress information.

mkl_enable_instructions

Enables dispatching for new Intel® architectures or restricts the set of Intel® instruction sets available for dispatching.

mkl_set_env_mode

Set up the mode that ignores environment settings specific to Intel® oneAPI Math Kernel Library.

mkl_verbose

Enable or disable Intel® oneAPI Math Kernel Library Verbose mode.

mkl_verbose_output_file

Write output in Intel® oneAPI Math Kernel Library Verbose mode to a file.

mkl_set_mpi

Sets the implementation of the message-passing interface to be used by Intel® oneAPI Math Kernel Library.

mkl_finalize

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

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201