@@ -65,7 +65,7 @@ extern "C"
6565 void cgemv_ (const char *trans, const int *m, const int *n, const std::complex <float > *alpha,
6666 const std::complex <float > *a, const int *lda, const std::complex <float > *x, const int *incx,
6767 const std::complex <float > *beta, std::complex <float > *y, const int *incy);
68-
68+
6969 void zgemv_ (const char *trans, const int *m, const int *n, const std::complex <double > *alpha,
7070 const std::complex <double > *a, const int *lda, const std::complex <double > *x, const int *incx,
7171 const std::complex <double > *beta, std::complex <double > *y, const int *incy);
@@ -180,11 +180,36 @@ class BlasConnector
180180 // Peize Lin add 2017-10-27
181181 // d=x*y
182182 static
183- float dot ( const int n, const float *X, const int incX, const float *Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
183+ float dot ( const int n, const float *const X, const int incX, const float *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
184+
185+ static
186+ double dot ( const int n, const double *const X, const int incX, const double *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
187+
188+ // d=x*y
189+ static
190+ float dotu ( const int n, const float *const X, const int incX, const float *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
191+
192+ static
193+ double dotu ( const int n, const double *const X, const int incX, const double *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
194+
195+ static
196+ std::complex <float > dotu ( const int n, const std::complex <float >*const X, const int incX, const std::complex <float >*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
197+
198+ static
199+ std::complex <double > dotu ( const int n, const std::complex <double >*const X, const int incX, const std::complex <double >*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
200+
201+ // d=x.conj()*y
202+ static
203+ float dotc ( const int n, const float *const X, const int incX, const float *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
204+
205+ static
206+ double dotc ( const int n, const double *const X, const int incX, const double *const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
184207
185208 static
186- double dot ( const int n, const double * X, const int incX, const double * Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
209+ std:: complex < float > dotc ( const int n, const std:: complex < float >* const X, const int incX, const std:: complex < float >* const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
187210
211+ static
212+ std::complex <double > dotc ( const int n, const std::complex <double >*const X, const int incX, const std::complex <double >*const Y, const int incY, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
188213
189214 // Peize Lin add 2017-10-27, fix bug trans 2019-01-17
190215 // C = a * A.? * B.? + b * C
@@ -231,6 +256,9 @@ class BlasConnector
231256 const std::complex <double > alpha, const std::complex <double > *a, const int lda, const std::complex <double > *b, const int ldb,
232257 const std::complex <double > beta, std::complex <double > *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
233258
259+ // side=='L': C = a * A * B + b * C.
260+ // side=='R': C = a * B * A + b * C.
261+ // A == A^T
234262 // Because you cannot pack symm or hemm into a row-major kernel by exchanging parameters, so only col-major functions are provided.
235263 static
236264 void symm_cm (const char side, const char uplo, const int m, const int n,
@@ -252,6 +280,19 @@ class BlasConnector
252280 const std::complex <double > alpha, const std::complex <double > *a, const int lda, const std::complex <double > *b, const int ldb,
253281 const std::complex <double > beta, std::complex <double > *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
254282
283+ // side=='L': C = a * A * B + b * C.
284+ // side=='R': C = a * B * A + b * C.
285+ // A == A^H
286+ static
287+ void hemm_cm (const char side, const char uplo, const int m, const int n,
288+ const float alpha, const float *a, const int lda, const float *b, const int ldb,
289+ const float beta, float *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
290+
291+ static
292+ void hemm_cm (const char side, const char uplo, const int m, const int n,
293+ const double alpha, const double *a, const int lda, const double *b, const int ldb,
294+ const double beta, double *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
295+
255296 static
256297 void hemm_cm (char side, char uplo, int m, int n,
257298 std::complex <float > alpha, std::complex <float > *a, int lda, std::complex <float > *b, int ldb,
@@ -263,7 +304,6 @@ class BlasConnector
263304 std::complex <double > beta, std::complex <double > *c, int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
264305
265306 // y = A*x + beta*y
266-
267307 static
268308 void gemv (const char trans, const int m, const int n,
269309 const float alpha, const float * A, const int lda, const float * X, const int incx,
@@ -283,7 +323,6 @@ class BlasConnector
283323 void gemv (const char trans, const int m, const int n,
284324 const std::complex <double > alpha, const std::complex <double > *A, const int lda, const std::complex <double > *X, const int incx,
285325 const std::complex <double > beta, std::complex <double > *Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
286-
287326
288327 // Peize Lin add 2018-06-12
289328 // out = ||x||_2
0 commit comments