#### File: _coder_MLS_applyDeform_mex.c
        1   /*
        2    * _coder_MLS_applyDeform_mex.c
        3    *
        4    * Code generation for function '_coder_MLS_applyDeform_mex'
        5    *
        6    */
        7
        8   /* Include files */
        9   #include "MLS_applyDeform.h"
       10   #include "_coder_MLS_applyDeform_mex.h"
       11   #include "MLS_applyDeform_terminate.h"
       12   #include "_coder_MLS_applyDeform_api.h"
       13   #include "MLS_applyDeform_initialize.h"
       14   #include "MLS_applyDeform_data.h"
       15
       16   /* Function Declarations */
       17   static void MLS_applyDeform_mexFunction(int32_T nlhs, mxArray *plhs[2], int32_T
       18     nrhs, const mxArray *prhs[4]);
       19
       20   /* Function Definitions */
       21   static void MLS_applyDeform_mexFunction(int32_T nlhs, mxArray *plhs[2], int32_T
       22     nrhs, const mxArray *prhs[4])
       23   {
       24     int32_T n;
       25     const mxArray *inputs[4];
       26     const mxArray *outputs[2];
       27     int32_T b_nlhs;
       28     emlrtStack st = { NULL,              /* site */
       29       NULL,                              /* tls */
       30       NULL                               /* prev */
       31     };
       32
       33     st.tls = emlrtRootTLSGlobal;
       34
       35     /* Check for proper number of arguments. */
       36     if (nrhs != 4) {
       37       emlrtErrMsgIdAndTxt(&st, "EMLRT:runTime:WrongNumberOfInputs", 5, 12, 4, 4,
       38                           15, "MLS_applyDeform");
       39     }
       40
       41     if (nlhs > 2) {
       42       emlrtErrMsgIdAndTxt(&st, "EMLRT:runTime:TooManyOutputArguments", 3, 4, 15,
       43                           "MLS_applyDeform");
       44     }
       45
       46     /* Temporary copy for mex inputs. */
       47     for (n = 0; n < nrhs; n++) {
       48       inputs[n] = prhs[n];
       49       if (*emlrtBreakCheckR2012bFlagVar != 0) {
       50         emlrtBreakCheckR2012b(&st);
       51       }
       52     }
       53
       54     /* Call the function. */
       55     MLS_applyDeform_api(inputs, outputs);
       56
       57     /* Copy over outputs to the caller. */
       58     if (nlhs < 1) {
       59       b_nlhs = 1;
       60     } else {
       61       b_nlhs = nlhs;
       62     }
       63
       64     emlrtReturnArrays(b_nlhs, plhs, outputs);
       65
       66     /* Module termination. */
       67     MLS_applyDeform_terminate();
       68   }
       69
       70   void mexFunction(int32_T nlhs, mxArray *plhs[], int32_T nrhs, const mxArray
       71                    *prhs[])
       72   {
       73     mexAtExit(MLS_applyDeform_atexit);
       74
       75     /* Initialize the memory manager. */
       76     /* Module initialization. */
       77     MLS_applyDeform_initialize();
       78
       79     /* Dispatch the entry-point. */
       80     MLS_applyDeform_mexFunction(nlhs, plhs, nrhs, prhs);
       81   }
       82
       83   emlrtCTX mexFunctionCreateRootTLS(void)
       84   {
       85     emlrtCreateRootTLS(&emlrtRootTLSGlobal, &emlrtContextGlobal, NULL, 1);
       86     return emlrtRootTLSGlobal;
       87   }
       88
       89   /* End of code generation (_coder_MLS_applyDeform_mex.c) */
       90