@@ -69,17 +69,17 @@ float BlasConnector::dot( const int n, const float *X, const int incX, const flo
6969{
7070 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7171 return sdot_ (&n, X, &incX, Y, &incY);
72+ }
7273 return sdot_ (&n, X, &incX, Y, &incY);
7374}
74- }
7575
7676double BlasConnector::dot ( const int n, const double *X, const int incX, const double *Y, const int incY, base_device::AbacusDevice_t device_type)
7777{
7878 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7979 return ddot_ (&n, X, &incX, Y, &incY);
80+ }
8081 return ddot_ (&n, X, &incX, Y, &incY);
8182}
82- }
8383
8484// C = a * A.? * B.? + b * C
8585void BlasConnector::gemm (const char transa, const char transb, const int m, const int n, const int k,
@@ -93,7 +93,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
9393 }
9494 #ifdef __DSP
9595 else if (device_type == base_device::AbacusDevice_t::DspDevice){
96- sgemm_mth_ (&transb, &transa, &n, &m, &k,
96+ sgemm_mt_ (&transb, &transa, &n, &m, &k,
9797 &alpha, b, &ldb, a, &lda,
9898 &beta, c, &ldc, GlobalV::MY_RANK);
9999 }
@@ -111,7 +111,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
111111 }
112112 #ifdef __DSP
113113 else if (device_type == base_device::AbacusDevice_t::DspDevice){
114- dgemm_mth_ (&transb, &transa, &n, &m, &k,
114+ dgemm_mt_ (&transb, &transa, &n, &m, &k,
115115 &alpha, b, &ldb, a, &lda,
116116 &beta, c, &ldc, GlobalV::MY_RANK);
117117 }
@@ -129,7 +129,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
129129 }
130130 #ifdef __DSP
131131 else if (device_type == base_device::AbacusDevice_t::DspDevice) {
132- cgemm_mth_ (&transb, &transa, &n, &m, &k,
132+ cgemm_mt_ (&transb, &transa, &n, &m, &k,
133133 &alpha, b, &ldb, a, &lda,
134134 &beta, c, &ldc, GlobalV::MY_RANK);
135135 }
@@ -147,22 +147,13 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
147147 }
148148 #ifdef __DSP
149149 else if (device_type == base_device::AbacusDevice_t::DspDevice) {
150- zgemm_mth_ (&transb, &transa, &n, &m, &k,
150+ zgemm_mt_ (&transb, &transa, &n, &m, &k,
151151 &alpha, b, &ldb, a, &lda,
152152 &beta, c, &ldc, GlobalV::MY_RANK);
153153 }
154154 #endif
155155}
156156
157- void BlasConnector::gemv (const char trans, const int m, const int n,
158- const float alpha, const float * A, const int lda, const float * X, const int incx,
159- const float beta, float * Y, const int incy, base_device::AbacusDevice_t device_type)
160- {
161- if (device_type == base_device::AbacusDevice_t::CpuDevice) {
162- sgemv_ (&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy);
163- }
164- }
165-
166157void BlasConnector::gemv (const char trans, const int m, const int n,
167158 const double alpha, const double * A, const int lda, const double * X, const int incx,
168159 const double beta, double * Y, const int incy, base_device::AbacusDevice_t device_type)
@@ -196,39 +187,39 @@ float BlasConnector::nrm2( const int n, const float *X, const int incX, base_dev
196187{
197188 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
198189 return snrm2_ ( &n, X, &incX );
190+ }
199191 return snrm2_ ( &n, X, &incX );
200192}
201- }
202193
203194
204195double BlasConnector::nrm2 ( const int n, const double *X, const int incX, base_device::AbacusDevice_t device_type )
205196{
206197 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
207198 return dnrm2_ ( &n, X, &incX );
199+ }
208200 return dnrm2_ ( &n, X, &incX );
209201}
210- }
211202
212203
213204double BlasConnector::nrm2 ( const int n, const std::complex <double > *X, const int incX, base_device::AbacusDevice_t device_type )
214205{
215206 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
216207 return dznrm2_ ( &n, X, &incX );
208+ }
217209 return dznrm2_ ( &n, X, &incX );
218210}
219- }
220211
221212// copies a into b
222213void BlasConnector::copy (const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type)
223214{
224215 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
225216 dcopy_ (&n, a, &incx, b, &incy);
226- }
217+ }
227218}
228219
229220void BlasConnector::copy (const long n, const std::complex <double > *a, const int incx, std::complex <double > *b, const int incy, base_device::AbacusDevice_t device_type)
230221{
231222 if (device_type == base_device::AbacusDevice_t::CpuDevice) {
232223 zcopy_ (&n, a, &incx, b, &incy);
233- }
224+ }
234225}
0 commit comments