File: _coder_ccafbounds_mex.c

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