Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Speeding Up Simulation with the Basic Linear Algebra Subprograms (BLAS) Library

How Embedded MATLAB Functions Use the BLAS Library

The Basic Linear Algebra Subprograms (BLAS) Library is a library of external linear algebra routines optimized for fast computation of low-level matrix operations. By default, Embedded MATLAB functions call BLAS library routines to speed up simulation, except in these cases:

When to Disable BLAS Library Support

Consider disabling BLAS library support for Embedded MATLAB functions when:

How to Disable BLAS Library Support

Embedded MATLAB functions enable BLAS library support by default, but you can disable this feature explicitly from the command line or the Compiler Options dialog box. Follow these steps:

  1. Define the MEX configuration object in the MATLAB workspace by issuing a constructor command, like this:

    mexcfg = emlcoder.MEXCfg
  2. Disable the BLAS option, either from the command line or Automatic MEX Generation dialog box.

    From the command line set the enableBLAS property false by issuing a command like this:

    mexcfg.enableBLAS = false;

    From the Automatic MEX Generation dialog box, follow these steps:

    1. Open the Automatic MEX Generation dialog box by issuing a command like this:

      open mexcfg
    2. Uncheck the Use BLAS library if possible check box and click Apply.

Supported Compilers

The Embedded MATLAB subset uses the BLAS library on all C/C++ compilers except:

The default MATLAB compiler, lcc, supports the BLAS library. To install a different C/C++ compiler, use the mex -setup command, as described in Building MEX-Files in the MATLAB External Interfaces documentation.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS