Commit 123457c7 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed gemv and geam calls in BICGStabL and GMRES

parent b3a8feac
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ solve( ConstVectorViewType b, VectorViewType x )
          * U_[0:j] := R_[0:j] - beta * U_[0:j]
          */
         Matrices::MatrixOperations< DeviceType >::
            geam( size, j + 1,
            geam( size, (IndexType) j + 1,
                  (RealType) 1.0, R.getData(), ldSize,
                  -beta, U.getData(), ldSize,
                  U.getData(), ldSize );
@@ -120,7 +120,7 @@ solve( ConstVectorViewType b, VectorViewType x )
          * R_[0:j] := R_[0:j] - alpha * U_[1:j+1]
          */
         Matrices::MatrixOperations< DeviceType >::
            geam( size, j + 1,
            geam( size, (IndexType) j + 1,
                  (RealType) 1.0, R.getData(), ldSize,
                  -alpha, U.getData() + ldSize, ldSize,
                  R.getData(), ldSize );
@@ -205,17 +205,17 @@ solve( ConstVectorViewType b, VectorViewType x )
      // x := x + R_[0:ell-1] * g_2
      g_2[ 0 ] = g_0[ 1 ];
      Matrices::MatrixOperations< DeviceType >::
         gemv( size, ell,
         gemv( size, (IndexType) ell,
               (RealType) 1.0, R.getData(), ldSize, g_2.getData(),
               (RealType) 1.0, Traits::getLocalView( x ).getData() );
      // r_0 := r_0 - R_[1:ell] * g_1_[1:ell]
      Matrices::MatrixOperations< DeviceType >::
         gemv( size, ell,
         gemv( size, (IndexType) ell,
               (RealType) -1.0, R.getData() + ldSize, ldSize, &g_1[ 1 ],
               (RealType) 1.0, Traits::getLocalView( r_0 ).getData() );
      // u_0 := u_0 - U_[1:ell] * g_0_[1:ell]
      Matrices::MatrixOperations< DeviceType >::
         gemv( size, ell,
         gemv( size, (IndexType) ell,
               (RealType) -1.0, U.getData() + ldSize, ldSize, &g_0[ 1 ],
               (RealType) 1.0, Traits::getLocalView( u_0 ).getData() );

+5 −5
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ orthogonalize_CGS( const int m, const RealType normb, const RealType beta )
//         }
         // w := w - V_i * H_l
         Matrices::MatrixOperations< DeviceType >::
            gemv( size, i + 1,
            gemv( size, (IndexType) i + 1,
                  (RealType) -1.0, V.getData(), ldSize, H_l,
                  (RealType) 1.0, Traits::getLocalView( w ).getData() );
      }
@@ -606,7 +606,7 @@ hauseholder_cwy( VectorViewType v,

   // v = e_i - Y_i * aux
   Matrices::MatrixOperations< DeviceType >::
      gemv( size, i + 1,
      gemv( size, (IndexType) i + 1,
            (RealType) -1.0, Y.getData(), ldSize, aux,
            (RealType) 0.0, Traits::getLocalView( v ).getData() );
   if( localOffset == 0 )
@@ -648,7 +648,7 @@ hauseholder_cwy_transposed( VectorViewType z,
   // z = w - Y_i * aux
   z = w;
   Matrices::MatrixOperations< DeviceType >::
      gemv( size, i + 1,
      gemv( size, (IndexType) i + 1,
            (RealType) -1.0, Y.getData(), ldSize, aux,
            (RealType) 1.0, Traits::getLocalView( z ).getData() );
}
@@ -690,7 +690,7 @@ update( const int k,
   if( variant != Variant::CWY ) {
      // x = V * y + x
      Matrices::MatrixOperations< DeviceType >::
         gemv( size, k + 1,
         gemv( size, (IndexType) k + 1,
               (RealType) 1.0, V.getData(), ldSize, y,
               (RealType) 1.0, Traits::getLocalView( x ).getData() );
   }
@@ -722,7 +722,7 @@ update( const int k,

      // x -= Y_{k+1} * aux
      Matrices::MatrixOperations< DeviceType >::
         gemv( size, k + 1,
         gemv( size, (IndexType) k + 1,
               (RealType) -1.0, Y.getData(), ldSize, aux,
               (RealType) 1.0, Traits::getLocalView( x ).getData() );