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; }
FLA_Error FLA_Trsvsx_check( FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y ) { 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_identical_object_datatype( A, y ); 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 ); 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_matrix_vector_dims( FLA_NO_TRANSPOSE, A, 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_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; }
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_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_Dotcs_check( FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, 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_consistent_object_datatype( x, alpha ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_object_datatype( x, beta ); 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_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_if_scalar( rho ); 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_Gemv_check( FLA_Trans transa, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y ) { FLA_Error e_val; e_val = FLA_Check_valid_trans( transa ); 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_identical_object_datatype( A, y ); 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_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_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_matrix_vector_dims( transa, A, x, y ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_Axpys_check( FLA_Obj alpha0, FLA_Obj alpha1, FLA_Obj A, FLA_Obj beta, 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_consistent_object_datatype( A, alpha0 ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_object_datatype( A, alpha1 ); 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( alpha0 ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( alpha1 ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( beta ); 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; }
FLA_Error FLA_Obj_equals_check( FLA_Obj A, FLA_Obj B ) { FLA_Error e_val; e_val = FLA_Check_valid_object_datatype( A ); FLA_Check_error_code( e_val ); e_val = FLA_Check_valid_object_datatype( B ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_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; }
FLA_Error FLA_Obj_le_check( FLA_Obj A, FLA_Obj B ) { FLA_Error e_val; e_val = FLA_Check_real_object( A ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_object_datatype( A, B ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( A ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_scalar( B ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_Set_diag_check( FLA_Obj alpha, 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 ); 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 ); return FLA_SUCCESS; }
FLA_Error FLA_Axpy_buffer_to_object_check( FLA_Trans trans, FLA_Obj alpha, dim_t m, dim_t n, void* A_buffer, dim_t rs, dim_t cs, dim_t i, dim_t j, FLA_Obj B ) { FLA_Error e_val; e_val = FLA_Check_valid_real_trans( trans ); 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_consistent_object_datatype( B, 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( A_buffer ); FLA_Check_error_code( e_val ); e_val = FLA_Check_object_dims( trans, m, n, B ); FLA_Check_error_code( e_val ); e_val = FLA_Check_matrix_strides( m, n, rs, cs ); FLA_Check_error_code( e_val ); if ( trans == FLA_NO_TRANSPOSE ) { e_val = FLA_Check_submatrix_dims_and_offset( m, n, i, j, B ); FLA_Check_error_code( e_val ); } else { e_val = FLA_Check_submatrix_dims_and_offset( n, m, i, j, B ); FLA_Check_error_code( e_val ); } e_val = FLA_Check_nonconstant_object( B ); FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLA_LQ_UT_recover_tau_check( FLA_Obj T, FLA_Obj tau ) { FLA_Error e_val; e_val = FLA_Check_floating_object( T ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_object_datatype( T, tau ); FLA_Check_error_code( e_val ); e_val = FLA_Check_if_vector( tau ); FLA_Check_error_code( e_val ); // This is not valid anymore as T is created with a conforming width to A. //e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) ); //FLA_Check_error_code( e_val ); return FLA_SUCCESS; }
FLA_Error FLASH_Axpy_hier_to_buffer( FLA_Obj alpha, dim_t i, dim_t j, FLA_Obj H, dim_t m, dim_t n, void* buffer, dim_t rs, dim_t cs ) { FLA_Obj flat_matrix; FLA_Datatype datatype; FLA_Error e_val; if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) { e_val = FLA_Check_if_scalar( alpha ); FLA_Check_error_code( e_val ); e_val = FLA_Check_consistent_object_datatype( alpha, H ); FLA_Check_error_code( e_val ); e_val = FLA_Check_matrix_strides( m, n, rs, cs ); FLA_Check_error_code( e_val ); e_val = FLA_Check_submatrix_dims_and_offset( m, n, i, j, H ); FLA_Check_error_code( e_val ); } // Acquire the datatype from the hierarchical matrix object. datatype = FLASH_Obj_datatype( H ); // Create a temporary conventional matrix object of the requested datatype // and dimensions and attach the given buffer containing the incoming data. FLA_Obj_create_without_buffer( datatype, m, n, &flat_matrix ); FLA_Obj_attach_buffer( buffer, rs, cs, &flat_matrix ); // Recurse through H, adding in the corresponding elements of flat_matrix, // starting at the (i,j) element offset. FLASH_Axpy_hier_to_flat( alpha, i, j, H, flat_matrix ); // Free the object (but don't free the buffer!). FLA_Obj_free_without_buffer( &flat_matrix ); return FLA_SUCCESS; }