FLA_Error FLA_Trsm_internal_check( FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t* cntl ) { FLA_Error e_val; // Abort if the control structure is NULL. e_val = FLA_Check_null_pointer( ( void* ) cntl ); FLA_Check_error_code( e_val ); // Verify that the object element types are identical. e_val = FLA_Check_identical_object_elemtype( A, B ); FLA_Check_error_code( e_val ); // Verify conformality between all the objects. This check works regardless // of whether the element type is FLA_MATRIX or FLA_SCALAR because the // element length and width are used instead of scalar length and width. if ( side == FLA_LEFT ) { //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B ); //FLA_Check_error_code( e_val ); e_val = FLA_Check_object_length_equals( A, FLA_Obj_length( B ) ); FLA_Check_error_code( e_val ); } else { e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B ); FLA_Check_error_code( e_val ); } return FLA_SUCCESS; }
FLA_Error FLA_Herk_internal_check( FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t* cntl ) { FLA_Error e_val; // Abort if the control structure is NULL. e_val = FLA_Check_null_pointer( ( void* ) cntl ); FLA_Check_error_code( e_val ); // Verify that the object element types are identical. e_val = FLA_Check_identical_object_elemtype( A, C ); FLA_Check_error_code( e_val ); // Verify conformality between all the objects. This check works regardless // of whether the element type is FLA_MATRIX or FLA_SCALAR because the // element length and width are used instead of scalar length and width. if ( trans == FLA_NO_TRANSPOSE ) { e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, A, C ); FLA_Check_error_code( e_val ); } else { e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, A, C ); FLA_Check_error_code( e_val ); } return FLA_SUCCESS; }
FLA_Error FLA_QR_UT_copy_internal_check( FLA_Obj A, FLA_Obj T, FLA_Obj U, fla_qrut_t* cntl ) { FLA_Error e_val; // Abort if the control structure is NULL. e_val = FLA_Check_null_pointer( ( void* ) cntl ); FLA_Check_error_code( e_val ); // Verify that the object element types are identical. e_val = FLA_Check_identical_object_elemtype( A, T ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_elemtype( A, U ); FLA_Check_error_code( e_val ); // Verify conformality between all the objects. This check works regardless // of whether the element type is FLA_MATRIX or FLA_SCALAR because the // element length and width are used instead of scalar length and width. e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) ); FLA_Check_error_code( e_val ); e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, U ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_Apply_pivots_rn( FLA_Obj p, FLA_Obj A, fla_appiv_t* cntl ) { FLA_Error r_val = FLA_SUCCESS; if ( FLA_Cntl_variant( cntl ) == FLA_UNBLOCKED_EXTERN ) { FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } else if ( FLA_Cntl_variant( cntl ) == FLA_UNB_OPT_VARIANT1 ) { r_val = FLA_Apply_pivots_rn_opt_var1( p, A ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) { FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) { FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } else { FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } return r_val; }
FLA_Error FLA_Scal_check( FLA_Obj alpha, 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 ); 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; }
FLA_Error FLA_Apply_G_1x2_check( FLA_Obj gamma, FLA_Obj sigma, FLA_Obj beta, FLA_Obj epsilon ) { FLA_Error e_val; e_val = FLA_Check_nonconstant_object( gamma ); FLA_Check_error_code( e_val ); e_val = FLA_Check_real_object( gamma ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_datatype( gamma, sigma ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_datatype( gamma, beta ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_datatype( gamma, epsilon ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( gamma ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( sigma ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( beta ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( epsilon ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
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; }
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; }
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; }
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; }
FLA_Error FLA_Apply_CAQ2_UT_internal_check( FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apcaq2ut_t* cntl ) { FLA_Error e_val; // Abort if the control structure is NULL. e_val = FLA_Check_null_pointer( ( void* ) cntl ); FLA_Check_error_code( e_val ); // Verify that the object element types are identical. e_val = FLA_Check_identical_object_elemtype( D, T ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_elemtype( D, W ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_elemtype( D, C ); FLA_Check_error_code( e_val ); e_val = FLA_Check_identical_object_elemtype( D, E ); FLA_Check_error_code( e_val ); // Verify conformality between all the objects. if ( side == FLA_LEFT ) { if ( FLA_Obj_elemtype( D ) == FLA_MATRIX ) { e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T ); FLA_Check_error_code( e_val ); e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W ); FLA_Check_error_code( e_val ); } else // if ( FLA_Obj_elemtype( D ) == FLA_SCALAR ) { //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D ); //FLA_Check_error_code( e_val ); e_val = FLA_Check_object_width_equals( C, FLA_Obj_width( E ) ); FLA_Check_error_code( e_val ); e_val = FLA_Check_object_length_equals( D, FLA_Obj_length( E ) ); FLA_Check_error_code( e_val ); } //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E ); //FLA_Check_error_code( e_val ); } else { FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } return FLA_SUCCESS; }
FLA_Error FLA_Mach_params_check( FLA_Machval machval, FLA_Obj val ) { FLA_Error e_val; e_val = FLA_Check_valid_machval( machval ); FLA_Check_error_code( e_val ); e_val = FLA_Check_real_object( val ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLASH_Obj_blocksizes_check( FLA_Obj H, dim_t* b_m, dim_t* b_n ) { FLA_Error e_val; e_val = FLA_Check_null_pointer( b_m ); FLA_Check_error_code( e_val ); e_val = FLA_Check_null_pointer( b_n ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
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; }
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; }
FLA_Error FLA_Set_to_identity_check( FLA_Obj A ) { FLA_Error e_val; e_val = FLA_Check_valid_object_datatype( A ); FLA_Check_error_code( e_val ); e_val = FLA_Check_nonconstant_object( A ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_Obj_create_buffer_check( dim_t rs, dim_t cs, FLA_Obj *obj ) { FLA_Error e_val; e_val = FLA_Check_null_pointer( obj ); FLA_Check_error_code( e_val ); e_val = FLA_Check_matrix_strides( FLA_Obj_length( *obj ), FLA_Obj_width( *obj ), rs, cs ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_Obj_create_without_buffer_check( FLA_Datatype datatype, dim_t m, dim_t n, FLA_Obj *obj ) { FLA_Error e_val; e_val = FLA_Check_valid_datatype( datatype ); FLA_Check_error_code( e_val ); e_val = FLA_Check_null_pointer( obj ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
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; }
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; }
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; }
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; }
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; }
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; }
FLA_Error FLA_Obj_extract_real_scalar_check( FLA_Obj alpha, double* alpha_value ) { FLA_Error e_val; e_val = FLA_Check_real_object( alpha ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( alpha ); FLA_Check_error_code( e_val ); e_val = FLA_Check_null_pointer( alpha_value ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
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; }
FLA_Error FLA_Obj_create_conf_to_check( FLA_Trans trans, FLA_Obj obj_old, FLA_Obj *obj ) { FLA_Error e_val; e_val = FLA_Check_valid_trans( trans ); FLA_Check_error_code( e_val ); e_val = FLA_Check_valid_object_datatype( obj_old ); FLA_Check_error_code( e_val ); e_val = FLA_Check_null_pointer( obj ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
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; }
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; }
FLA_Error FLA_Scalr_l( FLA_Obj alpha, FLA_Obj A, fla_scalr_t* cntl ) { FLA_Error r_val = FLA_SUCCESS; if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) { r_val = FLA_Scalr_l_task( alpha, A, cntl ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) { r_val = FLA_Scalr_l_blk_var1( alpha, A, cntl ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) { r_val = FLA_Scalr_l_blk_var2( alpha, A, cntl ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 ) { r_val = FLA_Scalr_l_blk_var3( alpha, A, cntl ); } else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 ) { r_val = FLA_Scalr_l_blk_var4( alpha, A, cntl ); } else { r_val = FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); } return r_val; }