Developer Guide


Using the stdcall Calling Convention in C/C++

Intel® MKL
supports stdcall calling convention for the following function domains:
  • BLAS, except CBLAS, compact API, and JIT API
  • Sparse BLAS
  • Vector Mathematics
  • Vector Statistics (VS)
  • Intel® MKL
    a direct sparse solver based on Parallel Direct Sparse Solver (PARDISO*)
  • Direct Sparse Solvers
  • RCI Iterative Solvers for Linear Problems (Iterative Sparse Solvers based on Reverse Communication Interface)
  • Support Functions
To use the stdcall calling convention in C/C++, follow the guidelines below:
  • In your function calls, pass lengths of character strings to the functions. For example, compare the following calls to the VS function
    errstatus = vslLoadStreamF(&stream, "streamfile.bin");
    errstatus = vslLoadStreamF(&stream, "streamfile.bin", 14);
  • Define the
    macro using either of the following techniques:
    • Define the macro in your source code before including
      Intel® MKL
      header files:
      ... #define MKL_STDCALL #include "mkl.h" ...
    • Pass the macro to the compiler. For example:
      icl -DMKL_STDCALL foo.c
  • Link your application with the following library:
    • mkl_intel_s.lib
      for static linking
    • mkl_intel_s_dll.lib
      for dynamic linking
      Avoid linking with the Single Dynamic Library
      because its support of the stdcall calling convention is limited.

Product and Performance Information


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