Fixed cpp macro parameter "ch" typo in bla_ger.c.

Details:
- Previously, the BLAS routine-generating macro in bla_ger.c was
  incorrectly passing MKSTR(ch) into the _check() macro when it
  should have been passing in the char that was available, chxy.
  I've instead changed the name of the macro parameter from chxy
  to ch. Similar change as made to bla_ger.h for consistency.
  Thanks to Dave Love in helping track this down. (NOTE: This is
  actually the root cause of the bug that was first patched by
  increasing the length of the operation name strings passed into
  xerbla_(), as defined by the constant BLIS_MAX_BLAS_FUNC_STR_LENGTH,
  in 3d1a5a7. In theory, that change could be backed out now.)
- Applied aforementioned chxy->ch change to bla_dot.[ch], as well as
  frame/compat/cblas/f77_sub/f77_dot_sub.[ch] (not because it needed
  to happen, but for naming consistency).
- Reformatted function signatures/prototypes of CBLAS functions and
  function calls to BLAS in frame/compat/cblas/f77_sub/*.c.
This commit is contained in:
Field G. Van Zee
2018-03-18 19:43:06 -05:00
parent cb7ed90752
commit fe7d7f1e43
11 changed files with 124 additions and 89 deletions

View File

@@ -39,9 +39,9 @@
// Define BLAS-to-BLIS interfaces.
//
#undef GENTFUNCDOT
#define GENTFUNCDOT( ftype, chxy, chc, blis_conjx, blasname, blisname ) \
#define GENTFUNCDOT( ftype, ch, chc, blis_conjx, blasname, blisname ) \
\
ftype PASTEF772(chxy,blasname,chc) \
ftype PASTEF772(ch,blasname,chc) \
( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \
@@ -67,7 +67,7 @@ ftype PASTEF772(chxy,blasname,chc) \
bli_convert_blas_incv( n0, (ftype*)y, *incy, y0, incy0 ); \
\
/* Call BLIS interface. */ \
PASTEMAC(chxy,blisname) \
PASTEMAC(ch,blisname) \
( \
blis_conjx, \
BLIS_NO_CONJUGATE, \

View File

@@ -37,9 +37,9 @@
// Prototype BLAS-to-BLIS interfaces.
//
#undef GENTPROTDOT
#define GENTPROTDOT( ftype, chxy, chc, blasname ) \
#define GENTPROTDOT( ftype, ch, chc, blasname ) \
\
ftype PASTEF772(chxy,blasname,chc) \
ftype PASTEF772(ch,blasname,chc) \
( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \

View File

@@ -39,9 +39,9 @@
// Define BLAS-to-BLIS interfaces.
//
#undef GENTFUNCDOT
#define GENTFUNCDOT( ftype, chxy, chc, blis_conjy, blasname, blisname ) \
#define GENTFUNCDOT( ftype, ch, chc, blis_conjy, blasname, blisname ) \
\
void PASTEF772(chxy,blasname,chc) \
void PASTEF772(ch,blasname,chc) \
( \
const f77_int* m, \
const f77_int* n, \
@@ -87,7 +87,7 @@ void PASTEF772(chxy,blasname,chc) \
cs_a = *lda; \
\
/* Call BLIS interface. */ \
PASTEMAC(chxy,blisname) \
PASTEMAC(ch,blisname) \
( \
BLIS_NO_CONJUGATE, \
blis_conjy, \

View File

@@ -42,14 +42,18 @@
#undef GENTFUNC
#define GENTFUNC( ftype_x, chx, blasname, blisname ) \
\
void PASTEF773(i,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
f77_int* rval \
) \
void PASTEF773(i,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
f77_int* rval \
) \
{ \
*rval = PASTEF772(i,chx,blasname)( n, \
x, incx ); \
*rval = PASTEF772(i,chx,blasname) \
( \
n, \
x, incx \
); \
}
#ifdef BLIS_ENABLE_CBLAS

View File

@@ -39,11 +39,12 @@
#undef GENTPROT
#define GENTPROT( ftype_x, chx, blasname ) \
\
void PASTEF773(i,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
f77_int* rval \
);
void PASTEF773(i,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
f77_int* rval \
);
#ifdef BLIS_ENABLE_CBLAS
INSERT_GENTPROT_BLAS( amax )

View File

@@ -42,14 +42,18 @@
#undef GENTFUNCR2
#define GENTFUNCR2( ftype_x, ftype_r, chx, chr, blasname, blisname ) \
\
void PASTEF773(chr,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
) \
void PASTEF773(chr,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
) \
{ \
*rval = PASTEF772(chr,chx,blasname)( n, \
x, incx ); \
*rval = PASTEF772(chr,chx,blasname) \
( \
n, \
x, incx \
); \
}
#ifdef BLIS_ENABLE_CBLAS

View File

@@ -39,11 +39,12 @@
#undef GENTPROTR2
#define GENTPROTR2( ftype_x, ftype_r, chx, chr, blasname ) \
\
void PASTEF773(chr,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
);
void PASTEF773(chr,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
);
#ifdef BLIS_ENABLE_CBLAS
INSERT_GENTPROTR2_BLAS( asum )

View File

@@ -40,18 +40,22 @@
// Define CBLAS subrotine wrapper interfaces.
//
#undef GENTFUNCDOT
#define GENTFUNCDOT( ftype, chxy, chc, blis_conjx, blasname, blisname ) \
#define GENTFUNCDOT( ftype, ch, chc, blis_conjx, blasname, blisname ) \
\
void PASTEF773(chxy,blasname,chc,sub)( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \
const ftype* y, const f77_int* incy, \
ftype* rval \
) \
void PASTEF773(ch,blasname,chc,sub) \
( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \
const ftype* y, const f77_int* incy, \
ftype* rval \
) \
{ \
*rval = PASTEF772(chxy,blasname,chc)( n, \
x, incx, \
y, incy ); \
*rval = PASTEF772(ch,blasname,chc) \
( \
n, \
x, incx, \
y, incy \
); \
}
#ifdef BLIS_ENABLE_CBLAS
@@ -62,29 +66,40 @@ INSERT_GENTFUNCDOT_BLAS( dot, NULL )
// Input vectors stored in single precision, computed in double precision,
// with result returned in single precision.
void PASTEF772(sds,dot,sub)( const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
float* rval
)
void PASTEF772(sds,dot,sub)
(
const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
float* rval
)
{
*rval = *sb + PASTEF77(sds,dot)( n,
x, incx,
y, incy );
*rval = *sb + PASTEF77(sds,dot)
(
n,
sb,
x, incx,
y, incy
);
}
// Input vectors stored in single precision, computed in double precision,
// with result returned in double precision.
void PASTEF772(ds,dot,sub)( const f77_int* n,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
double* rval
)
void PASTEF772(ds,dot,sub)
(
const f77_int* n,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
double* rval
)
{
*rval = PASTEF77(ds,dot)( n,
x, incx,
y, incy );
*rval = PASTEF77(ds,dot)
(
n,
x, incx,
y, incy
);
}
#endif

View File

@@ -37,14 +37,15 @@
// Prototype CBLAS subroutine wrapper interfaces.
//
#undef GENTPROTDOT
#define GENTPROTDOT( ftype, chxy, chc, blasname ) \
#define GENTPROTDOT( ftype, ch, chc, blasname ) \
\
void PASTEF773(chxy,blasname,chc,sub)( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \
const ftype* y, const f77_int* incy, \
ftype* rval \
);
void PASTEF773(ch,blasname,chc,sub) \
( \
const f77_int* n, \
const ftype* x, const f77_int* incx, \
const ftype* y, const f77_int* incy, \
ftype* rval \
);
#ifdef BLIS_ENABLE_CBLAS
INSERT_GENTPROTDOT_BLAS( dot )
@@ -52,16 +53,20 @@ INSERT_GENTPROTDOT_BLAS( dot )
// -- "Black sheep" dot product function prototypes --
void PASTEF772(sds,dot,sub)( const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
float* rval
);
void PASTEF772(sds,dot,sub)
(
const f77_int* n,
const float* sb,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
float* rval
);
void PASTEF772(ds,dot,sub)( const f77_int* n,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
double* rval
);
void PASTEF772(ds,dot,sub)
(
const f77_int* n,
const float* x, const f77_int* incx,
const float* y, const f77_int* incy,
double* rval
);
#endif

View File

@@ -42,14 +42,18 @@
#undef GENTFUNCR2
#define GENTFUNCR2( ftype_x, ftype_r, chx, chr, blasname, blisname ) \
\
void PASTEF773(chr,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
) \
void PASTEF773(chr,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
) \
{ \
*rval = PASTEF772(chr,chx,blasname)( n, \
x, incx ); \
*rval = PASTEF772(chr,chx,blasname) \
( \
n, \
x, incx \
); \
}
#ifdef BLIS_ENABLE_CBLAS

View File

@@ -39,11 +39,12 @@
#undef GENTPROTR2
#define GENTPROTR2( ftype_x, ftype_r, chx, chr, blasname ) \
\
void PASTEF773(chr,chx,blasname,sub)( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
);
void PASTEF773(chr,chx,blasname,sub) \
( \
const f77_int* n, \
const ftype_x* x, const f77_int* incx, \
ftype_r* rval \
);
#ifdef BLIS_ENABLE_CBLAS
INSERT_GENTPROTR2_BLAS( nrm2 )