GEOSX
BlasLapackFunctions.h
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_LINEARALGEBRA_INTERFACES_BLASLAPACKFUNCTIONS_HPP_
20 #define GEOSX_LINEARALGEBRA_INTERFACES_BLASLAPACKFUNCTIONS_HPP_
21 
23 #ifdef FORTRAN_MANGLE_NO_UNDERSCORE
24 #define FORTRAN_MANGLE( name ) name
25 #else
26 #define FORTRAN_MANGLE( name ) name ## _
27 #endif
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 
33 #define GEOSX_dasum FORTRAN_MANGLE( dasum )
34 double GEOSX_dasum( int const * N,
35  double const * DX,
36  int const * INCX );
37 
38 #define GEOSX_daxpy FORTRAN_MANGLE( daxpy )
39 void GEOSX_daxpy( int const * N,
40  double const * DA,
41  double const * DX,
42  int const * INCX,
43  double * DY,
44  int const * INCY );
45 
46 #define GEOSX_dcopy FORTRAN_MANGLE( dcopy )
47 void GEOSX_dcopy( int const * N,
48  double const * DX,
49  int const * INCX,
50  double * DY,
51  int const * INCY );
52 
53 #define GEOSX_ddot FORTRAN_MANGLE( ddot )
54 double GEOSX_ddot( int const * N,
55  double const * DX,
56  int const * INCX,
57  double const * DY,
58  int const * INCY );
59 
60 #define GEOSX_idamax FORTRAN_MANGLE( idamax )
61 int GEOSX_idamax( int const * N,
62  double const * DX,
63  int const * INCX );
64 
65 #define GEOSX_dgemm FORTRAN_MANGLE( dgemm )
66 void GEOSX_dgemm( char const * TRANSA,
67  char const * TRANSB,
68  int const * M,
69  int const * N,
70  int const * K,
71  double const * ALPHA,
72  double const * A,
73  int const * LDA,
74  double const * B,
75  int const * LDB,
76  double const * BETA,
77  double * C,
78  int const * LDC );
79 
80 #define GEOSX_dgetrf FORTRAN_MANGLE( dgetrf )
81 void GEOSX_dgetrf( int const * M,
82  int const * N,
83  double * A,
84  int const * LDA,
85  int * IPIV,
86  int * INFO );
87 
88 #define GEOSX_dgetri FORTRAN_MANGLE( dgetri )
89 void GEOSX_dgetri( int const * N,
90  double * A,
91  int const * LDA,
92  int const * IPIV,
93  double * WORK,
94  int const * LWORK,
95  int * INFO );
96 
97 #define GEOSX_dlange FORTRAN_MANGLE( dlange )
98 double GEOSX_dlange( char const * NORM,
99  int const * M,
100  int const * N,
101  double const * A,
102  int const * LDA,
103  double * WORK );
104 
105 #define GEOSX_dlarnv FORTRAN_MANGLE( dlarnv )
106 void GEOSX_dlarnv( int const * IDIST,
107  int * ISEED,
108  int const * N,
109  double * X );
110 
111 #define GEOSX_dnrm2 FORTRAN_MANGLE( dnrm2 )
112 double GEOSX_dnrm2( int const * N,
113  double const * X,
114  int const * INCX );
115 
116 #define GEOSX_dscal FORTRAN_MANGLE( dscal )
117 void GEOSX_dscal( int const * N,
118  double const * DA,
119  double * DX,
120  int const * INCX );
121 
122 #define GEOSX_dgesvd FORTRAN_MANGLE( dgesvd )
123 void GEOSX_dgesvd( char const * JOBU,
124  char const * JOBVT,
125  int const * M,
126  int const * N,
127  double * A,
128  int const * LDA,
129  double * S,
130  double * U,
131  int const * LDU,
132  double * VT,
133  int const * LDVT,
134  double * WKOPT,
135  int const * LWORK,
136  int * INFO );
137 
138 #define GEOSX_dgeev FORTRAN_MANGLE( dgeev )
139 void GEOSX_dgeev( char const * JOBVL,
140  char const * JOBVR,
141  int const * N,
142  double * A,
143  int const * LDA,
144  double * WR,
145  double * WI,
146  double * VL,
147  int const * LDVL,
148  double * VR,
149  int const * LDVR,
150  double * WORK,
151  int * LWORK,
152  int * INFO );
153 
154 }
155 #endif
156 
157 #endif //GEOSX_LINEARALGEBRA_INTERFACES_BLASLAPACKFUNCTIONS_HPP_