ソースを参照

BLAS: A and B must be of type "const TYPE *" in SGEMM.

Thanks to Ludovic Stordeur for reporting this issue :)
Cyril Roelandt 13 年 前
コミット
d20369d76e
共有2 個のファイルを変更した4 個の追加4 個の削除を含む
  1. 2 2
      examples/common/blas.c
  2. 2 2
      examples/common/blas.h

+ 2 - 2
examples/common/blas.c

@@ -30,7 +30,7 @@
 #ifdef STARPU_ATLAS
 
 inline void SGEMM(char *transa, char *transb, int M, int N, int K, 
-			float alpha, float *A, int lda, float *B, int ldb, 
+			float alpha, const float *A, int lda, const float *B, int ldb, 
 			float beta, float *C, int ldc)
 {
 	enum CBLAS_TRANSPOSE ta = (toupper(transa[0]) == 'N')?CblasNoTrans:CblasTrans;
@@ -241,7 +241,7 @@ void DSWAP(const int n, double *x, const int incx, double *y, const int incy)
 #elif defined(STARPU_GOTO) || defined(STARPU_SYSTEM_BLAS) || defined(STARPU_MKL)
 
 inline void SGEMM(char *transa, char *transb, int M, int N, int K, 
-			float alpha, float *A, int lda, float *B, int ldb, 
+			float alpha, const float *A, int lda, const float *B, int ldb, 
 			float beta, float *C, int ldc)
 {
 	sgemm_(transa, transb, &M, &N, &K, &alpha,

+ 2 - 2
examples/common/blas.h

@@ -24,8 +24,8 @@
 #include <cblas.h>
 #endif
 
-void SGEMM(char *transa, char *transb, int M, int N, int K, float alpha, float *A, int lda, 
-		float *B, int ldb, float beta, float *C, int ldc);
+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);
 void DGEMM(char *transa, char *transb, int M, int N, int K, double alpha, double *A, int lda, 
 		double *B, int ldb, double beta, double *C, int ldc);
 void SGEMV(char *transa, int M, int N, float alpha, float *A, int lda,