1 /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
2 
3    Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6 
7         http://www.apache.org/licenses/LICENSE-2.0
8 
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14 
15  *
16  * Author: Qiming Sun <osirpt.sun@gmail.com>
17  *
18  * blas interface and blas-like functions
19  */
20 
21 #if defined __cplusplus
22 extern "C" {
23 #endif
24 #include <complex.h>
25 
26 double dasum_(const int *n, const double *dx, const int *incx);
27 void dscal_(const int *n, const double *da, double *dx, const int *incx);
28 void daxpy_(const int *n, const double *da, const double *dx,
29            const int *incx, double *dy, const int *incy);
30 double ddot_(const int *n, const double *dx, const int *incx,
31              const double *dy, const int *incy);
32 void dcopy_(const int *n, const double *dx, const int *incx,
33             const double *dy, const int *incy);
34 void dgemm_(const char*, const char*,
35             const int*, const int*, const int*,
36             const double*, const double*, const int*,
37             const double*, const int*,
38             const double*, double*, const int*);
39 void dgemv_(const char*, const int*, const int*,
40             const double*, const double*, const int*,
41             const double*, const int*,
42             const double*, double*, const int*);
43 void dger_(const int *m, const int *n,
44            const double *alpha, const double *x,
45            const int *incx, const double *y, const int *incy,
46            double *a, const int *lda);
47 void dsymm_(const char*, const char*, const int*, const int*,
48             const double*, const double*, const int*,
49             const double*, const int*,
50             const double*, double*, const int*);
51 
52 void dsyr_(const char *uplo, const int *n, const double *alpha,
53            const double *x, const int *incx, double *a, const int *lda);
54 void dsyr2_(const char *uplo, const int *n, const double *alpha,
55             const double *x, const int *incx, const double *y, const int *incy,
56             double *a, const int *lda);
57 void dsyr2k_(const char *uplo, const char *trans, const int *n, const int *k,
58              const double *alpha, const double *a, const int *lda,
59              const double *b, const int *ldb,
60              const double *beta, double *c, const int *ldc);
61 void dsyrk_(const char *uplo, const char *trans, const int *n, const int *k,
62             const double *alpha, const double *a, const int *lda,
63             const double *beta, double *c, const int *ldc);
64 
65 void zgerc_(const int *m, const int *n,
66             const double complex *alpha, const double complex *x, const int *incx,
67             const double complex *y, const int *incy,
68             double complex *a, const int *lda);
69 void zgemv_(const char*, const int*, const int*,
70             const double complex*, const double complex*, const int*,
71             const double complex*, const int*,
72             const double complex*, double complex*, const int*);
73 void zgemm_(const char*, const char*,
74             const int*, const int*, const int*,
75             const double complex*, const double complex*, const int*,
76             const double complex*, const int*,
77             const double complex*, double complex*, const int*);
78 
79 
80 void CINTdset0(const int n, double *x);
81 void CINTdaxpy2v(const int n, const double a,
82                  const double *x, const double *y, double *v);
83 void CINTdmat_transpose(double *a_t, const double *a,
84                         const int m, const int n);
85 void CINTzmat_transpose(double complex *a_t, const double complex *a,
86                         const int m, const int n);
87 void CINTzmat_dagger(double complex *a_c, const double complex *a,
88                      const int m, const int n);
89 
90 #if defined __cplusplus
91 } // end extern "C"
92 #endif
93