66// Provide definition for cblas functions
77// Based on Netlib implementation
88
9- // NB:
10- // Blas is declared as using 64-bit integers.
11- // The library that gets actually linked may use 32- or 64-bit integers,
12- // depending on the integer model.
13-
149enum CBLAS_ORDER { CblasRowMajor = 101 , CblasColMajor = 102 };
1510enum CBLAS_TRANSPOSE {
1611 CblasNoTrans = 111 ,
@@ -25,61 +20,63 @@ enum CBLAS_SIDE { CblasLeft = 141, CblasRight = 142 };
2520extern "C" {
2621#endif
2722
23+ typedef int32_t blasint ;
24+
2825// level 1
2926
30- void cblas_daxpy (const hipo :: Int64 n , const double alpha , const double * x ,
31- const hipo :: Int64 incx , double * y , const hipo :: Int64 incy );
32- void cblas_dcopy (const hipo :: Int64 n , const double * x , const hipo :: Int64 incx ,
33- double * y , const hipo :: Int64 incy );
34- void cblas_dscal (const hipo :: Int64 n , const double alpha , double * x ,
35- const hipo :: Int64 incx );
36- void cblas_dswap (const hipo :: Int64 n , double * x , const hipo :: Int64 incx ,
37- double * y , const hipo :: Int64 incy );
27+ void cblas_daxpy (const blasint n , const double alpha , const double * x ,
28+ const blasint incx , double * y , const blasint incy );
29+ void cblas_dcopy (const blasint n , const double * x , const blasint incx ,
30+ double * y , const blasint incy );
31+ void cblas_dscal (const blasint n , const double alpha , double * x ,
32+ const blasint incx );
33+ void cblas_dswap (const blasint n , double * x , const blasint incx , double * y ,
34+ const blasint incy );
3835
3936// level 2
4037
4138void cblas_dgemv (const enum CBLAS_ORDER order ,
42- const enum CBLAS_TRANSPOSE transa , const hipo :: Int64 M ,
43- const hipo :: Int64 n , const double alpha , const double * A ,
44- const hipo :: Int64 lda , const double * x , const hipo :: Int64 incx ,
45- const double beta , double * y , const hipo :: Int64 incy );
39+ const enum CBLAS_TRANSPOSE transa , const blasint M ,
40+ const blasint n , const double alpha , const double * A ,
41+ const blasint lda , const double * x , const blasint incx ,
42+ const double beta , double * y , const blasint incy );
4643
4744void cblas_dtpsv (const enum CBLAS_ORDER order , const enum CBLAS_UPLO uplo ,
4845 const enum CBLAS_TRANSPOSE transa , const enum CBLAS_DIAG diag ,
49- const hipo :: Int64 n , const double * ap , double * x ,
50- const hipo :: Int64 incx );
46+ const blasint n , const double * ap , double * x ,
47+ const blasint incx );
5148
5249void cblas_dtrsv (const enum CBLAS_ORDER order , const enum CBLAS_UPLO uplo ,
5350 const enum CBLAS_TRANSPOSE transa , const enum CBLAS_DIAG diag ,
54- const hipo :: Int64 n , const double * a , const hipo :: Int64 lda ,
55- double * x , const hipo :: Int64 incx );
51+ const blasint n , const double * a , const blasint lda , double * x ,
52+ const blasint incx );
5653
57- void cblas_dger (const enum CBLAS_ORDER order , const hipo :: Int64 m ,
58- const hipo :: Int64 n , const double alpha , const double * x ,
59- const hipo :: Int64 incx , const double * y , const hipo :: Int64 incy ,
60- double * A , const hipo :: Int64 lda );
54+ void cblas_dger (const enum CBLAS_ORDER order , const blasint m , const blasint n ,
55+ const double alpha , const double * x , const blasint incx ,
56+ const double * y , const blasint incy , double * A ,
57+ const blasint lda );
6158
6259// level 3
6360
6461void cblas_dgemm (const enum CBLAS_ORDER order ,
6562 const enum CBLAS_TRANSPOSE transa ,
66- const enum CBLAS_TRANSPOSE transb , const hipo :: Int64 m ,
67- const hipo :: Int64 n , const hipo :: Int64 k , const double alpha ,
68- const double * A , const hipo :: Int64 lda , const double * B ,
69- const hipo :: Int64 ldb , const double beta , double * C ,
70- const hipo :: Int64 ldc );
63+ const enum CBLAS_TRANSPOSE transb , const blasint m ,
64+ const blasint n , const blasint k , const double alpha ,
65+ const double * A , const blasint lda , const double * B ,
66+ const blasint ldb , const double beta , double * C ,
67+ const blasint ldc );
7168
7269void cblas_dsyrk (const enum CBLAS_ORDER order , const enum CBLAS_UPLO uplo ,
73- const enum CBLAS_TRANSPOSE trans , const hipo :: Int64 n ,
74- const hipo :: Int64 k , const double alpha , const double * a ,
75- const hipo :: Int64 lda , const double beta , double * C ,
76- const hipo :: Int64 ldc );
70+ const enum CBLAS_TRANSPOSE trans , const blasint n ,
71+ const blasint k , const double alpha , const double * a ,
72+ const blasint lda , const double beta , double * C ,
73+ const blasint ldc );
7774
7875void cblas_dtrsm (const enum CBLAS_ORDER order , const enum CBLAS_SIDE side ,
7976 const enum CBLAS_UPLO uplo , const enum CBLAS_TRANSPOSE transa ,
80- const enum CBLAS_DIAG diag , const hipo :: Int64 m ,
81- const hipo :: Int64 n , const double alpha , const double * a ,
82- const hipo :: Int64 lda , double * b , const hipo :: Int64 ldb );
77+ const enum CBLAS_DIAG diag , const blasint m , const blasint n ,
78+ const double alpha , const double * a , const blasint lda ,
79+ double * b , const blasint ldb );
8380
8481#ifdef __cplusplus
8582}
0 commit comments