diff --git a/frame/base/bli_part.c b/frame/base/bli_part.c index 90c556170..482b0724b 100644 --- a/frame/base/bli_part.c +++ b/frame/base/bli_part.c @@ -53,8 +53,11 @@ void bli_acquire_mpart_t2b( subpart_t requested_part, doff_t diag_off_inc; - // Call a special function for partitioning packed objects. - if ( bli_obj_is_packed( *obj ) ) + // Call a special function for partitioning packed objects. (By only + // catching those objects packed to panels, we omit cases where the + // object is packed to row or column storage, as such objects can be + // partitioned through normally.) + if ( bli_obj_is_panel_packed( *obj ) ) { bli_packm_acquire_mpart_t2b( requested_part, i, b, obj, sub_obj ); return; @@ -220,8 +223,11 @@ void bli_acquire_mpart_l2r( subpart_t requested_part, doff_t diag_off_inc; - // Call a special function for partitioning packed objects. - if ( bli_obj_is_packed( *obj ) ) + // Call a special function for partitioning packed objects. (By only + // catching those objects packed to panels, we omit cases where the + // object is packed to row or column storage, as such objects can be + // partitioned through normally.) + if ( bli_obj_is_panel_packed( *obj ) ) { bli_packm_acquire_mpart_l2r( requested_part, j, b, obj, sub_obj ); return; @@ -387,8 +393,11 @@ void bli_acquire_mpart_tl2br( subpart_t requested_part, doff_t diag_off_inc; - // Call a special function for partitioning packed objects. - if ( bli_obj_is_packed( *obj ) ) + // Call a special function for partitioning packed objects. (By only + // catching those objects packed to panels, we omit cases where the + // object is packed to row or column storage, as such objects can be + // partitioned through normally.) + if ( bli_obj_is_panel_packed( *obj ) ) { bli_packm_acquire_mpart_tl2br( requested_part, ij, b, obj, sub_obj ); return; diff --git a/frame/include/bli_obj_macro_defs.h b/frame/include/bli_obj_macro_defs.h index c4571efb2..b242abe31 100644 --- a/frame/include/bli_obj_macro_defs.h +++ b/frame/include/bli_obj_macro_defs.h @@ -823,11 +823,12 @@ bli_obj_width_stored( obj ) // Check if an object is a packed object // NOTE: TRUE here does not mean the actual packing is complete, such as with -// incremental packing.) +// incremental packing. -#define bli_obj_is_packed( obj ) \ +#define bli_obj_is_panel_packed( obj ) \ \ - ( bli_obj_pack_status( obj ) != BLIS_NOT_PACKED ) + ( bli_obj_pack_status( obj ) == BLIS_PACKED_ROW_PANELS || \ + bli_obj_pack_status( obj ) == BLIS_PACKED_COL_PANELS ) // Release object's pack (and cast) memory entries back to memory manager