Fixed definition of bli_is_packed_object() macro.

Details:
- Changed the definition of bli_is_packed_object() so that it keys off of the
  value of the pack schema bits in the info field of obj_t, rather than
  comparing the obj_t buffer with that of the mem_t entry. This was the cause
  of a very low probability bug whereby uninitialized memory caused the macro
  to evaluate to TRUE even though the object in question was not packed.
  Thanks to Vernon Austel of IBM for helping discover this bug.
- Changed an abort() in bli_packm_part() to a not-yet-implemented.
This commit is contained in:
Field G. Van Zee
2013-04-08 15:00:13 -05:00
parent 3be14c32f7
commit a571af816d
2 changed files with 4 additions and 7 deletions

View File

@@ -246,7 +246,7 @@ dim_t bli_packm_offset_to_panel_for( dim_t offmn, obj_t* p )
else
{
panel_off = 0;
bli_abort();
bli_check_error_code( BLIS_NOT_YET_IMPLEMENTED );
}
return panel_off;

View File

@@ -822,15 +822,12 @@ bli_obj_width_stored( obj )
// Check if an object is a packed object
// (ie: was a pack buffer acquired for this object; TRUE here does not mean
// the actual packing is complete, such as with incremental packing.)
// NOTE: TRUE here does not mean the actual packing is complete, such as with
// incremental packing.)
#define bli_obj_is_packed( obj ) \
\
( bli_obj_buffer( obj ) == bli_mem_buffer( bli_obj_pack_mem( obj ) ) && \
bli_obj_buffer( obj ) != NULL \
? TRUE \
: FALSE ) \
( bli_obj_pack_status( obj ) != BLIS_NOT_PACKED ) \
// Release object's pack (and cast) memory entries back to memory manager