File: _coder_calculateTransformations_mex.c

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