ssGetInputPortRequiredContiguous
Determine whether the signal elements entering a port must be contiguous
Syntax
int_T ssGetInputPortRequiredContiguous(SimStruct *S, int_T port)
Arguments
SSimStruct that represents an S-Function block.
portIndex of an input port.
Returns
An int_T (1 or 0) or
boolean_T (true or
false) value indicating if the signal elements entering a
port must be contiguous.
Description
Use to determine if the signal elements entering a port must be contiguous.
Returns 1 (true) if the signal elements
entering the specified port must occupy contiguous areas of memory. Otherwise,
returns 0 (false). If the elements are
contiguous, a method can access the elements of the signal simply by incrementing
the signal pointer returned by ssGetInputPortSignal.
Note
By default, the flag is set to false
(0), which uses the
ssGetInputPortSignalPtrs function to access
non-contiguous input signals. However, starting in R2026a, S-Function blocks
support only contiguous inputs. Set the flag to true
(1) and use the contiguous input function ssGetInputPortSignal. The
contiguous input functions provide faster access and improved performance by
removing the need for double pointer to access signals.
Languages
C, C++
Examples
See the reference page for ssGetInputPortSignal for an
example that uses this function.
Version History
Introduced before R2006a