예제 #1
0
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
 */
}
예제 #2
0
void ATL_zreftrsmRLNN
(
   const int                  M,
   const int                  N,
   const double               * ALPHA,
   const double               * A,
   const int                  LDA,
   double                     * B,
   const int                  LDB
)
{
/*
 * Purpose
 * =======
 *
 * ATL_zreftrsmRLNN( ... )
 *
 * <=>
 *
 * ATL_zreftrsm
 * ( AtlasRight, AtlasLower, AtlasNoTrans, AtlasNonUnit, ... )
 *
 * See ATL_zreftrsm 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 )
      { Mdscl( 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; Mddiv( A[k], A[k+1], B[ibij], B[ibij+1] ); }
   }
/*
 * End of ATL_zreftrsmRLNN
 */
}
예제 #3
0
void ATL_zreftrsmLLNN
(
   const int                  M,
   const int                  N,
   const double               * ALPHA,
   const double               * A,
   const int                  LDA,
   double                     * B,
   const int                  LDB
)
{
/*
 * Purpose
 * =======
 *
 * ATL_zreftrsmLLNN( ... )
 *
 * <=>
 *
 * ATL_zreftrsm
 * ( AtlasLeft, AtlasLower, AtlasNoTrans, AtlasNonUnit, ... )
 *
 * 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 )
      {
         i = ( k << 1 ) + jak; Mddiv( A[i], A[i+1], B[ibkj], B[ibkj+1] );
         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_zreftrsmLLNN
 */
}
예제 #4
0
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
     */
}
예제 #5
0
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
 */
}
예제 #6
0
void ATL_zreftbsvLNN
(
   const int                  N,
   const int                  K,
   const double               * A,
   const int                  LDA,
   double                     * X,
   const int                  INCX
)
{
/*
 * Purpose
 * =======
 *
 * ATL_zreftbsvLNN( ... )
 *
 * <=>
 *
 * ATL_zreftbsv( AtlasLower, AtlasNoTrans, AtlasNonUnit, ... )
 *
 * 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 )
   {
      Mddiv( A[jaj], A[jaj+1], X[jx], X[jx+1] );
      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_zreftbsvLNN
 */
}
예제 #7
0
void ATL_zreftrsvLHN
(
   const int                  N,
   const double               * A,
   const int                  LDA,
   double                     * X,
   const int                  INCX
)
{
/*
 * Purpose
 * =======
 *
 * ATL_zreftrsvLHN( ... )
 *
 * <=>
 *
 * ATL_zreftrsv( AtlasLower, AtlasConjTrans, 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 = 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 ); }
      Mddiv( A[jaj], -A[jaj+1], t0_r, t0_i );
      Mset( t0_r, t0_i, X[jx], X[jx+1] );
   }
/*
 * End of ATL_zreftrsvLHN
 */
}
예제 #8
0
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
 */
}