Chapter 6 Vectorized Code Generation
AutoCode Reference 6-24 ni.com
Figure 6-7. Vectorized Procedure Interface
Example 6-10 Generated Code (for Figure6-7)
/******* Procedure: vecproc *******/
void vecproc(vecproc_1, vecproc_2_1, I)
RT_FLOAT vecproc_1[5];
RT_FLOAT vecproc_2_1[5];
struct _vecproc_info *I;
{
/****
some code deleted
****/
/***** Output Update. *****/
/* ---------------------------- Gain Block */
/* {vecproc..2} */
for (i=1; i<=5; i++) {
vecproc_2_1[-1+i] = R_P[-1+i]*vecproc_1[-1+i];
}
}
void subsys_1(U, Y)
struct _Sys_ExtIn *U;
struct _Subsys_1_out *Y;
{
/****
some code deleted
****/
/***** Output Update. *****/
/* ---------------------------- Gain Block */
/* {gain.top.2} */
for (i=1; i<=5; i++) {