Create, modify, and validate content of code replacement libraries
At the command prompt, type crtool
.
Name
— Name of table entry (read-only)Conceptual name of the function or operation being replaced. Can name a math operation, function, BLAS operation, CBLAS operation, net slope fixed-point operation, semaphore or mutex entry, or customization entry.
Implementation
— Name of replacement functionName of the implementation (replacement) function.
NumIn
— Number of input arguments (read-only)Number of input arguments.
Inn
Type
— Data type of conceptual input argumentData type of a conceptual input argument.
Outn
Type
— Data type of conceptual output argumentData type of a conceptual output argument.
Priority
— Entry match priorityThe entry match priority, relative to other entries of the same name and to the conceptual argument list within the selected code replacement library. The priority can range from 0 to 100, with 0 being the highest priority. The default is 100. If the library provides two implementations for a function or operator, the implementation with the higher priority shadows the one with the lower priority.
Function/Operation
— Name of table entryConceptual name of the function or operation being replaced. Can name a math operation, function, BLAS operation, CBLAS operation, net slope fixed-point operation, semaphore or mutex entry, or customization entry.
Algorithm
— Computation or approximation algorithmComputation or approximation algorithm configured for a function or operation being replaced. For example, you can configure:
The Reciprocal Sqrt block to use the
Newton-Raphson
computation
method.
The Trigonometric Function block, with
Function set to
sin
, cos
,
or sincos
, to use the approximation
method CORDIC
.
An addition or subtraction operation, to use the cast-before-operation or cast-after-operation algorithm.
Conceptual arguments
— Conceptual argument namesNames of input and output arguments of function or operation being
replaced. Conceptual arguments observe naming conventions
(y1
, u1
, u2
,
...) and data types familiar to the code generator.
Data type (conceptual)
— Conceptual argument data typeData type of a selected input or output argument of the function or operation being replaced. Conceptual arguments observe data types familiar to the code generator.
Complex (conceptual)
— Conceptual argument complexityWhether the selected input or output argument of the function or operation being replaced is real or complex.
Argument type
— Conceptual argument typeWhether the selected input or output argument of the function or operation
being replaced is a scalar value or a matrix. If you select
Matrix
, parameters for specifying range
dimensions, and for replacement of MATLAB code, array layout appear.
Lower range
— Lower range of matrix dimensionsVector that specifies the lower range of the matrix dimensions.
Upper range
— Upper range of matrix dimensionsVector that specifies the upper range of the matrix dimensions.
Array layout supported by entry
— Layout for array storageOrder in which array elements are stored in memory. Row-major layout can improve performance for certain algorithms and ease integration with external code or data that uses the row-major layout.
Make conceptual and implementation argument types the same
— Data type consistencyWhether you want the data types for your implementation arguments to be
the same as the conceptual argument types. For example, most ANSI-C
functions operate on and return double
data. Clear the
check box if want to map the conceptual representation of a function or
operation to an implementation representation that specifies an argument and
return value. For example, clear the check box to map the conceptual
representation of the function sin
to an implementation
representation that specifies an argument and return value of type
single
(single
sin
(single
)).
Name
— Name of replacement functionName of the replacement function.
C++ namespace
— Namespace of replacement functionNamespace of the replacement function.
Function returns void
— Function returns voidWhether your implementation function returns void
.
Function arguments
— Replacement argument namesNames of input and output arguments of your replacement function.
Data type (replacement)
— Replacement argument data typeData type of a selected input or output argument of your replacement function.
I/O type
— Replacement argument I/O typeWhether a selected argument of your replacement function is an input or output argument.
Const
— Const replacement argument Whether to apply the const
type qualifier to a selected
argument of your replacement function.
Pointer
— Pointer replacement argument Whether a selected argument of your replacement function is a pointer.
Complex (replacement)
— Replacement argument complexityWhether the selected input or output argument of the replacement function is real or complex.
Integer saturation mode
— Saturation modeSaturation mode supported by the replacement function.
Rounding modes
— Rounding modesRounding modes supported by the replacement function.
Allow expressions as inputs
— Expressions as inputsWhether your replacement function accepts expression inputs. If you select the parameter, the code generator integrates an expression input into the generated code rather than inserting a temporary variable in place of the expression input.
Function modifies internal or global state
— State modificationWhether your replacement function modifies variables representing internal or global state.
Implementation header file
— Header file for replacement functionHeader file for the replacement function (for example,
my_rep_func.h
).
Implementation source file
— Source file for replacement functionSource file for the replacement function (for example,
my_rep_func.c
).
Additional header files/include paths
— Names and paths of additional header filesNames and paths of additional header files to include for the replacement
function (for example, support_files.h
and
matlab\customization\mylib\include
).
Additional source files/ paths
— Names and paths of additional source filesNames and paths of additional source files to include for the replacement
function (for example, support_files.c
and
matlab\customization\mylib\src
).
Additional object files/ paths
— Names and paths of link object filesNames and paths of link object files to use for the replacement function
(for example, support_files.o
and
matlab\customization\mylib\bin
).
Additional link flags
— Link flags to useLink flags to use for the replacement function (for example, -MD
-Gy
).
Additional compile flags
— Compile flags to useCompile flags to use for the replacement function (for example,
-Zi -Wall
).
Copy files to build directory
— Copy files to build folderWhether the code generator copies files from external folders to the build folder before starting the build process.