Vectorization Modes; Maximal Vectorization; Mixed Vectorization - National Instruments AutoCode NI MATRIX Reference

National instruments ni matrixx reference manual
Table of Contents

Advertisement

/* ----------------------------
/* {gain..2} */
Y->gain_2_1[0] = 1.2*U->gain_1[0];
Y->gain_2_1[1] = 2.3*U->gain_1[2];
Y->gain_2_1[2] = 3.4*U->gain_1[3];
Y->gain_2_1[3] = 4.5*U->gain_1[5];
Y->gain_2_1[4] = 5.6*U->gain_1[6];

Vectorization Modes

Maximal Vectorization

Mixed Vectorization

© National Instruments Corporation
This example shows that the penalty for poor connectivity can be great.
In this case, the vectorized code is not an improvement over scalar code.
AutoCode supports two vectorization modes in addition to the default
scalar code generation. All three modes are controlled by one
command-line option,
modes allow the same model to be code generated in several ways to suite
your particular goals. The following sections briefly describe each mode.
Maximal vectorization (mode
supported by AutoCode. Maximal vectorization is defined by placing all of
the outputs of a block into one or more arrays. For most blocks, only one
array is needed because the block can only have one output data type. For
blocks with more than one output data type, more than one array is used.
External inputs also are formed into arrays and like the basic block, if
mixed data types are used, multiple arrays are generated.
The names of the arrays are taken from the label/name of the first signal
bundled into the array. As a result, maximal vectorization might not
produce generated code that is very traceable back to the diagram. This
vectorization mode is to provide a quick way to get vectorized code without
having to examine your model's design and tune it for efficient code.
This vectorization mode (mode
code generation within the same system. This mode also is called
vector-by-label because the labels/names of the signals determine if a
vector is generated.
Chapter 6
Gain Block */
, where
is the mode. The vectorization
-Ov n
n
) is one of two vectorization modes
-Ov 2
) allows for both scalar and vector
-Ov 1
6-7
Vectorized Code Generation
AutoCode Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Autocode ni matrixx

Table of Contents