Vectorized Standard Procedure Interface
© National Instruments Corporation
Eliminating Copy-Back
There are many design ways to eliminate or hide the extra copies of the
copy-back. All of them can be categorized into two groups:
•
Use Mixed Vectorization mode and force scalars to be used for the
block is sparse external outputs. This eliminates rolling of the block
algorithm while eliminating the copy.
•
Take all of the outputs of the block as external outputs. This adds more
elements to the
-structure, but preserves rolling, and there would be
Y
no copy-backs.
Other Copy-Back Scenarios
Copy-backs are most common at the top-level SuperBlock of a single-rate
system, and with Standard Procedures external outputs. In a single-rate
subsystem or Standard Procedure, it is important to notice that just having
all of the block outputs connected to external output will not eliminate the
copy-back unless the outputs are connected to contiguous pins of the
external output. Multi-rate systems are more forgiving, because AutoCode
will rearrange the outputs within the
block outputs connected to external output is sufficient.
Another feature of the vectorized generated code is the ability to provide an
efficient mechanism to pass data into and out of standard procedures. When
generating vectorized code coupled with the
AutoCode creates arrays to be passed to the procedures. Passing an array
means passing by pointer, and that translates into a significant decrease in
the procedure call overhead. Figure 6-7 shows an example of this feature,
and Example 6-10 shows the code generated.
Chapter 6
-structure, and thus having all of the
Y
6-23
Vectorized Code Generation
procedure interface,
no-uy
AutoCode Reference
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?
Questions and answers