@@ -65,7 +65,7 @@ extern "C"
65
65
void cgemv_ (const char *trans, const int *m, const int *n, const std::complex<float > *alpha,
66
66
const std::complex<float > *a, const int *lda, const std::complex<float > *x, const int *incx,
67
67
const std::complex<float > *beta, std::complex<float > *y, const int *incy);
68
-
68
+
69
69
void zgemv_ (const char *trans, const int *m, const int *n, const std::complex<double > *alpha,
70
70
const std::complex<double > *a, const int *lda, const std::complex<double > *x, const int *incx,
71
71
const std::complex<double > *beta, std::complex<double > *y, const int *incy);
@@ -180,11 +180,36 @@ class BlasConnector
180
180
// Peize Lin add 2017-10-27
181
181
// d=x*y
182
182
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);
184
207
185
208
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);
187
210
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);
188
213
189
214
// Peize Lin add 2017-10-27, fix bug trans 2019-01-17
190
215
// C = a * A.? * B.? + b * C
@@ -231,6 +256,9 @@ class BlasConnector
231
256
const std::complex<double > alpha, const std::complex<double > *a, const int lda, const std::complex<double > *b, const int ldb,
232
257
const std::complex<double > beta, std::complex<double > *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
233
258
259
+ // side=='L': C = a * A * B + b * C.
260
+ // side=='R': C = a * B * A + b * C.
261
+ // A == A^T
234
262
// Because you cannot pack symm or hemm into a row-major kernel by exchanging parameters, so only col-major functions are provided.
235
263
static
236
264
void symm_cm (const char side, const char uplo, const int m, const int n,
@@ -252,6 +280,19 @@ class BlasConnector
252
280
const std::complex<double > alpha, const std::complex<double > *a, const int lda, const std::complex<double > *b, const int ldb,
253
281
const std::complex<double > beta, std::complex<double > *c, const int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
254
282
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
+
255
296
static
256
297
void hemm_cm (char side, char uplo, int m, int n,
257
298
std::complex<float > alpha, std::complex<float > *a, int lda, std::complex<float > *b, int ldb,
@@ -263,7 +304,6 @@ class BlasConnector
263
304
std::complex<double > beta, std::complex<double > *c, int ldc, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
264
305
265
306
// y = A*x + beta*y
266
-
267
307
static
268
308
void gemv (const char trans, const int m, const int n,
269
309
const float alpha, const float * A, const int lda, const float * X, const int incx,
@@ -283,7 +323,6 @@ class BlasConnector
283
323
void gemv (const char trans, const int m, const int n,
284
324
const std::complex<double > alpha, const std::complex<double > *A, const int lda, const std::complex<double > *X, const int incx,
285
325
const std::complex<double > beta, std::complex<double > *Y, const int incy, base_device::AbacusDevice_t device_type = base_device::AbacusDevice_t::CpuDevice);
286
-
287
326
288
327
// Peize Lin add 2018-06-12
289
328
// out = ||x||_2
0 commit comments