Chapter 6
Vectorized Code Generation
6-10
ni.com
static struct _Subsys_1_states *X;
static struct _Subsys_1_states *XD;
static struct _Subsys_1_states *XTMP;
static RT_INTEGER iinfo[4];
static RT_INTEGER INIT;
/***** Parameters. *****/
static RT_FLOAT R_P[11];
RT_INTEGER cnt;
static const RT_FLOAT _R_P[11] = {0.1, 0.0, 0.0, 0.0, 0.0,
0.0, -8.7, -7.6, -6.5,
-5.4, -4.3};
/***** Local Block Outputs. *****/
RT_FLOAT Throttle[5];
/***** Algorithmic Local Variables. *****/
RT_INTEGER i;
RT_INTEGER j;
RT_INTEGER k;
/******* Initialization. *******/
if (SUBSYS_PREINIT[1]) {
iinfo[0] = 0;
iinfo[1] = 1;
iinfo[2] = 1;
iinfo[3] = 1;
INIT = 1;
X = &ss_1_states[0];
XD = &ss_1_states[1];
{
RT_INTEGER ii;
for( ii=0;ii<5;ii++ ) {
X->sensor_delay[ii] = 0.0;
}
}
{
RT_INTEGER ii;
for( ii=0;ii<5;ii++ ) {
XD->sensor_delay[ii] = 0.0;
}
}
for( cnt=0;cnt<11;cnt++ ) {
R_P[cnt] = _R_P[cnt];