text: /*
   * Academic License - for use in teaching, academic research, and meeting
   * course requirements at degree granting institutions only.  Not for
   * government, commercial, or other organizational use.
   * File: _coder_psgolayp_mex.c
   *
   * MATLAB Coder version            : 3.3
   * C/C++ source code generated on  : 22-Jan-2019 16:55:26
   */
  
  /* Include Files */
  #include "_coder_psgolayp_api.h"
  #include "_coder_psgolayp_mex.h"
  
  /* Function Declarations */
  static void psgolayp_mexFunction(int32_T nlhs, mxArray *plhs[1], int32_T nrhs,
    const mxArray *prhs[3]);
  
  /* Function Definitions */
  
  /*
   * Arguments    : int32_T nlhs
   *                const mxArray *plhs[1]
   *                int32_T nrhs
   *                const mxArray *prhs[3]
   * Return Type  : void
   */
  static void psgolayp_mexFunction(int32_T nlhs, mxArray *plhs[1], int32_T nrhs,
    const mxArray *prhs[3])
  {
    int32_T n;
    const mxArray *inputs[3];
    const mxArray *outputs[1];
    int32_T b_nlhs;
  
    /* Check for proper number of arguments. */
    if (nrhs != 3) {
      emlrtErrMsgIdAndTxt(emlrtRootTLSGlobal, "EMLRT:runTime:WrongNumberOfInputs",
                          5, 12, 3, 4, 8, "psgolayp");
    }
  
    if (nlhs > 1) {
      emlrtErrMsgIdAndTxt(emlrtRootTLSGlobal,
                          "EMLRT:runTime:TooManyOutputArguments", 3, 4, 8,
                          "psgolayp");
    }
  
    /* Temporary copy for mex inputs. */
    for (n = 0; n < nrhs; n++) {
      inputs[n] = prhs[n];
    }
  
    /* Call the function. */
    psgolayp_api(inputs, outputs);
  
    /* Copy over outputs to the caller. */
    if (nlhs < 1) {
      b_nlhs = 1;
    } else {
      b_nlhs = nlhs;
    }
  
    emlrtReturnArrays(b_nlhs, plhs, outputs);
  
    /* Module termination. */
    psgolayp_terminate();
  }
  
  /*
   * Arguments    : int32_T nlhs
   *                const mxArray * const plhs[]
   *                int32_T nrhs
   *                const mxArray * const prhs[]
   * Return Type  : void
   */
  void mexFunction(int32_T nlhs, mxArray *plhs[], int32_T nrhs, const mxArray
                   *prhs[])
  {
    mexAtExit(psgolayp_atexit);
  
    /* Initialize the memory manager. */
    /* Module initialization. */
    psgolayp_initialize();
  
    /* Dispatch the entry-point. */
    psgolayp_mexFunction(nlhs, plhs, nrhs, prhs);
  }
  
  /*
   * Arguments    : void
   * Return Type  : emlrtCTX
   */
  emlrtCTX mexFunctionCreateRootTLS(void)
  {
    emlrtCreateRootTLS(&emlrtRootTLSGlobal, &emlrtContextGlobal, NULL, 1);
    return emlrtRootTLSGlobal;
  }
  
  /*
   * File trailer for _coder_psgolayp_mex.c
   *
   * [EOF]
   */
  