Developer Guide

Contents

Using MKL_DIRECT_CALL in C Applications

The following examples of code and link lines show how to activate direct calls to
Intel® oneAPI Math Kernel Library
kernels in C applications:
  • Include the
    mkl.h
    header file:
    #include "mkl.h" int main(void) { // Call Intel MKL DGEMM return 0; }
  • For multi-threaded
    Intel® oneAPI Math Kernel Library
    , compile with
    MKL_DIRECT_CALL
    preprocessor macro:
    icl /DMKL_DIRECT_CALL /Qstd=c99 your_application.c mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib /Qopenmp -I%MKLROOT%/include
  • To use
    Intel® oneAPI Math Kernel Library
    in the sequential mode, compile with
    MKL_DIRECT_CALL_SEQ
    preprocessor macro:
    icl /DMKL_DIRECT_CALL_SEQ /Qstd=c99 your_application.c mkl_intel_lp64.lib mkl_core.lib mkl_sequential.lib -I%MKLROOT%/include
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.
Notice revision #20201201

Product and Performance Information

1

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