Chapter 6 Vectorized Code Generation
© National Instruments Corporation 6-23 AutoCode Reference
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 Y-structure, but preserves rolling, and there would be
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 Y-structure, and thus having all of the
block outputs connected to external output is sufficient.
Vectorized Standard Procedure Interface
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 no-uy procedure interface,
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. Figure6 -7 shows an example of this feature,
and Example 6-10 shows the code generated.