From 2fecc88ca22142020573f168da715e8e9f3dd7de Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 20 Dec 2012 11:35:14 -0600 Subject: [PATCH] Fixed harmless macro bug in level-1m operations. Details: - Fixed some inconsistent usage of n_iter_max and n_iter in the two bl2_set_dims_incs_uplo_[12]m macros. The right thing ended up happening despite the bug, which is why I had not discovered it until now. --- frame/1m/axpym/bl2_axpym_unb_var1.c | 6 +++--- frame/1m/copym/bl2_copym_unb_var1.c | 24 ++++++++++++------------ frame/1m/copynzm/bl2_copynzm_unb_var1.c | 6 +++--- frame/1m/scal2m/bl2_scal2m_unb_var1.c | 6 +++--- frame/1m/scalm/bl2_scalm_unb_var1.c | 4 ++-- frame/1m/setm/bl2_setm_unb_var1.c | 4 ++-- frame/include/bl2_param_macro_defs.h | 10 ++++++---- frame/util/randm/bl2_randm_unb_var1.c | 4 ++-- 8 files changed, 33 insertions(+), 31 deletions(-) diff --git a/frame/1m/axpym/bl2_axpym_unb_var1.c b/frame/1m/axpym/bl2_axpym_unb_var1.c index 7d9a763a2..54aaafa16 100644 --- a/frame/1m/axpym/bl2_axpym_unb_var1.c +++ b/frame/1m/axpym/bl2_axpym_unb_var1.c @@ -133,8 +133,8 @@ void PASTEMAC3(cha,chx,chy,varname)( \ ctype_y* y1; \ uplo_t uplox_eff; \ conj_t conjx; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ inc_t ldy, incy; \ dim_t j, i; \ @@ -152,7 +152,7 @@ void PASTEMAC3(cha,chx,chy,varname)( \ /* Set various loop parameters. */ \ bl2_set_dims_incs_uplo_2m( diagoffx, diagx, transx, \ uplox, m, n, rs_x, cs_x, rs_y, cs_y, \ - uplox_eff, n_elem_max, n_iter_max, incx, ldx, incy, ldy, \ + uplox_eff, n_elem_max, n_iter, incx, ldx, incy, ldy, \ ij0, n_shift ); \ \ if ( bl2_is_zeros( uplox_eff ) ) return; \ diff --git a/frame/1m/copym/bl2_copym_unb_var1.c b/frame/1m/copym/bl2_copym_unb_var1.c index e14d80a8c..28623575c 100644 --- a/frame/1m/copym/bl2_copym_unb_var1.c +++ b/frame/1m/copym/bl2_copym_unb_var1.c @@ -119,8 +119,8 @@ void PASTEMAC2(chx,chy,varname)( \ ctype_y* y1; \ uplo_t uplox_eff; \ conj_t conjx; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ inc_t ldy, incy; \ dim_t j, i; \ @@ -135,7 +135,7 @@ void PASTEMAC2(chx,chy,varname)( \ /* Set various loop parameters. */ \ bl2_set_dims_incs_uplo_2m( diagoffx, diagx, transx, \ uplox, m, n, rs_x, cs_x, rs_y, cs_y, \ - uplox_eff, n_elem_max, n_iter_max, incx, ldx, incy, ldy, \ + uplox_eff, n_elem_max, n_iter, incx, ldx, incy, ldy, \ ij0, n_shift ); \ \ if ( bl2_is_zeros( uplox_eff ) ) return; \ @@ -154,9 +154,9 @@ void PASTEMAC2(chx,chy,varname)( \ y1 = y_cast + (j )*ldy + (0 )*incy; \ \ PASTEMAC2(chx,chy,kername)( conjx, \ - n_elem, \ - x1, incx, \ - y1, incy ); \ + n_elem, \ + x1, incx, \ + y1, incy ); \ } \ } \ else \ @@ -172,9 +172,9 @@ void PASTEMAC2(chx,chy,varname)( \ y1 = y_cast + (ij0+j )*ldy + (0 )*incy; \ \ PASTEMAC2(chx,chy,kername)( conjx, \ - n_elem, \ - x1, incx, \ - y1, incy ); \ + n_elem, \ + x1, incx, \ + y1, incy ); \ } \ } \ else if ( bl2_is_lower( uplox_eff ) ) \ @@ -189,9 +189,9 @@ void PASTEMAC2(chx,chy,varname)( \ y1 = y_cast + (j )*ldy + (ij0+i )*incy; \ \ PASTEMAC2(chx,chy,kername)( conjx, \ - n_elem, \ - x1, incx, \ - y1, incy ); \ + n_elem, \ + x1, incx, \ + y1, incy ); \ } \ } \ \ diff --git a/frame/1m/copynzm/bl2_copynzm_unb_var1.c b/frame/1m/copynzm/bl2_copynzm_unb_var1.c index 0ba70228a..685e16fa3 100644 --- a/frame/1m/copynzm/bl2_copynzm_unb_var1.c +++ b/frame/1m/copynzm/bl2_copynzm_unb_var1.c @@ -115,8 +115,8 @@ void PASTEMAC2(chx,chy,varname)( \ ctype_y* y1; \ uplo_t uplox_eff; \ conj_t conjx; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ inc_t ldy, incy; \ dim_t j, i; \ @@ -129,7 +129,7 @@ void PASTEMAC2(chx,chy,varname)( \ /* Set various loop parameters. */ \ bl2_set_dims_incs_uplo_2m( diagoffx, BLIS_NONUNIT_DIAG, transx, \ uplox, m, n, rs_x, cs_x, rs_y, cs_y, \ - uplox_eff, n_elem_max, n_iter_max, incx, ldx, incy, ldy, \ + uplox_eff, n_elem_max, n_iter, incx, ldx, incy, ldy, \ ij0, n_shift ); \ \ if ( bl2_is_zeros( uplox_eff ) ) return; \ diff --git a/frame/1m/scal2m/bl2_scal2m_unb_var1.c b/frame/1m/scal2m/bl2_scal2m_unb_var1.c index d4dc1dd6b..9fdb2c6e5 100644 --- a/frame/1m/scal2m/bl2_scal2m_unb_var1.c +++ b/frame/1m/scal2m/bl2_scal2m_unb_var1.c @@ -133,8 +133,8 @@ void PASTEMAC3(cha,chx,chy,varname)( \ ctype_y* y1; \ uplo_t uplox_eff; \ conj_t conjx; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ inc_t ldy, incy; \ dim_t j, i; \ @@ -163,7 +163,7 @@ void PASTEMAC3(cha,chx,chy,varname)( \ /* Set various loop parameters. */ \ bl2_set_dims_incs_uplo_2m( diagoffx, diagx, transx, \ uplox, m, n, rs_x, cs_x, rs_y, cs_y, \ - uplox_eff, n_elem_max, n_iter_max, incx, ldx, incy, ldy, \ + uplox_eff, n_elem_max, n_iter, incx, ldx, incy, ldy, \ ij0, n_shift ); \ \ if ( bl2_is_zeros( uplox_eff ) ) return; \ diff --git a/frame/1m/scalm/bl2_scalm_unb_var1.c b/frame/1m/scalm/bl2_scalm_unb_var1.c index b423199c7..9b2ca4539 100644 --- a/frame/1m/scalm/bl2_scalm_unb_var1.c +++ b/frame/1m/scalm/bl2_scalm_unb_var1.c @@ -121,8 +121,8 @@ void PASTEMAC2(chb,chx,varname)( \ ctype_x* x_cast = x; \ ctype_x* x1; \ uplo_t uplox_eff; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ dim_t j, i; \ dim_t ij0, n_shift; \ diff --git a/frame/1m/setm/bl2_setm_unb_var1.c b/frame/1m/setm/bl2_setm_unb_var1.c index 56920fae9..f7cf9f50f 100644 --- a/frame/1m/setm/bl2_setm_unb_var1.c +++ b/frame/1m/setm/bl2_setm_unb_var1.c @@ -117,8 +117,8 @@ void PASTEMAC2(chb,chx,varname)( \ ctype_x* x_cast = x; \ ctype_x* x1; \ uplo_t uplox_eff; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ dim_t j, i; \ dim_t ij0, n_shift; \ diff --git a/frame/include/bl2_param_macro_defs.h b/frame/include/bl2_param_macro_defs.h index 0f2a121fb..74ee3d0aa 100644 --- a/frame/include/bl2_param_macro_defs.h +++ b/frame/include/bl2_param_macro_defs.h @@ -513,8 +513,8 @@ // argument. #define bl2_set_dims_incs_uplo_1m( diagoffa, diaga, \ - uploa, m, n, rs_a, cs_a, \ - uplo_eff, n_elem, n_iter, inca, lda, \ + uploa, m, n, rs_a, cs_a, \ + uplo_eff, n_elem_max, n_iter, inca, lda, \ ij0, n_shift ) \ { \ /* If matrix A is entirely "unstored", that is, if either: @@ -529,6 +529,7 @@ { \ doff_t diagoffa_use = diagoffa; \ doff_t diagoff_eff; \ + dim_t n_iter_max; \ \ if ( bl2_is_unit_diag( diaga ) ) \ bl2_shift_diag_offset_to_shrink_uplo( uploa, diagoffa_use ); \ @@ -599,8 +600,8 @@ #define bl2_set_dims_incs_uplo_2m( \ diagoffa, diaga, transa, \ - uploa, m, n, rs_a, cs_a, rs_b, cs_b, \ - uplo_eff, n_elem_max, n_iter_max, inca, lda, incb, ldb, \ + uploa, m, n, rs_a, cs_a, rs_b, cs_b, \ + uplo_eff, n_elem_max, n_iter, inca, lda, incb, ldb, \ ij0, n_shift \ ) \ { \ @@ -616,6 +617,7 @@ { \ doff_t diagoffa_use = diagoffa; \ doff_t diagoff_eff; \ + dim_t n_iter_max; \ \ if ( bl2_is_unit_diag( diaga ) ) \ bl2_shift_diag_offset_to_shrink_uplo( uploa, diagoffa_use ); \ diff --git a/frame/util/randm/bl2_randm_unb_var1.c b/frame/util/randm/bl2_randm_unb_var1.c index 85de20640..e98d2850b 100644 --- a/frame/util/randm/bl2_randm_unb_var1.c +++ b/frame/util/randm/bl2_randm_unb_var1.c @@ -97,8 +97,8 @@ void PASTEMAC(ch,varname)( \ ctype omega; \ double max_m_n; \ uplo_t uplox_eff; \ - dim_t n_iter_max, n_iter; \ - dim_t n_elem_max, n_elem; \ + dim_t n_iter; \ + dim_t n_elem, n_elem_max; \ inc_t ldx, incx; \ dim_t j, i; \ dim_t ij0, n_shift; \