Fixed a few obscure bugs in the BLAS API.

Details:
- Fixed a missing parameter in the definition of sdsdot_(). The 'sb'
  argument was missing. Strangely, the argument is omitted from dsdot_()
  in the BLAS API.
- Fixed the missing 'c' or 'u' in the "?gerc" or "?geru" operation string
  passed to xerbla_() by the bla_ger_check() macro.
- For bla_syrk_check() and bla_syr2k_check() macros, only allow
  conjugate-transpose (trans='c') as a valid argument for the real
  domain functions [sd]syrk_() and [sd]syr2k_(). (Previously, the
  argument was allowed even for the complex domain equivalents, which
  was inconsistent with the BLAS API.)
This commit is contained in:
Field G. Van Zee
2018-03-19 18:19:43 -05:00
parent fe7d7f1e43
commit 40fa10396c
6 changed files with 21 additions and 7 deletions

View File

@@ -95,13 +95,15 @@ INSERT_GENTFUNCDOT_BLAS( dot, dotv )
float PASTEF77(sd,sdot)
(
const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy
)
{
return ( float )PASTEF77(d,sdot)( n,
x, incx,
y, incy );
float r = ( float )PASTEF77(d,sdot)( n,
x, incx,
y, incy );
return r + *sb;
}
// Input vectors stored in single precision, computed in double precision,

View File

@@ -55,6 +55,7 @@ INSERT_GENTPROTDOT_BLAS( dot )
float PASTEF77(sd,sdot)
(
const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy
);

View File

@@ -66,6 +66,7 @@ void PASTEF772(ch,blasname,chc) \
( \
MKSTR(ch), \
MKSTR(blasname), \
MKSTR(chc), \
m, \
n, \
incx, \

View File

@@ -34,7 +34,7 @@
#ifdef BLIS_ENABLE_BLAS2BLIS
#define bla_ger_check( dt_str, op_str, m, n, incx, incy, lda ) \
#define bla_ger_check( dt_str, op_str, conj_str, m, n, incx, incy, lda ) \
{ \
f77_int info = 0; \
\
@@ -53,7 +53,9 @@
{ \
char func_str[ BLIS_MAX_BLAS_FUNC_STR_LENGTH ]; \
\
sprintf( func_str, "%s%-5s", dt_str, op_str ); \
/* We have to append an extra character to denote whether we
are testing geru or gerc. */ \
sprintf( func_str, "%s%s%-2s", dt_str, op_str, conj_str ); \
\
bli_string_mkupper( func_str ); \
\

View File

@@ -37,10 +37,14 @@
#define bla_syr2k_check( dt_str, op_str, uploa, trans, m, k, lda, ldb, ldc ) \
{ \
f77_int info = 0; \
f77_int is_r; \
f77_int nota, ta, cta; \
f77_int lower, upper; \
f77_int nrowa; \
\
static char* dt_cst = dt_str; \
\
is_r = ( dt_cst[0] == 's' || dt_cst[0] == 'd' ); \
nota = PASTEF770(lsame)( trans, "N", (ftnlen)1, (ftnlen)1 ); \
ta = PASTEF770(lsame)( trans, "T", (ftnlen)1, (ftnlen)1 ); \
cta = PASTEF770(lsame)( trans, "C", (ftnlen)1, (ftnlen)1 ); \
@@ -52,7 +56,7 @@
\
if ( !lower && !upper ) \
info = 1; \
else if ( !nota && !ta && !cta ) \
else if ( !nota && !ta && (is_r ? !cta : 1) ) \
info = 2; \
else if ( *m < 0 ) \
info = 3; \

View File

@@ -37,10 +37,14 @@
#define bla_syrk_check( dt_str, op_str, uploa, transa, m, k, lda, ldc ) \
{ \
f77_int info = 0; \
f77_int is_r; \
f77_int nota, ta, cta; \
f77_int lower, upper; \
f77_int nrowa; \
\
static char* dt_cst = dt_str; \
\
is_r = ( dt_cst[0] == 's' || dt_cst[0] == 'd' ); \
nota = PASTEF770(lsame)( transa, "N", (ftnlen)1, (ftnlen)1 ); \
ta = PASTEF770(lsame)( transa, "T", (ftnlen)1, (ftnlen)1 ); \
cta = PASTEF770(lsame)( transa, "C", (ftnlen)1, (ftnlen)1 ); \
@@ -52,7 +56,7 @@
\
if ( !lower && !upper ) \
info = 1; \
else if ( !nota && !ta && !cta ) \
else if ( !nota && !ta && (is_r ? !cta : 1) ) \
info = 2; \
else if ( *m < 0 ) \
info = 3; \