void ATL_zreftrsmRLTN ( const int M, const int N, const double * ALPHA, const double * A, const int LDA, double * B, const int LDB ) { /* * Purpose * ======= * * ATL_zreftrsmRLTN( ... ) * * <=> * * ATL_zreftrsm * ( AtlasRight, AtlasLower, AtlasTrans, AtlasNonUnit, ... ) * * See ATL_zreftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, iajk, ibij, ibik, j, jak, jbj, jbk, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( k = 0, jak = 0, jbk = 0; k < N; k++, jak += lda2, jbk += ldb2 ) { for( i = 0, ibik = jbk; i < M; i++, ibik += 2 ) { j = ( k << 1 ) + jak; Mddiv( A[j], A[j+1], B[ibik], B[ibik+1] ); } for( j = k+1, iajk = ((k+1) << 1)+jak, jbj = (k+1)*ldb2; j < N; j++, iajk += 2, jbj += ldb2 ) { Mset( A[iajk], A[iajk+1], t0_r, t0_i ); for( i = 0, ibij = jbj, ibik = jbk; i < M; i++, ibij += 2, ibik += 2 ) { Mmls( t0_r, t0_i, B[ibik], B[ibik+1], B[ibij], B[ibij+1] ); } } for( i = 0, ibik = jbk; i < M; i++, ibik += 2 ) { Mdscl( ALPHA[0], ALPHA[1], B[ibik], B[ibik+1] ); } } /* * End of ATL_zreftrsmRLTN */ }
void ATL_zreftrsmLLNU ( const int M, const int N, const double * ALPHA, const double * A, const int LDA, double * B, const int LDB ) { /* * Purpose * ======= * * ATL_zreftrsmLLNU( ... ) * * <=> * * ATL_zreftrsm * ( AtlasLeft, AtlasLower, AtlasNoTrans, AtlasUnit, ... ) * * See ATL_zreftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ int i, iaik, ibij, ibkj, j, jak, jbj, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jbj = 0; j < N; j++, jbj += ldb2 ) { for( i = 0, ibij = jbj; i < M; i++, ibij += 2 ) { Mdscl( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1] ); } for( k = 0, jak = 0, ibkj = jbj; k < M; k++, jak += lda2, ibkj += 2 ) { for( i = k+1, iaik = ((k+1) << 1)+jak, ibij = ((k+1) << 1)+jbj; i < M; i++, iaik += 2, ibij += 2 ) { Mmls( A[iaik], A[iaik+1], B[ibkj], B[ibkj+1], B[ibij], B[ibij+1] ); } } } /* * End of ATL_zreftrsmLLNU */ }
void ATL_creftrsmLLTU ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmLLTU( ... ) * * <=> * * ATL_creftrsm * ( AtlasLeft, AtlasLower, AtlasTrans, AtlasUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, iaki, ibij, ibkj, j, jai, jbj, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jbj = 0; j < N; j++, jbj += ldb2 ) { for( i = M-1, jai = (M-1)*lda2, ibij = ((M-1) << 1)+jbj; i >= 0; i--, jai -= lda2, ibij -= 2 ) { Mmul( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1], t0_r, t0_i ); for( k = i+1, iaki = ((i+1) << 1)+jai, ibkj = ((i+1) << 1)+jbj; k < M; k++, iaki += 2, ibkj += 2 ) { Mmls( A[iaki], A[iaki+1], B[ibkj], B[ibkj+1], t0_r, t0_i ); } Mset( t0_r, t0_i, B[ibij], B[ibij+1] ); } } /* * End of ATL_creftrsmLLTU */ }
void ATL_creftrsmRLNN ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmRLNN( ... ) * * <=> * * ATL_creftrsm * ( AtlasRight, AtlasLower, AtlasNoTrans, AtlasNonUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ int i, iakj, ibij, ibik, j, jaj, jbj, jbk, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*lda2, jbj = (N-1)*ldb2; j >= 0; j--, jaj -= lda2, jbj -= ldb2 ) { for( i = 0, ibij = jbj; i < M; i++, ibij += 2 ) { Msscl( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1] ); } for( k = j+1, iakj = ((j+1) << 1)+jaj, jbk = (j+1)*ldb2; k < N; k++, iakj += 2, jbk += ldb2 ) { for( i = 0, ibij = jbj, ibik = jbk; i < M; i++, ibij += 2, ibik += 2 ) { Mmls( A[iakj], A[iakj+1], B[ibik], B[ibik+1], B[ibij], B[ibij+1] ); } } for( i = 0, ibij = jbj; i < M; i++, ibij += 2 ) { k = ( j << 1 ) + jaj; Msdiv( A[k], A[k+1], B[ibij], B[ibij+1] ); } } /* * End of ATL_creftrsmRLNN */ }
void ATL_creftrsmLUNN ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmLUNN( ... ) * * <=> * * ATL_creftrsm * ( AtlasLeft, AtlasUpper, AtlasNoTrans, AtlasNonUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ int i, iaik, ibij, ibkj, j, jak, jbj, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jbj = 0; j < N; j++, jbj += ldb2 ) { for( i = 0, ibij = jbj; i < M; i++, ibij += 2 ) { Msscl( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1] ); } for( k = M-1, jak = (M-1)*lda2, ibkj = ((M-1) << 1)+jbj; k >= 0; k--, jak -= lda2, ibkj -= 2 ) { i = ( k << 1 ) + jak; Msdiv( A[i], A[i+1], B[ibkj], B[ibkj+1] ); for( i = 0, iaik = jak, ibij = jbj; i < k; i++, iaik += 2, ibij += 2 ) { Mmls( A[iaik], A[iaik+1], B[ibkj], B[ibkj+1], B[ibij], B[ibij+1] ); } } } /* * End of ATL_creftrsmLUNN */ }
void ATL_creftrsmRUTU ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmRUTU( ... ) * * <=> * * ATL_creftrsm * ( AtlasRight, AtlasUpper, AtlasTrans, AtlasUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, iajk, ibij, ibik, j, jak, jbj, jbk, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( k = N-1, jak = (N-1)*lda2, jbk = (N-1)*ldb2; k >= 0; k--, jak -= lda2, jbk -= ldb2 ) { for( j = 0, iajk = jak, jbj = 0; j < k; j++, iajk += 2, jbj += ldb2 ) { Mset( A[iajk], A[iajk+1], t0_r, t0_i ); for( i = 0, ibij = jbj, ibik = jbk; i < M; i++, ibij += 2, ibik += 2 ) { Mmls( t0_r, t0_i, B[ibik], B[ibik+1], B[ibij], B[ibij+1] ); } } for( i = 0, ibik = jbk; i < M; i++, ibik += 2 ) { Msscl( ALPHA[0], ALPHA[1], B[ibik], B[ibik+1] ); } } /* * End of ATL_creftrsmRUTU */ }
void ATL_creftrsmLUTN ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmLUTN( ... ) * * <=> * * ATL_creftrsm * ( AtlasLeft, AtlasUpper, AtlasTrans, AtlasNonUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, iaki, ibij, ibkj, j, jai, jbj, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jbj = 0; j < N; j++, jbj += ldb2 ) { for( i = 0, jai = 0, ibij = jbj; i < M; i++, jai += lda2, ibij += 2 ) { Mmul( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1], t0_r, t0_i ); for( k = 0, iaki = jai, ibkj = jbj; k < i; k++, iaki += 2, ibkj += 2 ) { Mmls( A[iaki], A[iaki+1], B[ibkj], B[ibkj+1], t0_r, t0_i ); } k = ( i << 1 ) + jai; Msdiv( A[k], A[k+1], t0_r, t0_i ); Mset( t0_r, t0_i, B[ibij], B[ibij+1] ); } } /* * End of ATL_creftrsmLUTN */ }
void ATL_creftbsvUTN ( const int N, const int K, const float * A, const int LDA, float * X, const int INCX ) { /* * Purpose * ======= * * ATL_creftbsvUTN( ... ) * * <=> * * ATL_creftbsv( AtlasUpper, AtlasTrans, AtlasNonUnit, ... ) * * See ATL_creftbsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, i0, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, kx = 0, l, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jaj = 0, jx = kx; j < N; j++, jaj += lda2, jx += incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); l = K - j; i0 = ( j - K > 0 ? j - K : 0 ); for( i = i0, iaij = ((l+i0) << 1)+jaj, ix = kx; i < j; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], A[iaij+1], X[ix], X[ix+1], t0_r, t0_i ); } Msdiv( A[iaij], A[iaij+1], t0_r, t0_i ); Mset( t0_r, t0_i, X[jx], X[jx+1] ); if( j >= K ) { kx += incx2; } } /* * End of ATL_creftbsvUTN */ }
void ATL_zreftpsvUTN ( const int N, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftpsvUTN( ... ) * * <=> * * ATL_zreftpsv( AtlasUpper, AtlasTrans, AtlasNonUnit, ... ) * * See ATL_zreftpsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jaj = 0, jx = 0; j < N; j++, jx += incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = 0, iaij = jaj, ix = 0; i < j; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], A[iaij+1], X[ix], X[ix+1], t0_r, t0_i ); } Mddiv( A[iaij], A[iaij+1], t0_r, t0_i ); Mset( t0_r, t0_i, X[jx], X[jx+1] ); jaj += lda2; lda2 += 2; } /* * End of ATL_zreftpsvUTN */ }
void ATL_creftrsmRUNU ( const int M, const int N, const float * ALPHA, const float * A, const int LDA, float * B, const int LDB ) { /* * Purpose * ======= * * ATL_creftrsmRUNU( ... ) * * <=> * * ATL_creftrsm * ( AtlasRight, AtlasUpper, AtlasNoTrans, AtlasUnit, ... ) * * See ATL_creftrsm for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ int i, iakj, ibij, ibik, j, jaj, jbj, jbk, k, lda2 = ( LDA << 1 ), ldb2 = ( LDB << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jaj = 0, jbj = 0; j < N; j++, jaj += lda2, jbj += ldb2 ) { for( i = 0, ibij = jbj; i < M; i++, ibij += 2 ) { Msscl( ALPHA[0], ALPHA[1], B[ibij], B[ibij+1] ); } for( k = 0, iakj = jaj, jbk = 0; k < j; k++, iakj += 2, jbk += ldb2 ) { for( i = 0, ibij = jbj, ibik = jbk; i < M; i++, ibij += 2, ibik += 2 ) { Mmls( A[iakj], A[iakj+1], B[ibik], B[ibik+1], B[ibij], B[ibij+1] ); } } } /* * End of ATL_creftrsmRUNU */ }
void ATL_creftrsvLTU ( const int N, const float * A, const int LDA, float * X, const int INCX ) { /* * Purpose * ======= * * ATL_creftrsvLTU( ... ) * * <=> * * ATL_creftrsv( AtlasLower, AtlasTrans, AtlasUnit, ... ) * * See ATL_creftrsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, ldap12 = ( ( LDA + 1 ) << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*(ldap12), jx = (N-1)*incx2; j >= 0; j--, jaj -= ldap12, jx -= incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = j+1, iaij = 2+jaj, ix = jx + incx2; i < N; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], A[iaij+1], X[ix], X[ix+1], t0_r, t0_i ); } Mset( t0_r, t0_i, X[jx], X[jx+1] ); } /* * End of ATL_creftrsvLTU */ }
void ATL_creftbsvLHU ( const int N, const int K, const float * A, const int LDA, float * X, const int INCX ) { /* * Purpose * ======= * * ATL_creftbsvLHU( ... ) * * <=> * * ATL_creftbsv( AtlasLower, AtlasConjTrans, AtlasUnit, ... ) * * See ATL_creftbsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, i1, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, kx = 0, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*lda2, jx = kx+(N-1)*incx2; j >= 0; j--, jaj -= lda2, jx -= incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); i1 = ( N - 1 > j + K ? j + K : N - 1 ); for( i = j+1, iaij = 2+jaj, ix = jx + incx2; i <= i1; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], -A[iaij+1], X[ix], X[ix+1], t0_r, t0_i ); } Mset( t0_r, t0_i, X[jx], X[jx+1] ); } /* * End of ATL_creftbsvLHU */ }
void ATL_zreftbsvLCU ( const int N, const int K, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftbsvLCU( ... ) * * <=> * * ATL_zreftbsv( AtlasLower, AtlasConj, AtlasUnit, ... ) * * See ATL_zreftbsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, i1, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, kx = 0, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jaj = 0, jx = kx; j < N; j++, jaj += lda2, jx += incx2 ) { i1 = ( N - 1 > j + K ? j + K : N - 1 ); Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = j+1, iaij = 2+jaj, ix = jx + incx2; i <= i1; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], -A[iaij+1], t0_r, t0_i, X[ix], X[ix+1] ); } } /* * End of ATL_zreftbsvLCU */ }
void ATL_zreftbsvUCN ( const int N, const int K, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftbsvUCN( ... ) * * <=> * * ATL_zreftbsv( AtlasUpper, AtlasConj, AtlasNonUnit, ... ) * * See ATL_zreftbsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, i0, iaij, iajj, incx2 = 2 * INCX, ix, j, jaj, jx, kx = 0, l, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*lda2, jx = kx+(N-1)*incx2; j >= 0; j--, jaj -= lda2, jx -= incx2 ) { l = K -j; i0 = ( j - K > 0 ? j - K : 0 ); iajj = ( K << 1 ) + jaj; Mddiv( A[iajj], -A[iajj+1], X[jx], X[jx+1] ); Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = i0, iaij = ((l+i0) << 1)+jaj, ix = kx+i0*incx2; i < j; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], -A[iaij+1], t0_r, t0_i, X[ix], X[ix+1] ); } } /* * End of ATL_zreftbsvUCN */ }
void ATL_zreftrsvLNN ( const int N, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftrsvLNN( ... ) * * <=> * * ATL_zreftrsv( AtlasLower, AtlasNoTrans, AtlasNonUnit, ... ) * * See ATL_zreftrsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, ldap12 = ( ( LDA + 1 ) << 1 ); /* .. * .. Executable Statements .. * */ for( j = 0, jaj = 0, jx = 0; j < N; j++, jaj += ldap12, jx += incx2 ) { Mddiv( A[jaj], A[jaj+1], X[jx], X[jx+1] ); Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = j+1, iaij = jaj+2, ix = jx+incx2; i < N; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], A[iaij+1], t0_r, t0_i, X[ix], X[ix+1] ); } } /* * End of ATL_zreftrsvLNN */ }
void ATL_creftpsvLHN ( const int N, const float * A, const int LDA, float * X, const int INCX ) { /* * Purpose * ======= * * ATL_creftpsvLHN( ... ) * * <=> * * ATL_creftpsv( AtlasLower, AtlasConjTrans, AtlasNonUnit, ... ) * * See ATL_creftpsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register float t0_i, t0_r; int i, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, lda2 = ( ( LDA - N + 1 ) << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (((LDA+1)*(N-1)) << 1) - (N-1)*N, jx = (N-1)*incx2; j >= 0; j--, jx -= incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = j+1, iaij = jaj+2, ix = jx + incx2; i < N; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], -A[iaij+1], X[ix], X[ix+1], t0_r, t0_i ); } Msdiv( A[jaj], -A[jaj+1], t0_r, t0_i ); Mset( t0_r, t0_i, X[jx], X[jx+1] ); lda2 += 2; jaj -= lda2; } /* * End of ATL_creftpsvLHN */ }
void ATL_zreftpsvUCN ( const int N, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftpsvUCN( ... ) * * <=> * * ATL_zreftpsv( AtlasUpper, AtlasConj, AtlasNonUnit, ... ) * * See ATL_zreftpsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, iaij, iajj, incx2 = 2 * INCX, ix, j, jaj, jx, lda2 = ( ( LDA + N - 1 ) << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*(2*LDA+N-2), jx = (N-1)*incx2; j >= 0; j--, jx -= incx2 ) { iajj = ( j << 1 ) + jaj; Mddiv( A[iajj], -A[iajj+1], X[jx], X[jx+1] ); Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = 0, iaij = jaj, ix = 0; i < j; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], -A[iaij+1], t0_r, t0_i, X[ix], X[ix+1] ); } lda2 -= 2; jaj -= lda2; } /* * End of ATL_zreftpsvUCN */ }
void ATL_zreftrsvUNU ( const int N, const double * A, const int LDA, double * X, const int INCX ) { /* * Purpose * ======= * * ATL_zreftrsvUNU( ... ) * * <=> * * ATL_zreftrsv( AtlasUpper, AtlasNoTrans, AtlasUnit, ... ) * * See ATL_zreftrsv for details. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ register double t0_i, t0_r; int i, iaij, incx2 = 2 * INCX, ix, j, jaj, jx, lda2 = ( LDA << 1 ); /* .. * .. Executable Statements .. * */ for( j = N-1, jaj = (N-1)*lda2, jx = (N-1)*incx2; j >= 0; j--, jaj -= lda2, jx -= incx2 ) { Mset( X[jx], X[jx+1], t0_r, t0_i ); for( i = 0, iaij = jaj, ix = 0; i < j; i++, iaij += 2, ix += incx2 ) { Mmls( A[iaij], A[iaij+1], t0_r, t0_i, X[ix], X[ix+1] ); } } /* * End of ATL_zreftrsvUNU */ }