%% Choose a Code Replacement Library
% This example shows how to choose a code replacement library. Code replacement is a technique you can use to change the code that the code generator produces for functions and operators to meet application code requirements. For example, you can replace generated code to meet requirements such as:
% Optimization for a specific run-time environment, including, but not limited to, specific target hardware.
% Integration with existing application code.
% Compliance with a standard, such as AUTOSAR.
% Modification of code behavior, such as enabling or disabling nonfinite or inline support.
% Application- or project-specific code requirements, such as elimination of math.h, system header files, or calls to memcpy or memset, or use of BLAS.
% By default, the code generator does not use a code replacement library.
%% About Choosing a Code Replacement Library
% If you are considering using a code replacement library:
% 1. Explore available libraries. Identify one that best meets your application needs.
% Consider the lists of application code replacement requirements and libraries that MathWorks® provides in docid:rtw_ug.buiy0s4.
% See "Explore Available Code Replacement Libraries."
% 2. Explore the contents of the library. See "Explore Code Replacement Library Contents."
% If you do not find a suitable library and you have an Embedded Coder® license, you can create a custom code replacement library. For more information, see docid:ecoder_ug.bujbnct in the Embedded Coder documentation.
%% Explore Available Code Replacement Libraries
% To use a Code replacement library for code generation, select the library from the Configuration Parameters > Code Generation > Interface pane. To view a description of a library, select and hover your cursor over the library name. A tooltip describes the library and lists the tables that it contains. The tooltip lists the tables in the order that the code generator searches for a function or operator match.
%% Explore Code Replacement Library Contents
% Use the Code Replacement Viewer to explore the content of a code replacement library.
% 1. At the command prompt, type crviewer.

crviewer

%
% The viewer opens. To view the content of a specific library, specify the name of the library as an argument in single quotes. For example:

crviewer('GNU C99 extensions')

% 2. In the left pane, select the name of a library. The viewer displays information about the library in the right pane.
% 3. In the left pane, expand the library, explore the list of tables it contains, and select a table from the list. In the middle pane, the viewer displays the function and operator entries that are in that table with abbreviated information for each entry.
% In the middle pane, select a function or operator. The viewer displays information from the table entry in the right pane.
% If you select an operator entry that specifies net slope fixed-point parameters (instantiated from entry class RTW.TflCOperationEntryGenerator or  RTW.TflCOperationEntryGenerator_NetSlope), the viewer displays a tab that shows fixed-point settings.
% See Code Replacement Viewer for details on what the viewer displays.
%
%% More About
% docid:rtw_ug.buiy0s4
% Code replacement library
% Code Replacement Viewer
% Replace Code Generated from Simulink Models
% Copyright 2016 The MathWorks, Inc.