From 43d5e419e1b424d2143817103dbee8ead797e8aa Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 7 Aug 2014 18:20:40 -0500 Subject: [PATCH] Reverted _obj_is_[row|col]_stored() macros. Details: - Rolled back recent changes to bli_obj_is_row_stored() and bli_obj_is_col_stored() so that those macros now only inspect the strides (row or column). It turns out that the more sophisticated definitions introduced in a51e32e are not necessary, because these "obj" macros are virtually never used on packed matrices, and when they are, they can use bli_obj_is_[row|col}_packed() macros, which inspect the info bitfield. --- frame/1m/packm/bli_packm_part.c | 4 ++-- frame/include/bli_obj_macro_defs.h | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/frame/1m/packm/bli_packm_part.c b/frame/1m/packm/bli_packm_part.c index cf1215a77..376ae0f4f 100644 --- a/frame/1m/packm/bli_packm_part.c +++ b/frame/1m/packm/bli_packm_part.c @@ -54,7 +54,7 @@ void bli_packm_acquire_mpart_t2b( subpart_t requested_part, // Partitioning top-to-bottom through packed column panels (which are // row-stored) is not yet supported. - if ( bli_obj_is_row_stored( *obj ) ) + if ( bli_obj_is_row_packed( *obj ) ) { bli_check_error_code( BLIS_NOT_YET_IMPLEMENTED ); } @@ -130,7 +130,7 @@ void bli_packm_acquire_mpart_l2r( subpart_t requested_part, // Partitioning left-to-right through packed row panels (which are // column-stored) is not yet supported. - if ( bli_obj_is_col_stored( *obj ) ) + if ( bli_obj_is_col_packed( *obj ) ) { bli_check_error_code( BLIS_NOT_YET_IMPLEMENTED ); } diff --git a/frame/include/bli_obj_macro_defs.h b/frame/include/bli_obj_macro_defs.h index d6655460e..c6d65f84c 100644 --- a/frame/include/bli_obj_macro_defs.h +++ b/frame/include/bli_obj_macro_defs.h @@ -581,19 +581,20 @@ bli_obj_width_stored( obj ) \ ( bli_abs( bli_obj_col_stride( obj ) ) ) +// +// NOTE: The following two macros differ from their non-obj counterparts +// in that they do not identify m x 1 and 1 x n objects as column-stored +// and row-stored, respectively, which is needed when considering packed +// objects. But this is okay, since none of the invocations of these +// "obj" macros are used on packed matrices. +// #define bli_obj_is_row_stored( obj ) \ \ - ( bli_obj_col_stride_mag( obj ) == 1 && \ - ( bli_obj_row_stride_mag( obj ) > 1 || \ - bli_obj_width( obj ) == 1 ) \ - ) + ( bli_obj_col_stride_mag( obj ) == 1 ) #define bli_obj_is_col_stored( obj ) \ \ - ( bli_obj_row_stride_mag( obj ) == 1 && \ - ( bli_obj_col_stride_mag( obj ) > 1 || \ - bli_obj_length( obj ) == 1 ) \ - ) + ( bli_obj_row_stride_mag( obj ) == 1 ) #define bli_obj_is_gen_stored( obj ) \ \