void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { mwSize m,n; ptrdiff_t m64, n64; #ifndef BLAS64 int im,in; #endif double *T,*b,*x; char side='L',uplo='U',trans='N',diag='N'; double one = 1; if(nrhs != 2 || nlhs > 1) mexErrMsgTxt("Usage: x = solve_triu(T,b)"); /* prhs[0] is first argument. * mxGetPr returns double* (data, col-major) * mxGetM returns int (rows) * mxGetN returns int (cols) */ /* m = rows(T) */ m = mxGetM(prhs[0]); n = mxGetN(prhs[0]); if(m != n) mexErrMsgTxt("matrix must be square"); /* n = cols(b) */ n = mxGetN(prhs[1]); T = mxGetPr(prhs[0]); b = mxGetPr(prhs[1]); if(mxIsSparse(prhs[0]) || mxIsSparse(prhs[1])) { mexErrMsgTxt("Sorry, can't handle sparse matrices yet."); } if(mxGetNumberOfDimensions(prhs[0]) != 2) { mexErrMsgTxt("Arguments must be matrices."); } if(mxGetNumberOfDimensions(prhs[1]) != 2) { mexErrMsgTxt("Arguments must be matrices."); } /* plhs[0] is first output */ /* x is same size as b */ plhs[0] = mxCreateDoubleMatrix(m, n, mxREAL); x = mxGetPr(plhs[0]); /* copy b into x to speed up memory access */ memcpy(x,b,m*n*sizeof(double)); b = x; #ifdef BLAS64 m64 = m; n64 = n; dtrsm(&side,&uplo,&trans,&diag,&m64,&n64,&one,T,&m64,x,&m64); #else im = (int)m; in = (int)n; #ifdef UNDERSCORE_LAPACK_CALL dtrsm_(&side,&uplo,&trans,&diag,&im,&in,&one,T,&im,x,&im); #else dtrsm(&side,&uplo,&trans,&diag,&im,&in,&one,T,&im,x,&im); #endif #endif }
void offload_dtrsm(const char *side, const char *uplo, const char *transa, const char *diag, const MKL_INT *m, const MKL_INT *n, const double *alpha, const double *a, const MKL_INT *lda, double *b, const MKL_INT *ldb){ /* * perform dtrsm on the device. a,b pre-exist on the device */ intptr_t aptr = (intptr_t)a; intptr_t bptr = (intptr_t)b; #pragma offload target(mic:MYDEVICE) in(side,uplo,transa,diag,m,n,alpha,lda,ldb:length(1)) { dtrsm(side,uplo,transa,diag,m,n,alpha,(double*)aptr,lda,(double*)bptr,ldb); } }
// Perform triangular system solve on the input tile. // Input to this step are the input tile and the output tile of the previous step. int S2_compute::execute(const pair & t, cholesky_context & c ) const { tile_const_ptr_type A_block; tile_const_ptr_type Li_block; int b = c.b; const int k = t.first; const int j = t.second; assert( j != k ); c.Lkji.get(triple(k,j,k), A_block); // Get the input tile. c.Lkji.get(triple(k+1, k, k), Li_block); // Get the 2nd input tile (Output of previous step). #ifdef USE_MKL char uplo='l', side='r', transa='t', diag='n'; double alpha = 1; dtrsm (&side,&uplo,&transa,&diag,&b,&b,&alpha,Li_block->get_array(),&b,const_cast< double * >( A_block->get_array() ),&b); tile_const_ptr_type Lo_block = A_block; #else // Allocate memory for the output tile. tile_ptr_type Lo_block = std::make_shared< tile_type >( b ); for(int k_b = 0; k_b < b; k_b++) { for(int i_b = 0; i_b < b; i_b++) { (*Lo_block)( i_b, k_b ) = (*A_block)( i_b, k_b )/(*Li_block)( k_b, k_b ); } for( int j_b = k_b+1; j_b < b; j_b++) { for( int i_b = 0; i_b < b; i_b++) { const_cast< tile_type & >(*A_block)( i_b, j_b ) = (*A_block)( i_b, j_b ) - ((*Li_block)( j_b, k_b ) * (*Lo_block)( i_b, k_b )); } } } #endif c.Lkji.put(triple(k+1, j, k),Lo_block); // Write the output tile at the next time step. return CnC::CNC_Success; }
// ================================ // solve linear equations C = A\B // ================================ void solve(double* C, double* A, double* B, const int rA, const int cA, const int rB, const int cB, const char *mod, double *W, const int LW, ptrdiff_t *S) { #ifdef USE_BLAS int i, j, rank; char uplo = 'U', side = 'L', trans = 'N', unit = 'N'; double one = 1.0, rcond = 0.000000001; ptrdiff_t rA0 = rA, cA0 = cA, cB0 = cB, Lwork=LW, info; ptrdiff_t rC0 = (rA>cA) ? rA : cA; //ptrdiff_t ptr_S = S; switch (mod[0]){ case 'L': case 'U': uplo = mod[0]; dtrsm(&side, &uplo, &trans, &unit, &rC0, &cB0, &one, A, &rA0, C, &rC0); break; case 'P': dposv(&uplo, &rA0, &cB0, W, &rA0, C, &rA0, &info);// A has already been copied into W break; default: if (rA == cA) { //dgesv(&rA0, &cB0, W, &rA0, S, C, &rA0, &info);// A has already been copied into W dgesv(&rA0, &cB0, W, &rA0, (ptrdiff_t*)S, C, &rA0, &info);// A has already been copied into W } else{ for( i=0; i<cB; i++ ) for( j=0; j<rB; j++ ) C[i*rC0+j] = B[i*rB+j]; //dgelsy(&rA0, &cA0, &cB0, A, &rA0, C, &rC0, S, &rcond, &rank, W, &Lwork, &info); dgelsy(&rA0, &cA0, &cB0, A, &rA0, C, &rC0, (ptrdiff_t*)S, &rcond, (ptrdiff_t*)&rank, W, &Lwork, &info); } } #endif }
/* Function Definitions */ static void b_eml_lusolve(const emlrtStack *sp, const emxArray_real_T *A, emxArray_real_T *B) { emxArray_real_T *b_A; int32_T i58; int32_T iy; emxArray_int32_T *ipiv; int32_T info; int32_T i59; int32_T b; int32_T j; int32_T mmj; int32_T c; ptrdiff_t n_t; ptrdiff_t incx_t; double * xix0_t; int32_T ix; boolean_T overflow; int32_T k; real_T temp; int32_T i60; boolean_T b_c; ptrdiff_t m_t; ptrdiff_t incy_t; ptrdiff_t lda_t; double * alpha1_t; double * Aia0_t; double * Aiy0_t; char_T DIAGA; char_T TRANSA; char_T UPLO; char_T SIDE; emlrtStack st; emlrtStack b_st; emlrtStack c_st; emlrtStack d_st; emlrtStack e_st; emlrtStack f_st; emlrtStack g_st; emlrtStack h_st; emlrtStack i_st; st.prev = sp; st.tls = sp->tls; b_st.prev = &st; b_st.tls = st.tls; c_st.prev = &b_st; c_st.tls = b_st.tls; d_st.prev = &c_st; d_st.tls = c_st.tls; e_st.prev = &d_st; e_st.tls = d_st.tls; f_st.prev = &e_st; f_st.tls = e_st.tls; g_st.prev = &f_st; g_st.tls = f_st.tls; h_st.prev = &g_st; h_st.tls = g_st.tls; i_st.prev = &h_st; i_st.tls = h_st.tls; emlrtHeapReferenceStackEnterFcnR2012b(sp); emxInit_real_T(sp, &b_A, 2, &ob_emlrtRTEI, true); st.site = &ib_emlrtRSI; b_st.site = &lb_emlrtRSI; c_st.site = &nb_emlrtRSI; d_st.site = &ob_emlrtRSI; i58 = b_A->size[0] * b_A->size[1]; b_A->size[0] = A->size[0]; b_A->size[1] = A->size[1]; emxEnsureCapacity(&d_st, (emxArray__common *)b_A, i58, (int32_T)sizeof(real_T), &ob_emlrtRTEI); iy = A->size[0] * A->size[1]; for (i58 = 0; i58 < iy; i58++) { b_A->data[i58] = A->data[i58]; } b_emxInit_int32_T(&d_st, &ipiv, 2, &ob_emlrtRTEI, true); e_st.site = &qb_emlrtRSI; f_st.site = &rb_emlrtRSI; g_st.site = &sb_emlrtRSI; h_st.site = &tb_emlrtRSI; eml_signed_integer_colon(&h_st, muIntScalarMin_sint32(A->size[1], A->size[1]), ipiv); info = 0; if (A->size[1] < 1) { } else { i59 = A->size[1] - 1; b = muIntScalarMin_sint32(i59, A->size[1]); e_st.site = &pb_emlrtRSI; for (j = 1; j <= b; j++) { mmj = A->size[1] - j; c = (j - 1) * (A->size[1] + 1) + 1; e_st.site = &if_emlrtRSI; f_st.site = &yb_emlrtRSI; if (mmj + 1 < 1) { iy = -1; } else { g_st.site = &ac_emlrtRSI; h_st.site = &ac_emlrtRSI; n_t = (ptrdiff_t)(mmj + 1); h_st.site = &ac_emlrtRSI; incx_t = (ptrdiff_t)(1); i58 = b_A->size[0] * b_A->size[1]; xix0_t = (double *)(&b_A->data[emlrtDynamicBoundsCheckFastR2012b(c, 1, i58, &je_emlrtBCI, &g_st) - 1]); incx_t = idamax(&n_t, xix0_t, &incx_t); iy = (int32_T)incx_t - 1; } if (b_A->data[(c + iy) - 1] != 0.0) { if (iy != 0) { ipiv->data[j - 1] = j + iy; e_st.site = &jf_emlrtRSI; f_st.site = &bc_emlrtRSI; g_st.site = &cc_emlrtRSI; ix = j; iy += j; h_st.site = &dc_emlrtRSI; overflow = (A->size[1] > 2147483646); if (overflow) { i_st.site = &db_emlrtRSI; check_forloop_overflow_error(&i_st); } for (k = 1; k <= A->size[1]; k++) { i58 = b_A->size[0] * b_A->size[1]; temp = b_A->data[emlrtDynamicBoundsCheckFastR2012b(ix, 1, i58, &le_emlrtBCI, &g_st) - 1]; i58 = b_A->size[0] * b_A->size[1]; i60 = b_A->size[0] * b_A->size[1]; b_A->data[emlrtDynamicBoundsCheckFastR2012b(ix, 1, i58, &le_emlrtBCI, &g_st) - 1] = b_A->data[emlrtDynamicBoundsCheckFastR2012b(iy, 1, i60, &le_emlrtBCI, &g_st) - 1]; i58 = b_A->size[0] * b_A->size[1]; b_A->data[emlrtDynamicBoundsCheckFastR2012b(iy, 1, i58, &le_emlrtBCI, &g_st) - 1] = temp; ix += A->size[1]; iy += A->size[1]; } } iy = c + mmj; e_st.site = &kf_emlrtRSI; if (c + 1 > iy) { b_c = false; } else { b_c = (iy > 2147483646); } if (b_c) { f_st.site = &db_emlrtRSI; check_forloop_overflow_error(&f_st); } for (k = c; k + 1 <= iy; k++) { b_A->data[k] /= b_A->data[c - 1]; } } else { info = j; } iy = A->size[1] - j; e_st.site = &lf_emlrtRSI; f_st.site = &ec_emlrtRSI; g_st.site = &fc_emlrtRSI; if ((mmj < 1) || (iy < 1)) { } else { h_st.site = &gc_emlrtRSI; temp = -1.0; m_t = (ptrdiff_t)(mmj); n_t = (ptrdiff_t)(iy); incx_t = (ptrdiff_t)(1); incy_t = (ptrdiff_t)(A->size[1]); lda_t = (ptrdiff_t)(A->size[1]); alpha1_t = (double *)(&temp); i58 = b_A->size[0] * b_A->size[1]; i60 = (c + A->size[1]) + 1; Aia0_t = (double *)(&b_A->data[emlrtDynamicBoundsCheckFastR2012b(i60, 1, i58, &ke_emlrtBCI, &h_st) - 1]); i58 = b_A->size[0] * b_A->size[1]; xix0_t = (double *)(&b_A->data[emlrtDynamicBoundsCheckFastR2012b(c + 1, 1, i58, &ke_emlrtBCI, &h_st) - 1]); i58 = b_A->size[0] * b_A->size[1]; i60 = c + A->size[1]; Aiy0_t = (double *)(&b_A->data[emlrtDynamicBoundsCheckFastR2012b(i60, 1, i58, &ke_emlrtBCI, &h_st) - 1]); dger(&m_t, &n_t, alpha1_t, xix0_t, &incx_t, Aiy0_t, &incy_t, Aia0_t, &lda_t); } } if ((info == 0) && (!(b_A->data[(A->size[1] + b_A->size[0] * (A->size[1] - 1)) - 1] != 0.0))) { info = A->size[1]; } } if (info > 0) { b_st.site = &mb_emlrtRSI; warn_singular(&b_st); } b_st.site = &yf_emlrtRSI; for (iy = 0; iy + 1 < A->size[1]; iy++) { if (ipiv->data[iy] != iy + 1) { temp = B->data[iy]; B->data[iy] = B->data[ipiv->data[iy] - 1]; B->data[ipiv->data[iy] - 1] = temp; } } emxFree_int32_T(&ipiv); b_st.site = &ag_emlrtRSI; c_st.site = &ic_emlrtRSI; if (A->size[1] < 1) { } else { d_st.site = &jc_emlrtRSI; temp = 1.0; DIAGA = 'U'; TRANSA = 'N'; UPLO = 'L'; SIDE = 'L'; e_st.site = &jc_emlrtRSI; m_t = (ptrdiff_t)(A->size[1]); e_st.site = &jc_emlrtRSI; n_t = (ptrdiff_t)(1); e_st.site = &jc_emlrtRSI; lda_t = (ptrdiff_t)(A->size[1]); e_st.site = &jc_emlrtRSI; incx_t = (ptrdiff_t)(A->size[1]); i58 = b_A->size[0] * b_A->size[1]; emlrtDynamicBoundsCheckFastR2012b(1, 1, i58, &ie_emlrtBCI, &d_st); Aia0_t = (double *)(&b_A->data[0]); xix0_t = (double *)(&B->data[0]); alpha1_t = (double *)(&temp); dtrsm(&SIDE, &UPLO, &TRANSA, &DIAGA, &m_t, &n_t, alpha1_t, Aia0_t, &lda_t, xix0_t, &incx_t); } b_st.site = &bg_emlrtRSI; c_st.site = &ic_emlrtRSI; if (A->size[1] < 1) { } else { d_st.site = &jc_emlrtRSI; temp = 1.0; DIAGA = 'N'; TRANSA = 'N'; UPLO = 'U'; SIDE = 'L'; e_st.site = &jc_emlrtRSI; m_t = (ptrdiff_t)(A->size[1]); e_st.site = &jc_emlrtRSI; n_t = (ptrdiff_t)(1); e_st.site = &jc_emlrtRSI; lda_t = (ptrdiff_t)(A->size[1]); e_st.site = &jc_emlrtRSI; incx_t = (ptrdiff_t)(A->size[1]); i58 = b_A->size[0] * b_A->size[1]; emlrtDynamicBoundsCheckFastR2012b(1, 1, i58, &ie_emlrtBCI, &d_st); Aia0_t = (double *)(&b_A->data[0]); xix0_t = (double *)(&B->data[0]); alpha1_t = (double *)(&temp); dtrsm(&SIDE, &UPLO, &TRANSA, &DIAGA, &m_t, &n_t, alpha1_t, Aia0_t, &lda_t, xix0_t, &incx_t); } emxFree_real_T(&b_A); emlrtHeapReferenceStackLeaveFcnR2012b(sp); }
void mldivide(const real_T A[289], real_T B[289]) { real_T b_A[289]; int8_T ipiv[17]; int32_T jA; int32_T info; int32_T j; int32_T c; int32_T ix; real_T temp; int32_T jy; real_T s; int32_T b; int32_T b_j; boolean_T b_jA; int32_T ijA; char_T DIAGA; char_T TRANSA; char_T UPLO; char_T SIDE; ptrdiff_t m_t; ptrdiff_t n_t; ptrdiff_t lda_t; ptrdiff_t ldb_t; double * Aia0_t; double * Bib0_t; double * alpha1_t; emlrtPushRtStackR2012b(&pb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&qb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&sb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&vb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&wb_emlrtRSI, emlrtRootTLSGlobal); memcpy(&b_A[0], &A[0], 289U * sizeof(real_T)); for (jA = 0; jA < 17; jA++) { ipiv[jA] = (int8_T)(1 + jA); } info = 0; for (j = 0; j < 16; j++) { c = j * 18; emlrtPushRtStackR2012b(&xb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&bc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&cc_emlrtRSI, emlrtRootTLSGlobal); jA = 1; ix = c; temp = muDoubleScalarAbs(b_A[c]); emlrtPushRtStackR2012b(&dc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&dc_emlrtRSI, emlrtRootTLSGlobal); for (jy = 2; jy <= 17 - j; jy++) { ix++; s = muDoubleScalarAbs(b_A[ix]); if (s > temp) { jA = jy; temp = s; } } emlrtPopRtStackR2012b(&cc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&bc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&xb_emlrtRSI, emlrtRootTLSGlobal); if (b_A[(c + jA) - 1] != 0.0) { if (jA - 1 != 0) { ipiv[j] = (int8_T)(j + jA); eml_xswap(b_A, j + 1, j + jA); } b = (c - j) + 17; emlrtPushRtStackR2012b(&yb_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&yb_emlrtRSI, emlrtRootTLSGlobal); for (jA = c + 1; jA + 1 <= b; jA++) { b_A[jA] /= b_A[c]; } } else { info = j + 1; } emlrtPushRtStackR2012b(&ac_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ec_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&fc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&gc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&hc_emlrtRSI, emlrtRootTLSGlobal); jA = c; jy = c + 17; emlrtPushRtStackR2012b(&jc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&jc_emlrtRSI, emlrtRootTLSGlobal); for (b_j = 1; b_j <= 16 - j; b_j++) { temp = b_A[jy]; if (b_A[jy] != 0.0) { ix = c + 1; b = (jA - j) + 34; emlrtPushRtStackR2012b(&ic_emlrtRSI, emlrtRootTLSGlobal); if (jA + 19 > b) { b_jA = FALSE; } else { b_jA = (b > 2147483646); } if (b_jA) { emlrtPushRtStackR2012b(&g_emlrtRSI, emlrtRootTLSGlobal); check_forloop_overflow_error(); emlrtPopRtStackR2012b(&g_emlrtRSI, emlrtRootTLSGlobal); } emlrtPopRtStackR2012b(&ic_emlrtRSI, emlrtRootTLSGlobal); for (ijA = jA + 18; ijA + 1 <= b; ijA++) { b_A[ijA] += b_A[ix] * -temp; ix++; } } jy += 17; jA += 17; } emlrtPopRtStackR2012b(&hc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&gc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&fc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ec_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ac_emlrtRSI, emlrtRootTLSGlobal); } if ((info == 0) && (!(b_A[288] != 0.0))) { info = 17; } emlrtPopRtStackR2012b(&wb_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&vb_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&sb_emlrtRSI, emlrtRootTLSGlobal); if (info > 0) { emlrtPushRtStackR2012b(&rb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&kc_emlrtRSI, emlrtRootTLSGlobal); eml_warning(); emlrtPopRtStackR2012b(&kc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&rb_emlrtRSI, emlrtRootTLSGlobal); } for (jA = 0; jA < 17; jA++) { if (ipiv[jA] != jA + 1) { for (j = 0; j < 17; j++) { temp = B[jA + 17 * j]; B[jA + 17 * j] = B[(ipiv[jA] + 17 * j) - 1]; B[(ipiv[jA] + 17 * j) - 1] = temp; } } } emlrtPushRtStackR2012b(&tb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&mc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&nc_emlrtRSI, emlrtRootTLSGlobal); temp = 1.0; DIAGA = 'U'; TRANSA = 'N'; UPLO = 'L'; SIDE = 'L'; emlrtPushRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); m_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); n_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); lda_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&rc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); ldb_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&rc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); Aia0_t = (double *)(&b_A[0]); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&tc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); Bib0_t = (double *)(&B[0]); emlrtPopRtStackR2012b(&tc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&uc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); alpha1_t = (double *)(&temp); emlrtPopRtStackR2012b(&uc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&vc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); dtrsm(&SIDE, &UPLO, &TRANSA, &DIAGA, &m_t, &n_t, alpha1_t, Aia0_t, &lda_t, Bib0_t, &ldb_t); emlrtPopRtStackR2012b(&vc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&nc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&mc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&tb_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ub_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&mc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&nc_emlrtRSI, emlrtRootTLSGlobal); temp = 1.0; DIAGA = 'N'; TRANSA = 'N'; UPLO = 'U'; SIDE = 'L'; emlrtPushRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); m_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&oc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); n_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&pc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); lda_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&qc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&rc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); ldb_t = (ptrdiff_t)(17); emlrtPopRtStackR2012b(&ob_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&rc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); Aia0_t = (double *)(&b_A[0]); emlrtPopRtStackR2012b(&sc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&tc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); Bib0_t = (double *)(&B[0]); emlrtPopRtStackR2012b(&tc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&uc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); alpha1_t = (double *)(&temp); emlrtPopRtStackR2012b(&uc_emlrtRSI, emlrtRootTLSGlobal); emlrtPushRtStackR2012b(&vc_emlrtRSI, emlrtRootTLSGlobal); emlrt_checkEscapedGlobals(); dtrsm(&SIDE, &UPLO, &TRANSA, &DIAGA, &m_t, &n_t, alpha1_t, Aia0_t, &lda_t, Bib0_t, &ldb_t); emlrtPopRtStackR2012b(&vc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&nc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&mc_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&ub_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&qb_emlrtRSI, emlrtRootTLSGlobal); emlrtPopRtStackR2012b(&pb_emlrtRSI, emlrtRootTLSGlobal); }