From 9994f6aa5fc2e3677b14c3d12671ba46ce5a58b5 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Fri, 27 Sep 2024 13:38:29 -0400 Subject: [PATCH 1/2] Add declarations for ssyrk_ and dsyrk_ when cblas is not available --- fflas-ffpack/config-blas.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fflas-ffpack/config-blas.h b/fflas-ffpack/config-blas.h index 2abc0336..849159ef 100644 --- a/fflas-ffpack/config-blas.h +++ b/fflas-ffpack/config-blas.h @@ -128,6 +128,8 @@ extern "C" { void strmm_ (const char*, const char*, const char*, const char*, const int*, const int*, const float*, const float*, const int*, float*, const int*); void sgemm_ (const char*, const char*, const int*, const int*, const int*, const float*, const float*, const int*, const float*, const int*, const float*, float*, const int*); void dgemm_ (const char*, const char*, const int*, const int*, const int*, const double*, const double*, const int*, const double*, const int*, const double*, double*, const int*); + void ssyrk_ (const char*, const char*, const int*, const int*, const float*, const float*, const int*, const float*, float*, const int*); + void dsyrk_ (const char*, const char*, const int*, const int*, const double*, const double*, const int*, const double*, double*, const int*); } // define C wrappers @@ -293,18 +295,18 @@ extern "C" { const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc){ if (Order == CblasRowMajor) - ssyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this + ssyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), &N, &K, &alpha, A, &lda, &beta, C, &ldc); // @TODO check this else - ssyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); + ssyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), &N, &K, &alpha, A, &lda, &beta, C, &ldc); } void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc){ if (Order == CblasRowMajor) - dsyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this + dsyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), &N, &K, &alpha, A, &lda, &beta, C, &ldc); // @TODO check this else - dsyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); + dsyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), &N, &K, &alpha, A, &lda, &beta, C, &ldc); } } From b559549fb3f4abfa69ca7e5da337544ab02c44a1 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Fri, 27 Sep 2024 16:33:16 -0400 Subject: [PATCH 2/2] Add missing "static inline" to cblas_dsyrk wrapper --- fflas-ffpack/config-blas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fflas-ffpack/config-blas.h b/fflas-ffpack/config-blas.h index 849159ef..33461031 100644 --- a/fflas-ffpack/config-blas.h +++ b/fflas-ffpack/config-blas.h @@ -299,7 +299,7 @@ extern "C" { else ssyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), &N, &K, &alpha, A, &lda, &beta, C, &ldc); } - void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, + static inline void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc){