Use precompiled libraries for MATLAB functions
Instruct the code generator to favor usage of either precompiled libraries or alternative implementations
Since R2024b
Model Configuration Pane: Simulation Target
Description
This parameter specifies the extent to which the code generated for the MATLAB® functions in your model includes calls to precompiled libraries.
For certain precompiled libraries (for example, BLAS, LAPACK, and FFTW), there exist individual configuration parameters that allow you to customize their usage in the generated code. The Use precompiled libraries for MATLAB functions parameter does not affect the use of these libraries.
Settings
Prefer precompiled libraries when available
| Avoid precompiled libraries when possible
Prefer precompiled libraries when available
The code generator prefers to use the available platform-specific precompiled libraries.
For simulation or C/C++ code generation, this value is the default value.
This setting is an appropriate choice when you want to optimize the performance of your model or the generated code for specific platforms.
Avoid precompiled libraries when possible
The code generator uses precompiled libraries only if no alternative implementations of their algorithms are available.
For GPU acceleration or code generation, this value is the default value.
This setting is useful when you want to create portable applications that can run on many platforms.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | Prefer precompiled libraries when available |
Safety precaution | Avoid precompiled libraries when possible |
Programmatic Use
Parameter:
UsePrecompiledLibraries
|
Type: string | character vector |
Values:
"Prefer | "Avoid" |
Default:
"Prefer" (C/C++) | "Avoid" (CUDA®) |
Version History
Introduced in R2024b