From 17928b1c9941aa58aef1f122c793e2b14e705267 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Tue, 19 Jun 2018 17:59:03 -0500 Subject: [PATCH] Added static funcs bli_dt_domain(), bli_dt_prec(). Details: - Added definitions of static functions bli_dt_domain()/bli_dt_prec(), which extract a dom_t domain or prec_t precision value, respectively, from a num_t datatype. - Changed the return types of bli_obj_domain() and bli_obj_prec() from objbits_t to dom_t and prec_t. (Not sure why they were ever set to return objbits_t.) --- frame/include/bli_obj_macro_defs.h | 4 ++-- frame/include/bli_param_macro_defs.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frame/include/bli_obj_macro_defs.h b/frame/include/bli_obj_macro_defs.h index bf1259a57..a09fdfaae 100644 --- a/frame/include/bli_obj_macro_defs.h +++ b/frame/include/bli_obj_macro_defs.h @@ -76,12 +76,12 @@ static bool_t bli_obj_is_const( obj_t* obj ) return ( bli_obj_dt( obj ) == BLIS_BITVAL_CONST_TYPE ); } -static objbits_t bli_obj_domain( obj_t* obj ) +static dom_t bli_obj_domain( obj_t* obj ) { return ( obj->info & BLIS_DOMAIN_BIT ); } -static objbits_t bli_obj_prec( obj_t* obj ) +static prec_t bli_obj_prec( obj_t* obj ) { return ( obj->info & BLIS_PRECISION_BIT ); } diff --git a/frame/include/bli_param_macro_defs.h b/frame/include/bli_param_macro_defs.h index e8343d804..b49f17c6a 100644 --- a/frame/include/bli_param_macro_defs.h +++ b/frame/include/bli_param_macro_defs.h @@ -112,6 +112,16 @@ static bool_t bli_is_double_prec( num_t dt ) bli_is_dcomplex( dt ) ); } +static dom_t bli_dt_domain( num_t dt ) +{ + return ( dt & BLIS_DOMAIN_BIT ); +} + +static prec_t bli_dt_prec( num_t dt ) +{ + return ( dt & BLIS_PRECISION_BIT ); +} + static num_t bli_dt_proj_to_real( num_t dt ) { return ( dt & ~BLIS_BITVAL_COMPLEX );