Using MKL_DIRECT_CALL in C
Applications
The following examples of code and link lines show how to activate direct calls to kernels in C applications:
Intel® oneAPI Math Kernel Library
- Include themkl.hheader file:#include "mkl.h" int main(void) { // Call Intel MKL DGEMM return 0; }
- For multi-threaded, compile withIntel® oneAPI Math Kernel LibraryMKL_DIRECT_CALLpreprocessor macro:icc –DMKL_DIRECT_CALL -std=c99 your_application.c $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -lpthread –lm -openmp -I$(MKLROOT)/include
- To usein the sequential mode, compile withIntel® oneAPI Math Kernel LibraryMKL_DIRECT_CALL_SEQpreprocessor macro:icc –DMKL_DIRECT_CALL_SEQ -std=c99 your_application.c $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -lpthread –lm -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
|