Main Content

Use precompiled libraries

Whether to use precompiled libraries in generated code

Since R2024b

Description

App Configuration Pane: Custom Code

Configuration Objects: coder.MexCodeConfig | coder.CodeConfig | coder.EmbeddedCodeConfig

The Use precompiled libraries specifies the extent to which the generated code uses platform-specific precompiled libraries.

If you want to optimize the performance of the generated code for a specific platform, instruct the code generator to prefer to use precompiled libraries when available.

If you want to create portable applications that can run on many platforms, instruct the code generator to avoid using precompiled libraries if alternative implementations of their algorithms are available.

For certain precompiled libraries (for example, BLAS, LAPACK, and FFTW), there exist individual configuration parameters that allow you to customize their usage. The Use precompiled libraries parameter does not affect the use of these libraries.

Settings

Prefer precompiled libraries when available

The code generator prefers to use the available platform-specific precompiled libraries. For C/C++ code generation, this is the default value.

Avoid precompiled libraries when possible

The code generator uses platform-specific precompiled libraries only if no alternative implementations of their algorithms are available. For CUDA® code generation (requires GPU Coder™), this is the default value.

Programmatic Use

Property: UsePrecompiledLibraries
Values: 'Prefer' | 'Avoid'
Default: 'Prefer'

Version History

Introduced in R2024b