File: _coder_ccafbounds_api.c1 /* 2 * _coder_ccafbounds_api.c 3 * 4 * Code generation for function '_coder_ccafbounds_api' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "ccafbounds.h" 11 #include "_coder_ccafbounds_api.h" 12 #include "ccafbounds_emxutil.h" 13 #include "ccafbounds_data.h" 14 15 /* Variable Definitions */ 16 static emlrtRTEInfo b_emlrtRTEI = { 1, 1, "_coder_ccafbounds_api", "" }; 17 18 /* Function Declarations */ 19 static real_T (*b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 20 emlrtMsgIdentifier *parentId))[48]; 21 static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *fs, const 22 char_T *identifier); 23 static real_T d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 24 emlrtMsgIdentifier *parentId); 25 static real_T (*e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, 26 const emlrtMsgIdentifier *msgId))[48]; 27 static real_T (*emlrt_marshallIn(const emlrtStack *sp, const mxArray *mpos, 28 const char_T *identifier))[48]; 29 static const mxArray *emlrt_marshallOut(const emxArray_real_T *u); 30 static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const 31 emlrtMsgIdentifier *msgId); 32 33 /* Function Definitions */ 34 static real_T (*b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 35 emlrtMsgIdentifier *parentId))[48] 36 { 37 real_T (*y)[48]; 38 y = e_emlrt_marshallIn(sp, emlrtAlias(u), parentId); 39 emlrtDestroyArray(&u); 40 return y; 41 } 42 static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *fs, 43 const char_T *identifier) 44 { 45 real_T y; 46 emlrtMsgIdentifier thisId; 47 thisId.fIdentifier = identifier; 48 thisId.fParent = NULL; 49 thisId.bParentIsCell = false; 50 y = d_emlrt_marshallIn(sp, emlrtAlias(fs), &thisId); 51 emlrtDestroyArray(&fs); 52 return y; 53 } 54 55 static real_T d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 56 emlrtMsgIdentifier *parentId) 57 { 58 real_T y; 59 y = f_emlrt_marshallIn(sp, emlrtAlias(u), parentId); 60 emlrtDestroyArray(&u); 61 return y; 62 } 63 64 static real_T (*e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, 65 const emlrtMsgIdentifier *msgId))[48] 66 { 67 real_T (*ret)[48]; 68 static const int32_T dims[2] = { 3, 16 }; 69 70 emlrtCheckBuiltInR2012b(sp, msgId, src, "double", false, 2U, dims); 71 ret = (real_T (*)[48])mxGetData(src); 72 emlrtDestroyArray(&src); 73 return ret; 74 } 75 static real_T (*emlrt_marshallIn(const emlrtStack *sp, const mxArray *mpos, 76 const char_T *identifier))[48] 77 { 78 real_T (*y)[48]; 79 emlrtMsgIdentifier thisId; 80 thisId.fIdentifier = identifier; 81 thisId.fParent = NULL; 82 thisId.bParentIsCell = false; 83 y = b_emlrt_marshallIn(sp, emlrtAlias(mpos), &thisId); 84 emlrtDestroyArray(&mpos); 85 return y; 86 } 87 88 static const mxArray *emlrt_marshallOut(const emxArray_real_T *u) 89 { 90 const mxArray *y; 91 const mxArray *m1; 92 static const int32_T iv5[2] = { 0, 0 }; 93 94 y = NULL; 95 m1 = emlrtCreateNumericArray(2, iv5, mxDOUBLE_CLASS, mxREAL); 96 mxSetData((mxArray *)m1, (void *)u->data); 97 emlrtSetDimensions((mxArray *)m1, u->size, 2); 98 emlrtAssign(&y, m1); 99 return y; 100 } 101 102 static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const 103 emlrtMsgIdentifier *msgId) 104 { 105 real_T ret; 106 static const int32_T dims = 0; 107 emlrtCheckBuiltInR2012b(sp, msgId, src, "double", false, 0U, &dims); 108 ret = *(real_T *)mxGetData(src); 109 emlrtDestroyArray(&src); 110 return ret; 111 } 112 113 void ccafbounds_api(const mxArray * const prhs[5], const mxArray *plhs[2]) 114 { 115 emxArray_real_T *phi; 116 emxArray_real_T *psi; 117 real_T (*mpos)[48]; 118 real_T fs; 119 real_T soundc; 120 real_T prop; 121 real_T order; 122 emlrtStack st = { NULL, NULL, NULL }; 123 124 st.tls = emlrtRootTLSGlobal; 125 emlrtHeapReferenceStackEnterFcnR2012b(&st); 126 emxInit_real_T(&st, &phi, 2, &b_emlrtRTEI, true); 127 emxInit_real_T(&st, &psi, 2, &b_emlrtRTEI, true); 128 129 /* Marshall function inputs */ 130 mpos = emlrt_marshallIn(&st, emlrtAlias(prhs[0]), "mpos"); 131 fs = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[1]), "fs"); 132 soundc = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[2]), "soundc"); 133 prop = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[3]), "prop"); 134 order = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[4]), "order"); 135 136 /* Invoke the target function */ 137 ccafbounds(&st, *mpos, fs, soundc, prop, order, phi, psi); 138 139 /* Marshall function outputs */ 140 plhs[0] = emlrt_marshallOut(phi); 141 plhs[1] = emlrt_marshallOut(psi); 142 psi->canFreeData = false; 143 emxFree_real_T(&psi); 144 phi->canFreeData = false; 145 emxFree_real_T(&phi); 146 emlrtHeapReferenceStackLeaveFcnR2012b(&st); 147 } 148 149 /* End of code generation (_coder_ccafbounds_api.c) */ 150 |