Skip to content

Commit 84be313

Browse files
Fix ODR violation due to const-mismatch between std gemm implementation and extern-c declaration.
1 parent 3eea1f1 commit 84be313

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernels/optimized/blas/CPUBlas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <Accelerate/Accelerate.h>
1616
#else
1717
// clang-format off
18-
extern "C" void dgemm_(char *transa, char *transb, int *m, int *n, int *k, double *alpha, const double *a, int *lda, const double *b, int *ldb, double *beta, double *c, int *ldc);
19-
extern "C" void sgemm_(char *transa, char *transb, int *m, int *n, int *k, float *alpha, const float *a, int *lda, const float *b, int *ldb, float *beta, float *c, int *ldc);
18+
extern "C" void dgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc);
19+
extern "C" void sgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, const float *alpha, const float *a,const int *lda, const float *b,const int *ldb, const float *beta, float *c, const int *ldc);
2020
// clang-format on
2121
#endif // ET_BUILD_FOR_APPLE
2222
#endif // ET_BUILD_WITH_BLAS

0 commit comments

Comments
 (0)