コード例 #1
0
FLA_Error FLA_Eig_gest_check( FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_inverse( inv );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( B );
  FLA_Check_error_code( e_val );
  
  return FLA_SUCCESS;
}
コード例 #2
0
ファイル: FLA_Axpyrt_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Axpyrt_check( FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_trans( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_trans( trans );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_consistent_object_datatype( A, alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( trans, A, B );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #3
0
ファイル: FLA_QR2_UT_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_QR2_UT_check( FLA_Obj B, FLA_Obj D, FLA_Obj T )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( B, D );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( B, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #4
0
FLA_Error FLA_Tridiag_check( FLA_Uplo uplo, FLA_Obj A, FLA_Obj t )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, t );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_col_vector( t );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_col_storage( t );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
  FLA_Check_error_code( e_val );
  
  return FLA_SUCCESS;
}
コード例 #5
0
ファイル: FLA_Syr_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Syr_check( FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj x, FLA_Obj A )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_consistent_object_datatype( A, alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A, x, x );
  FLA_Check_error_code( e_val );
 
  return FLA_SUCCESS;
}
コード例 #6
0
FLA_Error FLA_QR_UT_solve_check( FLA_Obj A, FLA_Obj T, FLA_Obj B, FLA_Obj X )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, X );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #7
0
FLA_Error FLA_UDdate_UT_check( FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, C );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, D );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( C ) );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( D ) );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( T ) );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #8
0
FLA_Error FLA_Apply_QUD_UT_check( FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_leftright_side( side );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_trans( trans );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_direct( direct );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_storev( storev );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, W );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, U );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, C );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, V );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( R, D );
  FLA_Check_error_code( e_val );

  if ( side == FLA_LEFT )
  {
    e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( U ) );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_object_width_equals( W, FLA_Obj_width( R ) );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
    FLA_Check_error_code( e_val );
  }
  else
  {
  }

  return FLA_SUCCESS;
}
コード例 #9
0
ファイル: FLA_Scalc_check.c プロジェクト: pgawron/tlash
FLA_Error FLA_Scalc_check( FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A )
{
    FLA_Error e_val;

    e_val = FLA_Check_valid_conj( conjalpha );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_floating_object( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_nonconstant_object( A );
    FLA_Check_error_code( e_val );

    if ( FLA_Obj_is_real( A ) )
    {
        e_val = FLA_Check_consistent_object_datatype( A, alpha );
        FLA_Check_error_code( e_val );
    }
    else
    {
        e_val = FLA_Check_identical_object_precision( A, alpha );
        FLA_Check_error_code( e_val );
    }

    e_val = FLA_Check_if_scalar( alpha );
    FLA_Check_error_code( e_val );

    return FLA_SUCCESS;
}
コード例 #10
0
FLA_Error FLA_Fill_with_linear_dist_check( FLA_Obj shift, FLA_Obj delta, FLA_Obj x )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_real_object( shift );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_consistent_object_datatype( shift, delta );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_precision( x, delta );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_if_scalar( shift );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( delta );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( x );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #11
0
FLA_Error FLA_Chol_solve_check( FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, FLA_Obj X )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, X );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #12
0
FLA_Error FLA_LU_piv_solve_check( FLA_Obj A, FLA_Obj p, FLA_Obj B, FLA_Obj X )
{
    FLA_Error e_val;

    e_val = FLA_Check_floating_object( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_nonconstant_object( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_identical_object_datatype( A, B );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_identical_object_datatype( A, X );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_int_object( p );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_square( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_col_vector( p );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_vector_dim_min( p, FLA_Obj_min_dim( A ) );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
    FLA_Check_error_code( e_val );

    return FLA_SUCCESS;
}
コード例 #13
0
ファイル: FLA_Trmv_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Trmv_check( FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj A, FLA_Obj x ) 
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_trans( transa );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_diag( diag );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, A, x, x );
  FLA_Check_error_code( e_val );
 
  return FLA_SUCCESS;
}
コード例 #14
0
ファイル: FLA_Dotc_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Dotc_check( FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_conj( conj );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( x, y );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( x, rho );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( y );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_equal_vector_dims( x, y );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #15
0
FLA_Error FLA_Apply_CAQ_UT_inc_check( FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj ATW, FLA_Obj R, FLA_Obj RTW, FLA_Obj W, FLA_Obj B )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_leftright_side( side );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_trans( trans );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_direct( direct );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_storev( storev );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, ATW );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, RTW );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, W );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
  FLA_Check_error_code( e_val );

  if ( side == FLA_LEFT )
  {
    e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
    FLA_Check_error_code( e_val );
  }
  else
  {
    FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
  }

  return FLA_SUCCESS;
}
コード例 #16
0
ファイル: FLA_Trmmsx_check.c プロジェクト: pgawron/tlash
FLA_Error FLA_Trmmsx_check( FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_leftright_side( side );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_trans( trans );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_valid_diag( diag );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, C );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_consistent_object_datatype( A, alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_consistent_object_datatype( A, beta );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( beta );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );

  if ( side == FLA_LEFT )
  {
    e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
    FLA_Check_error_code( e_val );
  }
  else
  {
    e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
    FLA_Check_error_code( e_val );
  }

  return FLA_SUCCESS;
}
コード例 #17
0
ファイル: FLA_Negate_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Negate_check( FLA_Obj x )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( x );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( x );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #18
0
FLA_Error FLA_Obj_has_nan_check( FLA_Obj A )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #19
0
ファイル: FLA_Check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_Check_identical_object_precision( FLA_Obj A, FLA_Obj B )
{
  FLA_Error    e_val = FLA_SUCCESS;
  FLA_Datatype datatype_A;
  FLA_Datatype datatype_B;
  dim_t        precision_A;
  dim_t        precision_B;

  datatype_A = FLA_Obj_datatype( A );
  datatype_B = FLA_Obj_datatype( B );

  if ( datatype_A == FLA_CONSTANT ||
       datatype_B == FLA_CONSTANT )
  {
    return FLA_SUCCESS;
  }

  if ( FLA_Check_floating_object( A ) != FLA_SUCCESS ||
       FLA_Check_floating_object( B ) != FLA_SUCCESS )
  {
    return FLA_OBJECT_NOT_FLOATING_POINT;
  }

  datatype_A = FLA_Obj_datatype( A );
  datatype_B = FLA_Obj_datatype( B );

  precision_A = FLA_Obj_datatype_size( datatype_A );
  precision_B = FLA_Obj_datatype_size( datatype_B );

  if ( FLA_Obj_is_complex( A ) )
    precision_A = precision_A / 2;

  if ( FLA_Obj_is_complex( B ) )
    precision_B = precision_B / 2;

  if ( precision_A != precision_B )
    e_val = FLA_INCONSISTENT_OBJECT_PRECISION;

  return e_val;
}
コード例 #20
0
FLA_Error FLA_Absolute_square_check( FLA_Obj alpha )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( alpha );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_scalar( alpha );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #21
0
FLA_Error FLA_LU_find_zero_on_diagonal_check( FLA_Obj A )
{
    FLA_Error e_val;

    e_val = FLA_Check_floating_object( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_nonconstant_object( A );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_object_scalar_elemtype( A );
    FLA_Check_error_code( e_val );

    return FLA_SUCCESS;
}
コード例 #22
0
FLA_Error FLA_Obj_datatype_proj_to_real_check( FLA_Obj obj )
{
  FLA_Error e_val;

  e_val = FLA_Check_null_pointer( obj.base );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( obj );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( obj );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #23
0
FLA_Error FLA_Bidiag_UT_extract_real_diagonals_check( FLA_Obj A, FLA_Obj d, FLA_Obj e )
{
  FLA_Error e_val;
  dim_t     min_m_n;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  min_m_n = FLA_Obj_min_dim( A );

  e_val = FLA_Check_nonconstant_object( d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_real_object( d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_precision( A, d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_vector_dim( d, min_m_n );
  FLA_Check_error_code( e_val );

  if ( min_m_n != 1 ) 
  {
    e_val = FLA_Check_nonconstant_object( e );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_real_object( e );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_identical_object_precision( A, e );
    FLA_Check_error_code( e_val );
    
    e_val = FLA_Check_if_vector( e );
    FLA_Check_error_code( e_val );
    
    e_val = FLA_Check_vector_dim( e, min_m_n - 1 );
    FLA_Check_error_code( e_val );
  }

  return FLA_SUCCESS;
}
コード例 #24
0
FLA_Error FLA_Tridiag_UT_extract_real_diagonals_check( FLA_Uplo uplo, FLA_Obj A, FLA_Obj d, FLA_Obj e )
{
  FLA_Error e_val;
  dim_t     m_A;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );

  m_A   = FLA_Obj_length( A );

  e_val = FLA_Check_nonconstant_object( d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_precision( A, d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_if_vector( d );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_vector_dim( d, m_A );
  FLA_Check_error_code( e_val );

  if ( m_A > 1 ) 
  {
    e_val = FLA_Check_nonconstant_object( e );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_identical_object_precision( A, e );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_if_vector( e );
    FLA_Check_error_code( e_val );

    e_val = FLA_Check_vector_dim( e, m_A - 1 );
    FLA_Check_error_code( e_val );
  }
  
  return FLA_SUCCESS;
}
コード例 #25
0
FLA_Error FLA_Bidiag_UT_form_U_check( FLA_Obj A, FLA_Obj T, FLA_Obj U )
{
  FLA_Error e_val;
  dim_t     m_A, n_A;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, U );
  FLA_Check_error_code( e_val );

  // U is not necessary to be square.
  // e_val = FLA_Check_square( U );
  // FLA_Check_error_code( e_val );

  m_A = FLA_Obj_length( A );
  n_A = FLA_Obj_width( A );

  // Form U has no problem in overwriting on A which contains house holder vectors
  // on the lower triangular of the diagonal or subdiagonal.
  if ( m_A >= n_A ) 
  {
      e_val = FLA_Check_object_width_equals( T, n_A );
      FLA_Check_error_code( e_val );

      e_val = FLA_Check_object_length_equals( U, m_A );
      FLA_Check_error_code( e_val );
  }
  else
  {
      e_val = FLA_Check_object_width_equals( T, m_A );
      FLA_Check_error_code( e_val );

      e_val = FLA_Check_object_length_equals( U, m_A );
      FLA_Check_error_code( e_val );
  }

  return FLA_SUCCESS;
}
コード例 #26
0
FLA_Error FLA_Max_elemwise_diff_check( FLA_Obj A, FLA_Obj B )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, B );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #27
0
FLA_Error FLA_Tridiag_UT_shift_U_check( FLA_Uplo uplo, FLA_Obj A )
{
  FLA_Error e_val;

  e_val = FLA_Check_valid_uplo( uplo );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_square( A );
  FLA_Check_error_code( e_val );
  
  return FLA_SUCCESS;
}
コード例 #28
0
FLA_Error FLA_QR_UT_inc_check( FLA_Obj A, FLA_Obj TW )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, TW );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #29
0
ファイル: FLA_LQ_UT_check.c プロジェクト: anaptyxis/libflame
FLA_Error FLA_LQ_UT_check( FLA_Obj A, FLA_Obj T )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_datatype( A, T );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_object_width_equals( T, FLA_Obj_length( A ) );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}
コード例 #30
0
ファイル: FLA_Norm1_check.c プロジェクト: pgawron/tlash
FLA_Error FLA_Norm1_check( FLA_Obj A, FLA_Obj norm )
{
  FLA_Error e_val;

  e_val = FLA_Check_floating_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_nonconstant_object( A );
  FLA_Check_error_code( e_val );

  e_val = FLA_Check_identical_object_precision( A, norm );
  FLA_Check_error_code( e_val );
  
  e_val = FLA_Check_if_scalar( norm );
  FLA_Check_error_code( e_val );

  return FLA_SUCCESS;
}