From c253d14a72a746b670b3ffbb6e81bcafc73d1133 Mon Sep 17 00:00:00 2001 From: Devin Matthews Date: Fri, 7 Aug 2020 09:39:04 -0500 Subject: [PATCH] Also handle Intel-style complex return in CBLAS interface. --- frame/compat/cblas/f77_sub/f77_dot_sub.c | 37 ++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/frame/compat/cblas/f77_sub/f77_dot_sub.c b/frame/compat/cblas/f77_sub/f77_dot_sub.c index 8667791fb..f1b3dff40 100644 --- a/frame/compat/cblas/f77_sub/f77_dot_sub.c +++ b/frame/compat/cblas/f77_sub/f77_dot_sub.c @@ -35,6 +35,7 @@ #include "blis.h" #include "f77_dot_sub.h" +#ifdef BLIS_ENABLE_CBLAS // // Define CBLAS subrotine wrapper interfaces. @@ -58,9 +59,41 @@ void PASTEF773(ch,blasname,chc,sub) \ ); \ } -#ifdef BLIS_ENABLE_CBLAS -INSERT_GENTFUNCDOT_BLAS( dot, NULL ) +INSERT_GENTFUNCDOTR_BLAS( dot, NULL ) +#ifdef BLIS_DISABLE_COMPLEX_RETURN_INTEL + +INSERT_GENTFUNCDOTC_BLAS( dot, NULL ) + +#else + +// +// Define CBLAS subrotine wrapper interfaces for complex types. +// For the "intel" complex return type, pass a hidden first parameter. +// +#undef GENTFUNCDOT +#define GENTFUNCDOT( ftype, ch, chc, blis_conjx, blasname, blisname ) \ +\ +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 \ + ) \ +{ \ + PASTEF772(ch,blasname,chc) \ + ( \ + rval, \ + n, \ + x, incx, \ + y, incy \ + ); \ +} + +INSERT_GENTFUNCDOTC_BLAS( dot, NULL ) + +#endif // -- "Black sheep" dot product function definitions --