Deterministic functions
Description
Specify which custom code functions are deterministic, that is, always producing the same outputs for the same inputs. If a custom code function is specified as deterministic, then a C Caller or C Function block that calls that function can be used in a For Each subsystem or with continuous sample time, and the block is optimized for use in conditional input branch execution. When a block is optimized for use in conditional input branch execution, it is executed only if it is in the active branch of a Switch or Multiport Switch block, both in simulation and in generated code. See Conditional input branch execution. This parameter is enabled only if Import custom code is selected.
Category: Simulation Target
Settings
Default:
None
None
None of the custom code functions are deterministic.
All
All of the custom code functions are deterministic.
By function
The custom code functions that are deterministic are listed in Specify by function.
Note
If a C Function block
references any custom code global variables in its
code, then this parameter must be set to
All
in order for the
block to be used in a For Each subsystem or with
continuous sample time, or to be optimized for use
in conditional input branch execution.
Command-Line Information
Parameter:
DefaultCustomCodeDeterministicFunctions |
Type: character vector |
Value:
'None' |
'All' |
'ByFunction' |
Default:
'None'
|
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |