Overview
Comment: | Fixed some memory leaks. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0ff8fc3bcaea1c2f87089cebe648d374 |
User & Date: | geraint@users.sourceforge.net on 2002-05-14 20:19:06 |
Other Links: | branch diff | manifest | tags |
Context
2002-05-15
| ||
11:01:24 | New PI controller component check-in: 2d57a51128 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2002-05-14
| ||
20:19:06 | Fixed some memory leaks. check-in: 0ff8fc3bca user: geraint@users.sourceforge.net tags: origin/master, trunk | |
15:43:41 | Complete rewrite check-in: 63d93d8226 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/lib/rep/sfun_rep/sfun.cc.tmpl from [0ed4c539b6] to [3d56d803b8].
︙ | |||
102 103 104 105 106 107 108 109 110 111 112 113 114 115 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | + + | prhs[0] = P; mexCallMATLAB (1, plhs, 1, prhs, "<mtt_model_name>_state"); for (int i = 0; i < MTTNX; i++) { ssGetContStates (S)[i] = states [i]; } mxDestroyArray (plhs[0]); } static void mdlOutputs(SimStruct *S, int_T tid) { static mxArray *plhs[1]; static mxArray *prhs[4]; |
︙ | |||
127 128 129 130 131 132 133 134 135 136 137 138 139 140 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | + + | mexCallMATLAB (1, plhs, 4, prhs, "<mtt_model_name>_odeo"); double *outputs = mxGetPr (plhs[0]); for (int i = 0; i < MTTNY; i++) { ssGetOutputPortRealSignal (S,i)[0] = outputs [i]; } mxDestroyArray (plhs[0]); } #define MDL_DERIVATIVES static void mdlDerivatives(SimStruct *S) { static mxArray *plhs[1]; static mxArray *prhs[4]; |
︙ | |||
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | + + | mexCallMATLAB (1, plhs, 4, prhs, "<mtt_model_name>_ode"); double *rates= mxGetPr (plhs[0]); for (int i = 0; i < MTTNX; i++) { ssGetdX (S)[i] = rates [i]; } mxDestroyArray (plhs[0]); } static void mdlTerminate(SimStruct *S) { UNUSED_ARG(S); } #ifdef MATLAB_MEX_FILE /* Is this file being compiled as a MEX-file? */ #include "simulink.c" /* MEX-file interface mechanism */ #else #include "cg_sfun.h" /* Code generation registration function */ #endif |