File: CCAF.c1 /* 2 * CCAF.c 3 * 4 * Code generation for function 'CCAF' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "gjbf.h" 11 #include "CCAF.h" 12 #include "gjbf_emxutil.h" 13 #include "gjbf_data.h" 14 #include "blas.h" 15 16 /* Variable Definitions */ 17 static emlrtRTEInfo i_emlrtRTEI = { 1, 15, "CCAF", 18 "E:\\micro array project\\Microphone Array\\beamform test\\CCAF.m" }; 19 20 static emlrtRTEInfo j_emlrtRTEI = { 8, 13, "CCAF", 21 "E:\\micro array project\\Microphone Array\\beamform test\\CCAF.m" }; 22 23 static emlrtECInfo g_emlrtECI = { 2, 9, 26, "CCAF", 24 "E:\\micro array project\\Microphone Array\\beamform test\\CCAF.m" }; 25 26 static emlrtECInfo h_emlrtECI = { 2, 10, 26, "CCAF", 27 "E:\\micro array project\\Microphone Array\\beamform test\\CCAF.m" }; 28 29 /* Function Definitions */ 30 void CCAF(const emlrtStack *sp, const real_T phi[320], const real_T psi[320], 31 real_T order, real_T w[320], const boolean_T amcInds[16]) 32 { 33 emxArray_real_T *amcIndMat; 34 int32_T i; 35 int32_T loop_ub; 36 int32_T iv60[2]; 37 int32_T i43; 38 int32_T b_amcIndMat[2]; 39 boolean_T uBoundInds[320]; 40 boolean_T bv21[320]; 41 int32_T iv61[2]; 42 int32_T c_amcIndMat[2]; 43 boolean_T lBoundInds[320]; 44 boolean_T bv22[320]; 45 emlrtHeapReferenceStackEnterFcnR2012b(sp); 46 emxInit_real_T(sp, &amcIndMat, 2, &j_emlrtRTEI, true); 47 covrtLogFcn(&emlrtCoverageInstance, 7U, 0); 48 covrtLogCond(&emlrtCoverageInstance, 7U, 0U, 0, false); 49 covrtLogMcdc(&emlrtCoverageInstance, 7U, 0U, 0, true); 50 covrtLogIf(&emlrtCoverageInstance, 7U, 0U, 0, true); 51 covrtLogBasicBlock(&emlrtCoverageInstance, 7U, 0); 52 53 /* Expand bound vectors and run weight comparison */ 54 /* Include AMC thresholding if specified */ 55 covrtLogCond(&emlrtCoverageInstance, 7U, 0U, 1, false); 56 covrtLogMcdc(&emlrtCoverageInstance, 7U, 0U, 1, true); 57 covrtLogIf(&emlrtCoverageInstance, 7U, 0U, 1, true); 58 covrtLogBasicBlock(&emlrtCoverageInstance, 7U, 1); 59 i = amcIndMat->size[0] * amcIndMat->size[1]; 60 amcIndMat->size[0] = (int32_T)order; 61 amcIndMat->size[1] = 16; 62 emxEnsureCapacity(sp, (emxArray__common *)amcIndMat, i, (int32_T)sizeof(real_T), 63 &i_emlrtRTEI); 64 loop_ub = (int32_T)order; 65 for (i = 0; i < loop_ub; i++) { 66 for (i43 = 0; i43 < 16; i43++) { 67 amcIndMat->data[i + amcIndMat->size[0] * i43] = amcInds[i43]; 68 } 69 } 70 71 for (i = 0; i < 2; i++) { 72 iv60[i] = 20 + -4 * i; 73 } 74 75 for (i = 0; i < 2; i++) { 76 b_amcIndMat[i] = amcIndMat->size[i]; 77 } 78 79 if ((iv60[0] != b_amcIndMat[0]) || (iv60[1] != b_amcIndMat[1])) { 80 emlrtSizeEqCheckNDR2012b(&iv60[0], &b_amcIndMat[0], &g_emlrtECI, sp); 81 } 82 83 for (i = 0; i < 320; i++) { 84 uBoundInds[i] = (w[i] > phi[i]); 85 } 86 87 for (i = 0; i < 320; i++) { 88 bv21[i] = (amcIndMat->data[i] != 0.0); 89 } 90 91 for (i = 0; i < 2; i++) { 92 iv61[i] = 20 + -4 * i; 93 } 94 95 for (i = 0; i < 2; i++) { 96 c_amcIndMat[i] = amcIndMat->size[i]; 97 } 98 99 if ((iv61[0] != c_amcIndMat[0]) || (iv61[1] != c_amcIndMat[1])) { 100 emlrtSizeEqCheckNDR2012b(&iv61[0], &c_amcIndMat[0], &h_emlrtECI, sp); 101 } 102 103 for (i = 0; i < 320; i++) { 104 lBoundInds[i] = (w[i] < psi[i]); 105 } 106 107 for (i = 0; i < 320; i++) { 108 bv22[i] = (amcIndMat->data[i] != 0.0); 109 } 110 111 emxFree_real_T(&amcIndMat); 112 covrtLogBasicBlock(&emlrtCoverageInstance, 7U, 2); 113 114 /* Apply bounds to tap matrix */ 115 for (i = 0; i < 320; i++) { 116 if (uBoundInds[i] && bv21[i]) { 117 w[i] = phi[i]; 118 } 119 } 120 121 for (i = 0; i < 320; i++) { 122 if (lBoundInds[i] && bv22[i]) { 123 w[i] = psi[i]; 124 } 125 } 126 127 covrtLogBasicBlock(&emlrtCoverageInstance, 7U, 3); 128 emlrtHeapReferenceStackLeaveFcnR2012b(sp); 129 } 130 131 /* End of code generation (CCAF.c) */ 132 |