File: TransitiveKNN_part2_mex.c

    1   /*
    2    * TransitiveKNN_part2_mex.c
    3    *
    4    * Code generation for function 'TransitiveKNN_part2'
    5    *
    6    * C source code generated on: Wed Nov 19 10:38:03 2014
    7    *
    8    */
    9   
   10   /* Include files */
   11   #include "mex.h"
   12   #include "TransitiveKNN_part2.h"
   13   
   14   /* Function Declarations */
   15   static void TransitiveKNN_part2_mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]);
   16   
   17   /* Variable Definitions */
   18   emlrtContext emlrtContextGlobal = { true, false, EMLRT_VERSION_INFO, NULL, "TransitiveKNN_part2", NULL, false, {2045744189U,2170104910U,2743257031U,4284093946U}, NULL };
   19   void *emlrtRootTLSGlobal = NULL;
   20   
   21   /* Function Definitions */
   22   static void TransitiveKNN_part2_mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
   23   {
   24     mxArray *outputs[3];
   25     mxArray *inputs[6];
   26     int n = 0;
   27     int nOutputs = (nlhs < 1 ? 1 : nlhs);
   28     int nInputs = nrhs;
   29     emlrtStack stack={0,0,0}; /* Root of the run-time stack. */
   30     /* Module initialization. */
   31     TransitiveKNN_part2_initialize(&stack, &emlrtContextGlobal);
   32     /* Check for proper number of arguments. */
   33     if (nrhs != 6) {
   34       emlrtErrMsgIdAndTxt(emlrtRootTLSGlobal, "EMLRT:runTime:WrongNumberOfInputs", 5, mxINT32_CLASS, 6, mxCHAR_CLASS, 19, "TransitiveKNN_part2");
   35     } else if (nlhs > 3) {
   36       emlrtErrMsgIdAndTxt(emlrtRootTLSGlobal, "EMLRT:runTime:TooManyOutputArguments", 3, mxCHAR_CLASS, 19, "TransitiveKNN_part2");
   37     }
   38     /* Temporary copy for mex inputs. */
   39     for (n = 0; n < nInputs; ++n) {
   40       inputs[n] = (mxArray *)prhs[n];
   41     }
   42     /* Call the function. */
   43     TransitiveKNN_part2_api(&stack, (const mxArray**)inputs, (const mxArray**)outputs);
   44     /* Copy over outputs to the caller. */
   45     for (n = 0; n < nOutputs; ++n) {
   46       plhs[n] = emlrtReturnArrayR2009a(outputs[n]);
   47     }
   48     /* Module finalization. */
   49     TransitiveKNN_part2_terminate(&stack);
   50   }
   51   
   52   void TransitiveKNN_part2_atexit_wrapper(void)
   53   {
   54     emlrtStack stack={0,0,0}; /* Root of the run-time stack. */
   55      TransitiveKNN_part2_atexit(&stack);
   56   }
   57   
   58   void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
   59   {
   60     /* Initialize the memory manager. */
   61     mexAtExit(TransitiveKNN_part2_atexit_wrapper);
   62     /* Dispatch the entry-point. */
   63     TransitiveKNN_part2_mexFunction(nlhs, plhs, nrhs, prhs);
   64   }
   65   /* End of code generation (TransitiveKNN_part2_mex.c) */
   66