/*
* File: _coder_compute_angle_api.c
*
* MATLAB Coder version : 3.4
* C/C++ source code generated on : 10-Jun-2018 18:37:29
*/
/* Include Files */
#include "tmwtypes.h"
#include "_coder_compute_angle_api.h"
#include "_coder_compute_angle_mex.h"
/* Variable Definitions */
emlrtCTX emlrtRootTLSGlobal = NULL;
emlrtContext emlrtContextGlobal = { true,/* bFirstTime */
false, /* bInitialized */
131451U, /* fVersionInfo */
NULL, /* fErrorFunction */
"compute_angle", /* fFunctionName */
NULL, /* fRTCallStack */
false, /* bDebugMode */
{ 2045744189U, 2170104910U, 2743257031U, 4284093946U },/* fSigWrd */
NULL /* fSigMem */
};
/* Function Declarations */
static void b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId, emxArray_real_T *y);
static const mxArray *b_emlrt_marshallOut(const real_T u);
static void c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *Xsum, const
char_T *identifier, emxArray_real_T *y);
static void d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId, emxArray_real_T *y);
static real_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *n, const
char_T *identifier);
static void emlrt_marshallIn(const emlrtStack *sp, const mxArray *X, const
char_T *identifier, emxArray_real_T *y);
static const mxArray *emlrt_marshallOut(const emxArray_real_T *u);
static void emxFree_real_T(emxArray_real_T **pEmxArray);
static void emxInit_real_T(const emlrtStack *sp, emxArray_real_T **pEmxArray,
int32_T numDimensions, boolean_T doPush);
static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId);
static void g_emlrt_marshallIn(const emlrtStack *sp, const mxArray *angle_at,
const char_T *identifier, emxArray_real_T *y);
static void h_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId, emxArray_real_T *y);
static void i_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
emlrtMsgIdentifier *msgId, emxArray_real_T *ret);
static void j_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
emlrtMsgIdentifier *msgId, emxArray_real_T *ret);
static real_T k_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
emlrtMsgIdentifier *msgId);
static void l_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
emlrtMsgIdentifier *msgId, emxArray_real_T *ret);
/* Function Definitions */
/*
* Arguments : const emlrtStack *sp
* const mxArray *u
* const emlrtMsgIdentifier *parentId
* emxArray_real_T *y
* Return Type : void
*/
static void b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId, emxArray_real_T *y)
{
i_emlrt_marshallIn(sp, emlrtAlias(u), parentId, y);
emlrtDestroyArray(&u);
}
/*
* Arguments : const real_T u
* Return Type : const mxArray *
*/
static const mxArray *b_emlrt_marshallOut(const real_T u)
{
const mxArray *y;
const mxArray *m1;
y = NULL;
m1 = emlrtCreateDoubleScalar(u);
emlrtAssign(&y, m1);
return y;
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *Xsum
* const char_T *identifier
* emxArray_real_T *y
* Return Type : void
*/
static void c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *Xsum, const
char_T *identifier, emxArray_real_T *y)
{
emlrtMsgIdentifier thisId;
thisId.fIdentifier = (const char *)identifier;
thisId.fParent = NULL;
thisId.bParentIsCell = false;
d_emlrt_marshallIn(sp, emlrtAlias(Xsum), &thisId, y);
emlrtDestroyArray(&Xsum);
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *u
* const emlrtMsgIdentifier *parentId
* emxArray_real_T *y
* Return Type : void
*/
static void d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId, emxArray_real_T *y)
{
j_emlrt_marshallIn(sp, emlrtAlias(u), parentId, y);
emlrtDestroyArray(&u);
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *n
* const char_T *identifier
* Return Type : real_T
*/
static real_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *n, const
char_T *identifier)
{
real_T y;
emlrtMsgIdentifier thisId;
thisId.fIdentifier = (const char *)identifier;
thisId.fParent = NULL;
thisId.bParentIsCell = false;
y = f_emlrt_marshallIn(sp, emlrtAlias(n), &thisId);
emlrtDestroyArray(&n);
return y;
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *X
* const char_T *identifier
* emxArray_real_T *y
* Return Type : void
*/
static void emlrt_marshallIn(const emlrtStack *sp, const mxArray *X, const
char_T *identifier, emxArray_real_T *y)
{
emlrtMsgIdentifier thisId;
thisId.fIdentifier = (const char *)identifier;
thisId.fParent = NULL;
thisId.bParentIsCell = false;
b_emlrt_marshallIn(sp, emlrtAlias(X), &thisId, y);
emlrtDestroyArray(&X);
}
/*
* Arguments : const emxArray_real_T *u
* Return Type : const mxArray *
*/
static const mxArray *emlrt_marshallOut(const emxArray_real_T *u)
{
const mxArray *y;
const mxArray *m0;
static const int32_T iv0[2] = { 0, 0 };
y = NULL;
m0 = emlrtCreateNumericArray(2, iv0, mxDOUBLE_CLASS, mxREAL);
emlrtMxSetData((mxArray *)m0, (void *)&u->data[0]);
emlrtSetDimensions((mxArray *)m0, u->size, 2);
emlrtAssign(&y, m0);
return y;
}
/*
* Arguments : emxArray_real_T **pEmxArray
* Return Type : void
*/
static void emxFree_real_T(emxArray_real_T **pEmxArray)
{
if (*pEmxArray != (emxArray_real_T *)NULL) {
if (((*pEmxArray)->data != (real_T *)NULL) && (*pEmxArray)->canFreeData) {
emlrtFreeMex((void *)(*pEmxArray)->data);
}
emlrtFreeMex((void *)(*pEmxArray)->size);
emlrtFreeMex((void *)*pEmxArray);
*pEmxArray = (emxArray_real_T *)NULL;
}
}
/*
* Arguments : const emlrtStack *sp
* emxArray_real_T **pEmxArray
* int32_T numDimensions
* boolean_T doPush
* Return Type : void
*/
static void emxInit_real_T(const emlrtStack *sp, emxArray_real_T **pEmxArray,
int32_T numDimensions, boolean_T doPush)
{
emxArray_real_T *emxArray;
int32_T i;
*pEmxArray = (emxArray_real_T *)emlrtMallocMex(sizeof(emxArray_real_T));
if (doPush) {
emlrtPushHeapReferenceStackR2012b(sp, (void *)pEmxArray, (void (*)(void *))
emxFree_real_T);
}
emxArray = *pEmxArray;
emxArray->data = (real_T *)NULL;
emxArray->numDimensions = numDimensions;
emxArray->size = (int32_T *)emlrtMallocMex((uint32_T)(sizeof(int32_T)
* numDimensions));
emxArray->allocatedSize = 0;
emxArray->canFreeData = true;
for (i = 0; i < numDimensions; i++) {
emxArray->size[i] = 0;
}
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *u
* const emlrtMsgIdentifier *parentId
* Return Type : real_T
*/
static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
emlrtMsgIdentifier *parentId)
{
real_T y;
y = k_emlrt_marshallIn(sp, emlrtAlias(u), parentId);
emlrtDestroyArray(&u);
return y;
}
/*
* Arguments : const emlrtStack *sp
* const mxArray *angle_at
* const char_T *identifier
* emxArray_real_T *y
* Return Type : void
*/
static void g_emlrt_marshallIn(const emlrtStack *sp, const mxArray *angle_at,