Beispiel #1
0
void bli_packm_int_check( obj_t*   a,
                          obj_t*   p,
                          packm_t* cntl )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_floating_object( a );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( p );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_conformal_dims( a, p );
	bli_check_error_code( e_val );

	// Check control tree pointer.

	// NOTE: We can't check the control tree because we interpret a NULL
	// value (in bli_packm_int()) as a request to skip the operation.
	//e_val = bli_check_valid_cntl( ( void* )cntl );
	//bli_check_error_code( e_val );
}
Beispiel #2
0
void bli_unpackm_check( obj_t*     p,
                        obj_t*     a,
                        cntx_t*    cntx,
                        unpackm_t* cntl )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_floating_object( p );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( a );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_conformal_dims( p, a );
	bli_check_error_code( e_val );

	// Check pack status.

	e_val = bli_check_packm_schema_on_unpack( p );
	bli_check_error_code( e_val );

	// Check control tree pointer

	// NOTE: We can't check the control tree until we stop interpreting a
	// NULL value (in bli_unpackm_int()) as a request to skip the operation.
	//e_val = bli_check_valid_cntl( ( void* )cntl );
	//bli_check_error_code( e_val );
}
Beispiel #3
0
void bli_addd_check( obj_t*  x,
                     obj_t*  y )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_floating_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( y );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_matrix_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_matrix_object( y );
	bli_check_error_code( e_val );

	e_val = bli_check_conformal_dims( x, y );
	bli_check_error_code( e_val );

	// Check object buffers (for non-NULLness).

	e_val = bli_check_object_buffer( x );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( y );
	bli_check_error_code( e_val );
}
Beispiel #4
0
void bli_castm_check
     (
       obj_t* a,
       obj_t* b
     )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_floating_object( a );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( b );
	bli_check_error_code( e_val );

	// Check structure.
	// NOTE: We enforce general structure for now in order to simplify the
	// implementation.

	bli_check_general_object( a );
	bli_check_error_code( e_val );

	bli_check_general_object( b );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_matrix_object( a );
	bli_check_error_code( e_val );

	e_val = bli_check_matrix_object( b );
	bli_check_error_code( e_val );

	e_val = bli_check_conformal_dims( a, b );
	bli_check_error_code( e_val );

	// Check object buffers (for non-NULLness).

	e_val = bli_check_object_buffer( a );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( b );
	bli_check_error_code( e_val );
}
Beispiel #5
0
void bli_subm_check( obj_t*  x,
                     obj_t*  y )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_floating_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( y );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_matrix_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_matrix_object( y );
	bli_check_error_code( e_val );

	e_val = bli_check_conformal_dims( x, y );
	bli_check_error_code( e_val );
}
void bli_dotxaxpyf_check( obj_t*  alpha,
                          obj_t*  at,
                          obj_t*  a,
                          obj_t*  w,
                          obj_t*  x,
                          obj_t*  beta,
                          obj_t*  y,
                          obj_t*  z )
{
	err_t e_val;

	// Check object datatypes.

	e_val = bli_check_noninteger_object( alpha );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( at );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( a );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( w );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_noninteger_object( beta );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( y );
	bli_check_error_code( e_val );

	e_val = bli_check_floating_object( z );
	bli_check_error_code( e_val );

	// Check object dimensions.

	e_val = bli_check_scalar_object( alpha );
	bli_check_error_code( e_val );

	e_val = bli_check_matrix_object( at );
	bli_check_error_code( e_val );

	e_val = bli_check_matrix_object( a );
	bli_check_error_code( e_val );

	e_val = bli_check_vector_object( w );
	bli_check_error_code( e_val );

	e_val = bli_check_vector_object( x );
	bli_check_error_code( e_val );

	e_val = bli_check_scalar_object( beta );
	bli_check_error_code( e_val );

	e_val = bli_check_vector_object( y );
	bli_check_error_code( e_val );

	e_val = bli_check_vector_object( z );
	bli_check_error_code( e_val );

	e_val = bli_check_equal_vector_lengths( w, z );
	bli_check_error_code( e_val );

	e_val = bli_check_equal_vector_lengths( x, y );
	bli_check_error_code( e_val );

	e_val = bli_check_conformal_dims( at, a );
	bli_check_error_code( e_val );

	e_val = bli_check_object_length_equals( at, bli_obj_vector_dim( *w ) );
	bli_check_error_code( e_val );

	e_val = bli_check_object_width_equals( at, bli_obj_vector_dim( *y ) );
	bli_check_error_code( e_val );

	e_val = bli_check_object_length_equals( a, bli_obj_vector_dim( *z ) );
	bli_check_error_code( e_val );

	e_val = bli_check_object_width_equals( a, bli_obj_vector_dim( *x ) );
	bli_check_error_code( e_val );

	// Check object aliases.

	e_val = bli_check_object_alias_of( at, a );
	bli_check_error_code( e_val );

	// Check object buffers (for non-NULLness).

	e_val = bli_check_object_buffer( alpha );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( at );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( a );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( w );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( x );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( beta );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( y );
	bli_check_error_code( e_val );

	e_val = bli_check_object_buffer( z );
	bli_check_error_code( e_val );
}