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.)
This commit is contained in:
Field G. Van Zee
2018-06-19 17:59:03 -05:00
parent 5f7fbb7115
commit 17928b1c99
2 changed files with 12 additions and 2 deletions

View File

@@ -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 );
}

View File

@@ -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 );