Chapter 6
Vectorized Code Generation
Example 6-7
Generated Code for Split Vector (for Figure 6-4)
/***** Output Update. *****/
/* ----------------------------
/* {gain.top.2} */
for (i=1; i<=5; i++) {
top[-1+i] = R_P[-1+i]*U->gain_1[-1+i];
}
/* ----------------------------
/* {gain.bottom.1} */
for (i=1; i<=5; i++) {
bottom[-1+i] = R_P[4+i]*U->gain_1[4+i];
}
/* ----------------------------
/* {gain..99} */
for (i=1; i<=2; i++) {
Y->result[-1+i] = R_P[9+i]*top[-4+4*i];
}
Y->result[2] = 3.4*bottom[2];
Y->result[3] = 4.5*top[1];
Y->result[4] = 5.6*bottom[0];
Y->result[5] = 6.7*top[1];}
AutoCode Reference
Figure 6-4. Example of a Split Vector
Gain Block */
Gain Block */
Gain Block */
6-18
ni.com
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?
Questions and answers