mirror of
https://github.com/amd/blis.git
synced 2026-05-11 17:50:00 +00:00
This commit is contained in:
@@ -67,5 +67,13 @@ void bli_absqsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( absq );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( absq );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_addsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_copysc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_divsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,5 +49,10 @@ void bli_getsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_mulsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,5 +67,13 @@ void bli_normfsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,5 +49,10 @@ void bli_setsc_check( double beta_r,
|
||||
|
||||
e_val = bli_check_scalar_object( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,5 +60,13 @@ void bli_sqrtsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_subsc_check( obj_t* chi,
|
||||
|
||||
e_val = bli_check_scalar_object( psi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( psi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -73,5 +73,16 @@ void bli_unzipsc_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_scalar_object( chi_i );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( chi_r );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( chi_i );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,5 +70,16 @@ void bli_zipsc_check( obj_t* beta_r,
|
||||
|
||||
e_val = bli_check_scalar_object( chi );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta_r );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( beta_i );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( chi );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_addv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( 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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_axpyv_check( obj_t* alpha,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( x, y );
|
||||
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( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_copyv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( 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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,5 +67,16 @@ void bli_dotv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( 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 );
|
||||
|
||||
e_val = bli_check_object_buffer( rho );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -81,5 +81,22 @@ void bli_dotxv_check( obj_t* alpha,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( x, y );
|
||||
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( x );
|
||||
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( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( rho );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -47,5 +47,10 @@ void bli_invertv_check( obj_t* x )
|
||||
|
||||
e_val = bli_check_vector_object( x );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_scal2v_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( x, y );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,11 +67,21 @@ void bli_scalv_check( obj_t* beta,
|
||||
void bli_scalv_int_check( obj_t* beta,
|
||||
obj_t* x,
|
||||
scalv_t* cntl )
|
||||
{
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_scalv_basic_check( beta, x );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
// NOTE: We can't check the control tree until we stop interpreting a
|
||||
|
||||
@@ -53,6 +53,9 @@ void bli_scalv_int( obj_t* beta,
|
||||
impl_t i;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Return early if one of the matrix operands has a zero dimension.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_scalv_int_check( beta, x, cntl );
|
||||
@@ -60,9 +63,6 @@ void bli_scalv_int( obj_t* beta,
|
||||
// First check if we are to skip this operation.
|
||||
if ( cntl_is_noop( cntl ) ) return;
|
||||
|
||||
// Return early if one of the matrix operands has a zero dimension.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Return early if the beta scalar equals one.
|
||||
if ( bli_obj_equals( beta, &BLIS_ONE ) ) return;
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
void bli_setv_basic_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
void bli_setv_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
@@ -54,13 +54,13 @@ void bli_setv_basic_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_vector_object( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
void bli_setv_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
{
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_setv_basic_check( beta, x );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,5 @@
|
||||
|
||||
*/
|
||||
|
||||
void bli_setv_basic_check( obj_t* beta,
|
||||
obj_t* x );
|
||||
|
||||
void bli_setv_check( obj_t* beta,
|
||||
obj_t* x );
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_subv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( 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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_swapv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( 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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_addd_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_axpyd_check( obj_t* alpha,
|
||||
|
||||
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( alpha );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_copyd_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -47,5 +47,10 @@ void bli_invertd_check( obj_t* x )
|
||||
|
||||
e_val = bli_check_matrix_object( x );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_scal2d_check( obj_t* beta,
|
||||
|
||||
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( beta );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_scald_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_matrix_object( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_setd_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_matrix_object( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_subd_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -81,5 +81,22 @@ void bli_axpy2v_check( obj_t* alpha1,
|
||||
|
||||
e_val = bli_check_equal_vector_lengths( x, z );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( alpha1 );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( alpha2 );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( z );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -74,5 +74,19 @@ void bli_axpyf_check( obj_t* alpha,
|
||||
|
||||
e_val = bli_check_vector_dim_equals( y, bli_obj_length_after_trans( *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( a );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -99,5 +99,25 @@ void bli_dotaxpyv_check( obj_t* alpha,
|
||||
|
||||
e_val = bli_check_object_alias_of( xt, x );
|
||||
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( xt );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( rho );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( z );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -122,5 +122,31 @@ void bli_dotxaxpyf_check( obj_t* alpha,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -81,5 +81,22 @@ void bli_dotxf_check( obj_t* alpha,
|
||||
|
||||
e_val = bli_check_vector_dim_equals( y, bli_obj_width_after_trans( *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( a );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_addm_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_axpym_check( obj_t* alpha,
|
||||
|
||||
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( alpha );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_copym_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,5 +64,16 @@ void bli_scal2m_check( obj_t* beta,
|
||||
|
||||
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( beta );
|
||||
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( y );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,20 @@ void bli_scalm_int_check( obj_t* beta,
|
||||
obj_t* x,
|
||||
scalm_t* cntl )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_scalm_basic_check( beta, x );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
// NOTE: We can't check the control tree until we stop interpreting a
|
||||
|
||||
@@ -53,6 +53,9 @@ void bli_scalm_int( obj_t* beta,
|
||||
impl_t i;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Return early if one of the matrix operands has a zero dimension.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_scalm_int_check( beta, x, cntl );
|
||||
@@ -60,9 +63,6 @@ void bli_scalm_int( obj_t* beta,
|
||||
// First check if we are to skip this operation.
|
||||
if ( cntl_is_noop( cntl ) ) return;
|
||||
|
||||
// Return early if one of the matrix operands has a zero dimension.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Return early if both beta and the scalar attached to x are unit.
|
||||
if ( bli_obj_equals( beta, &BLIS_ONE ) &&
|
||||
bli_obj_scalar_equals( x, &BLIS_ONE ) ) return;
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
void bli_setm_basic_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
void bli_setm_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
@@ -59,13 +59,13 @@ void bli_setm_basic_check( obj_t* beta,
|
||||
|
||||
e_val = bli_check_nonunit_diag( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
void bli_setm_check( obj_t* beta,
|
||||
obj_t* x )
|
||||
{
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_setm_basic_check( beta, x );
|
||||
|
||||
// Check object buffers (for non-NULLness).
|
||||
|
||||
e_val = bli_check_object_buffer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,5 @@
|
||||
|
||||
*/
|
||||
|
||||
void bli_setm_basic_check( obj_t* beta,
|
||||
obj_t* x );
|
||||
|
||||
void bli_setm_check( obj_t* beta,
|
||||
obj_t* x );
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_subm_check( obj_t* x,
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,23 @@ void bli_gemv_int_check( obj_t* alpha,
|
||||
|
||||
bli_gemv_basic_check( alpha, a, x, beta, y );
|
||||
|
||||
// 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( a );
|
||||
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 );
|
||||
|
||||
// Check control tree pointer.
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -66,15 +66,6 @@ void bli_gemv_int( trans_t transa,
|
||||
obj_t a_local;
|
||||
obj_t x_local;
|
||||
|
||||
// Apply the trans and/or conj parameters to aliases of the objects.
|
||||
bli_obj_alias_with_trans( transa, *a, a_local );
|
||||
bli_obj_alias_with_conj( conjx, *x, x_local );
|
||||
|
||||
// Check parameters. We use the aliased copy of A so the transa parameter
|
||||
// is taken into account for dimension checking.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemv_int_check( alpha, &a_local, &x_local, beta, y, cntl );
|
||||
|
||||
// If y has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *y ) ) return;
|
||||
|
||||
@@ -86,6 +77,15 @@ void bli_gemv_int( trans_t transa,
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply the trans and/or conj parameters to aliases of the objects.
|
||||
bli_obj_alias_with_trans( transa, *a, a_local );
|
||||
bli_obj_alias_with_conj( conjx, *x, x_local );
|
||||
|
||||
// Check parameters. We use the aliased copy of A so the transa parameter
|
||||
// is taken into account for dimension checking.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemv_int_check( alpha, &a_local, &x_local, beta, y, cntl );
|
||||
|
||||
// Extract the variant number and implementation type.
|
||||
n = cntl_var_num( cntl );
|
||||
i = cntl_impl_type( cntl );
|
||||
|
||||
@@ -94,10 +94,10 @@ void bli_ger_check( obj_t* alpha,
|
||||
}
|
||||
|
||||
void bli_ger_int_check( obj_t* alpha,
|
||||
obj_t* x,
|
||||
obj_t* y,
|
||||
obj_t* a,
|
||||
ger_t* cntl )
|
||||
obj_t* x,
|
||||
obj_t* y,
|
||||
obj_t* a,
|
||||
ger_t* cntl )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
@@ -105,6 +105,20 @@ void bli_ger_int_check( obj_t* alpha,
|
||||
|
||||
bli_ger_basic_check( alpha, x, y, a );
|
||||
|
||||
// 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( x );
|
||||
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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -67,10 +67,6 @@ void bli_ger_int( conj_t conjx,
|
||||
obj_t y_local;
|
||||
obj_t a_local;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_ger_int_check( alpha, x, y, a, cntl );
|
||||
|
||||
// If A has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *a ) ) return;
|
||||
|
||||
@@ -81,6 +77,10 @@ void bli_ger_int( conj_t conjx,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_ger_int_check( alpha, x, y, a, cntl );
|
||||
|
||||
// Alias the objects, applying conjx and conjy to x and y, respectively.
|
||||
bli_obj_alias_with_conj( conjx, *x, x_local );
|
||||
bli_obj_alias_with_conj( conjy, *y, y_local );
|
||||
|
||||
@@ -131,6 +131,23 @@ void bli_hemv_int_check( conj_t conjh,
|
||||
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( a );
|
||||
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 );
|
||||
|
||||
// Check control tree pointer.
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -66,10 +66,6 @@ void bli_hemv_int( conj_t conjh,
|
||||
FUNCPTR_T f;
|
||||
obj_t a_local;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_hemv_int_check( conjh, alpha, a, x, beta, y, cntl );
|
||||
|
||||
// If y has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *y ) ) return;
|
||||
|
||||
@@ -81,6 +77,10 @@ void bli_hemv_int( conj_t conjh,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_hemv_int_check( conjh, alpha, a, x, beta, y, cntl );
|
||||
|
||||
// Alias A in case we need to induce the upper triangular case.
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
|
||||
|
||||
@@ -120,6 +120,17 @@ void bli_her_int_check( conj_t conjh,
|
||||
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( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer.
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -63,14 +63,14 @@ void bli_her_int( conj_t conjh,
|
||||
obj_t x_local;
|
||||
obj_t c_local;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_her_int_check( conjh, alpha, x, c, cntl );
|
||||
|
||||
// If C or x has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_her_int_check( conjh, alpha, x, c, cntl );
|
||||
|
||||
// Alias the operands in case we need to apply conjugations.
|
||||
bli_obj_alias_to( *x, x_local );
|
||||
bli_obj_alias_to( *c, c_local );
|
||||
|
||||
@@ -124,6 +124,20 @@ void bli_her2_int_check( conj_t conjh,
|
||||
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( x );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -70,15 +70,15 @@ void bli_her2_int( conj_t conjh,
|
||||
obj_t y_local;
|
||||
obj_t c_local;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_her2_int_check( conjh, alpha, x, y, c, cntl );
|
||||
|
||||
// If C, x, or y has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
if ( bli_obj_has_zero_dim( *y ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_her2_int_check( conjh, alpha, x, y, c, cntl );
|
||||
|
||||
// Alias the operands in case we need to apply conjugations.
|
||||
bli_obj_alias_to( *x, x_local );
|
||||
bli_obj_alias_to( *y, y_local );
|
||||
|
||||
@@ -101,6 +101,17 @@ void bli_trmv_int_check( obj_t* alpha,
|
||||
e_val = bli_check_triangular_object( 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -70,13 +70,14 @@ void bli_trmv_int( obj_t* alpha,
|
||||
FUNCPTR_T f;
|
||||
obj_t a_local;
|
||||
|
||||
// If A or x has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *a ) ) return;
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trmv_int_check( alpha, a, x, cntl );
|
||||
|
||||
// If x has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Alias A in case we need to induce a transformation (ie: transposition).
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
|
||||
|
||||
@@ -101,6 +101,17 @@ void bli_trsv_int_check( obj_t* alpha,
|
||||
e_val = bli_check_triangular_object( 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check control tree pointer
|
||||
|
||||
e_val = bli_check_valid_cntl( ( void* )cntl );
|
||||
|
||||
@@ -70,13 +70,14 @@ void bli_trsv_int( obj_t* alpha,
|
||||
FUNCPTR_T f;
|
||||
obj_t a_local;
|
||||
|
||||
// If A or x has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *a ) ) return;
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trsv_int_check( alpha, a, x, cntl );
|
||||
|
||||
// If x has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *x ) ) return;
|
||||
|
||||
// Alias A in case we need to induce a transformation (ie: transposition).
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
|
||||
|
||||
@@ -121,6 +121,23 @@ void bli_gemm_int_check( obj_t* alpha,
|
||||
{
|
||||
err_t 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( b );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_gemm_basic_check( alpha, a, b, beta, c );
|
||||
|
||||
@@ -68,10 +68,6 @@ void bli_gemm_int( obj_t* alpha,
|
||||
impl_t i;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// If C has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
|
||||
@@ -85,6 +81,10 @@ void bli_gemm_int( obj_t* alpha,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// If A or B is marked as being filled with zeros, scale C by beta and
|
||||
// return early.
|
||||
if ( bli_obj_is_zeros( *a ) ||
|
||||
|
||||
@@ -111,6 +111,23 @@ void bli_hemm_check( side_t side,
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check object pointers.
|
||||
|
||||
e_val = bli_check_null_pointer( alpha );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( b );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( beta );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_hemm_basic_check( side, alpha, a, b, beta, c );
|
||||
|
||||
@@ -164,6 +164,32 @@ void bli_her2k_int_check( obj_t* alpha,
|
||||
{
|
||||
err_t 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( bh );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( alpha_conj );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( b );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( ah );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_her2k_basic_check( alpha, a, bh, alpha_conj, b, ah, beta, c );
|
||||
|
||||
@@ -131,6 +131,23 @@ void bli_herk_int_check( obj_t* alpha,
|
||||
{
|
||||
err_t 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( ah );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_herk_basic_check( alpha, a, ah, beta, c );
|
||||
|
||||
@@ -78,10 +78,6 @@ void bli_herk_int( obj_t* alpha,
|
||||
bool_t uplo;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_herk_int_check( alpha, a, ah, beta, c, cntl );
|
||||
|
||||
// If C has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
|
||||
@@ -95,6 +91,10 @@ void bli_herk_int( obj_t* alpha,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_herk_int_check( alpha, a, ah, beta, c, cntl );
|
||||
|
||||
// Alias A and A' in case we need to update attached scalars.
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
bli_obj_alias_to( *ah, ah_local );
|
||||
|
||||
@@ -120,6 +120,23 @@ void bli_trmm_int_check( obj_t* alpha,
|
||||
{
|
||||
err_t 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( b );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_trmm_basic_check( BLIS_LEFT, alpha, a, b, beta, c );
|
||||
|
||||
@@ -100,10 +100,6 @@ void bli_trmm_int( obj_t* alpha,
|
||||
impl_t i;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trmm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// If C has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
|
||||
@@ -117,6 +113,10 @@ void bli_trmm_int( obj_t* alpha,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trmm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// Alias A and B in case we need to update attached scalars.
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
bli_obj_alias_to( *b, b_local );
|
||||
|
||||
@@ -120,6 +120,23 @@ void bli_trsm_int_check( obj_t* alpha,
|
||||
{
|
||||
err_t 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( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( b );
|
||||
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( c );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
// Check basic properties of the operation.
|
||||
|
||||
bli_trsm_basic_check( BLIS_LEFT, alpha, a, b, beta, c );
|
||||
|
||||
@@ -100,10 +100,6 @@ void bli_trsm_int( obj_t* alpha,
|
||||
impl_t i;
|
||||
FUNCPTR_T f;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trsm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// If C has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( *c ) ) return;
|
||||
|
||||
@@ -117,6 +113,10 @@ void bli_trsm_int( obj_t* alpha,
|
||||
return;
|
||||
}
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_trsm_int_check( alpha, a, b, beta, c, cntl );
|
||||
|
||||
// Alias A and B in case we need to update attached scalars.
|
||||
bli_obj_alias_to( *a, a_local );
|
||||
bli_obj_alias_to( *b, b_local );
|
||||
|
||||
@@ -77,7 +77,6 @@ err_t bli_check_null_pointer( void* ptr )
|
||||
return e_val;
|
||||
}
|
||||
|
||||
|
||||
// -- Parameter-related checks -------------------------------------------------
|
||||
|
||||
err_t bli_check_valid_side( side_t side )
|
||||
@@ -676,7 +675,6 @@ err_t bli_check_valid_3x3_subpart( subpart_t part )
|
||||
return e_val;
|
||||
}
|
||||
|
||||
|
||||
// -- Control tree-related checks ----------------------------------------------
|
||||
|
||||
err_t bli_check_valid_cntl( void* cntl )
|
||||
@@ -714,6 +712,17 @@ err_t bli_check_packv_schema_on_unpack( obj_t* a )
|
||||
return e_val;
|
||||
}
|
||||
|
||||
// -- Buffer-related checks ----------------------------------------------------
|
||||
|
||||
err_t bli_check_object_buffer( obj_t* a )
|
||||
{
|
||||
err_t e_val = BLIS_SUCCESS;
|
||||
|
||||
if ( bli_obj_buffer( *a ) == NULL )
|
||||
e_val = BLIS_EXPECTED_NONNULL_OBJECT_BUFFER;
|
||||
|
||||
return e_val;
|
||||
}
|
||||
|
||||
// -- Memory allocator checks --------------------------------------------------
|
||||
|
||||
@@ -750,7 +759,6 @@ err_t bli_check_if_exhausted_pool( pool_t* pool )
|
||||
return e_val;
|
||||
}
|
||||
|
||||
|
||||
// -- Memory allocator checks --------------------------------------------------
|
||||
|
||||
err_t bli_check_object_alias_of( obj_t* a, obj_t* b )
|
||||
|
||||
@@ -93,6 +93,8 @@ err_t bli_check_valid_cntl( void* cntl );
|
||||
err_t bli_check_packm_schema_on_unpack( obj_t* a );
|
||||
err_t bli_check_packv_schema_on_unpack( obj_t* a );
|
||||
|
||||
err_t bli_check_object_buffer( obj_t* a );
|
||||
|
||||
err_t bli_check_valid_packbuf( packbuf_t buf_type );
|
||||
err_t bli_check_requested_block_size_for_pool( siz_t req_size, pool_t* pool );
|
||||
err_t bli_check_if_exhausted_pool( pool_t* pool );
|
||||
|
||||
@@ -182,6 +182,9 @@ void bli_error_msgs_init( void )
|
||||
sprintf( bli_error_string_for_code(BLIS_PACK_SCHEMA_NOT_SUPPORTED_FOR_UNPACK),
|
||||
"Pack schema not yet supported/implemented for use with unpacking." );
|
||||
|
||||
sprintf( bli_error_string_for_code(BLIS_EXPECTED_NONNULL_OBJECT_BUFFER),
|
||||
"Encountered object containing unexpected null buffer." );
|
||||
|
||||
sprintf( bli_error_string_for_code(BLIS_INVALID_PACKBUF),
|
||||
"Invalid packbuf_t value." );
|
||||
sprintf( bli_error_string_for_code(BLIS_REQUESTED_CONTIG_BLOCK_TOO_BIG ),
|
||||
|
||||
@@ -89,8 +89,14 @@ void bli_obj_attach_buffer_check( void* p,
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
e_val = bli_check_null_pointer( p );
|
||||
bli_check_error_code( e_val );
|
||||
// NOTE: We allow the caller to attach NULL to an object because
|
||||
// the buffer contains NULL after _create_wihout_buffer() anyway.
|
||||
// Thus, we're not opening a window for undefined behavior because
|
||||
// that window is already open. Instead of checking for NULL here,
|
||||
// we check the object buffers for all objects in all of the
|
||||
// computational operations' _check()/_int_check() functions.
|
||||
//e_val = bli_check_null_pointer( p );
|
||||
//bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_matrix_strides( bli_obj_length( *obj ),
|
||||
bli_obj_width( *obj ),
|
||||
@@ -143,6 +149,9 @@ void bli_obj_create_const_copy_of_check( obj_t* a, obj_t* b )
|
||||
|
||||
e_val = bli_check_scalar_object( a );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_object_buffer( a );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
void bli_datatype_size_check( num_t dt )
|
||||
|
||||
@@ -727,15 +727,18 @@ typedef enum
|
||||
// Packing-specific errors
|
||||
BLIS_PACK_SCHEMA_NOT_SUPPORTED_FOR_UNPACK = (-100),
|
||||
|
||||
// Buffer-specific errors
|
||||
BLIS_EXPECTED_NONNULL_OBJECT_BUFFER = (-110),
|
||||
|
||||
// Memory allocator errors
|
||||
BLIS_INVALID_PACKBUF = (-110),
|
||||
BLIS_REQUESTED_CONTIG_BLOCK_TOO_BIG = (-111),
|
||||
BLIS_EXHAUSTED_CONTIG_MEMORY_POOL = (-112),
|
||||
BLIS_INVALID_PACKBUF = (-120),
|
||||
BLIS_REQUESTED_CONTIG_BLOCK_TOO_BIG = (-121),
|
||||
BLIS_EXHAUSTED_CONTIG_MEMORY_POOL = (-122),
|
||||
|
||||
// Object-related errors
|
||||
BLIS_EXPECTED_OBJECT_ALIAS = (-120),
|
||||
BLIS_EXPECTED_OBJECT_ALIAS = (-130),
|
||||
|
||||
BLIS_ERROR_CODE_MAX = (-130)
|
||||
BLIS_ERROR_CODE_MAX = (-140)
|
||||
} err_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_amaxv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( abmax_i );
|
||||
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( abmax_i );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_asumv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( asum );
|
||||
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( asum );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -66,5 +66,10 @@ void bli_mkherm_check( obj_t* a )
|
||||
|
||||
e_val = bli_check_upper_or_lower_object( a );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -66,5 +66,10 @@ void bli_mksymm_check( obj_t* a )
|
||||
|
||||
e_val = bli_check_upper_or_lower_object( a );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -66,5 +66,10 @@ void bli_mktrim_check( obj_t* a )
|
||||
|
||||
e_val = bli_check_upper_or_lower_object( a );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_norm1m_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_norm1v_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_normfm_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -57,5 +57,13 @@ void bli_normfv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_normim_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,5 +54,13 @@ void bli_normiv_check( obj_t* x,
|
||||
|
||||
e_val = bli_check_scalar_object( norm );
|
||||
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( norm );
|
||||
bli_check_error_code( e_val );
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ void bli_fprintm( FILE* file, char* s1, obj_t* x, char* format, char* s2 )
|
||||
|
||||
FUNCPTR_T f;
|
||||
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_fprintm_check( file, s1, x, format, s2 );
|
||||
|
||||
// Handle constants up front.
|
||||
if ( dt_x == BLIS_CONSTANT )
|
||||
{
|
||||
|
||||
61
frame/util/printm/bli_fprintm_check.c
Normal file
61
frame/util/printm/bli_fprintm_check.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
void bli_fprintm_check( FILE* file,
|
||||
char* s1,
|
||||
obj_t* x,
|
||||
char* format,
|
||||
char* s2 )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check argument pointers.
|
||||
|
||||
e_val = bli_check_null_pointer( file );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( s1 );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( s2 );
|
||||
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 );
|
||||
}
|
||||
|
||||
39
frame/util/printm/bli_fprintm_check.h
Normal file
39
frame/util/printm/bli_fprintm_check.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
void bli_fprintm_check( FILE* file,
|
||||
char* s1,
|
||||
obj_t* x,
|
||||
char* format,
|
||||
char* s2 );
|
||||
@@ -33,6 +33,7 @@
|
||||
*/
|
||||
|
||||
#include "bli_fprintm.h"
|
||||
#include "bli_fprintm_check.h"
|
||||
|
||||
void bli_printm( char* s1,
|
||||
obj_t* x,
|
||||
|
||||
@@ -59,6 +59,9 @@ void bli_fprintv( FILE* file, char* s1, obj_t* x, char* format, char* s2 )
|
||||
|
||||
FUNCPTR_T f;
|
||||
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_fprintv_check( file, s1, x, format, s2 );
|
||||
|
||||
// Index into the type combination array to extract the correct
|
||||
// function pointer.
|
||||
f = ftypes[dt_x];
|
||||
|
||||
61
frame/util/printv/bli_fprintv_check.c
Normal file
61
frame/util/printv/bli_fprintv_check.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
void bli_fprintv_check( FILE* file,
|
||||
char* s1,
|
||||
obj_t* x,
|
||||
char* format,
|
||||
char* s2 )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check argument pointers.
|
||||
|
||||
e_val = bli_check_null_pointer( file );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( s1 );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_null_pointer( s2 );
|
||||
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 );
|
||||
}
|
||||
|
||||
39
frame/util/printv/bli_fprintv_check.h
Normal file
39
frame/util/printv/bli_fprintv_check.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
void bli_fprintv_check( FILE* file,
|
||||
char* s1,
|
||||
obj_t* x,
|
||||
char* format,
|
||||
char* s2 );
|
||||
@@ -33,6 +33,7 @@
|
||||
*/
|
||||
|
||||
#include "bli_fprintv.h"
|
||||
#include "bli_fprintv_check.h"
|
||||
|
||||
void bli_printv( char* s1,
|
||||
obj_t* x,
|
||||
|
||||
@@ -34,12 +34,22 @@
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
|
||||
//
|
||||
// Define object-based interface.
|
||||
//
|
||||
void bli_randm( obj_t* x )
|
||||
{
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_randm_check( x );
|
||||
|
||||
bli_randm_unb_var1( x );
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Define BLAS-like interfaces.
|
||||
//
|
||||
#undef GENTFUNC
|
||||
#define GENTFUNC( ctype, ch, opname, varname ) \
|
||||
\
|
||||
|
||||
@@ -32,11 +32,19 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "bli_randm_check.h"
|
||||
#include "bli_randm_unb_var1.h"
|
||||
|
||||
|
||||
//
|
||||
// Prototype object-based interface.
|
||||
//
|
||||
void bli_randm( obj_t* x );
|
||||
|
||||
|
||||
//
|
||||
// Prototype BLAS-like interfaces.
|
||||
//
|
||||
#undef GENTPROT
|
||||
#define GENTPROT( ctype, ch, opname ) \
|
||||
\
|
||||
|
||||
54
frame/util/randm/bli_randm_check.c
Normal file
54
frame/util/randm/bli_randm_check.c
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
void bli_randm_check( obj_t* x )
|
||||
{
|
||||
err_t e_val;
|
||||
|
||||
// Check object datatypes.
|
||||
|
||||
e_val = bli_check_noninteger_object( x );
|
||||
bli_check_error_code( e_val );
|
||||
|
||||
e_val = bli_check_nonconstant_object( x );
|
||||
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 );
|
||||
}
|
||||
|
||||
35
frame/util/randm/bli_randm_check.h
Normal file
35
frame/util/randm/bli_randm_check.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
|
||||
BLIS
|
||||
An object-based framework for developing high-performance BLAS-like
|
||||
libraries.
|
||||
|
||||
Copyright (C) 2014, The University of Texas
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
- Neither the name of The University of Texas nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
void bli_randm_check( obj_t* x );
|
||||
@@ -34,12 +34,22 @@
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
|
||||
//
|
||||
// Define object-based interface.
|
||||
//
|
||||
void bli_randv( obj_t* x )
|
||||
{
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_randv_check( x );
|
||||
|
||||
bli_randv_unb_var1( x );
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Define BLAS-like interfaces.
|
||||
//
|
||||
#undef GENTFUNC
|
||||
#define GENTFUNC( ctype, ch, opname, varname ) \
|
||||
\
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user