SuperLU_DIST  4.0
superlu_dist on CPU and GPU clusters
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Cnames.h
Go to the documentation of this file.
1 /*
2  * -- Distributed SuperLU routine (version 1.0) --
3  * Lawrence Berkeley National Lab, Univ. of California Berkeley.
4  * September 1, 1999
5  *
6  */
7 
8 #ifndef __SUPERLU_CNAMES /* allow multiple inclusions */
9 #define __SUPERLU_CNAMES
10 
11 /*
12  * These macros define how C routines will be called. ADD_ assumes that
13  * they will be called by fortran, which expects C routines to have an
14  * underscore postfixed to the name (Suns, and the Intel expect this).
15  * NOCHANGE indicates that fortran will be calling, and that it expects
16  * the name called by fortran to be identical to that compiled by the C
17  * (RS6K's do this). UPCASE says it expects C routines called by fortran
18  * to be in all upcase (CRAY wants this).
19  */
20 
21 #define ADD_ 0
22 #define NOCHANGE 1
23 #define UPCASE 2
24 #define C_CALL 3
25 
26 #ifdef UpCase
27 #define F77_CALL_C UPCASE
28 #endif
29 
30 #ifdef NoChange
31 #define F77_CALL_C NOCHANGE
32 #endif
33 
34 #ifdef Add_
35 #define F77_CALL_C ADD_
36 #endif
37 
38 #ifndef F77_CALL_C
39 #define F77_CALL_C ADD_
40 #endif
41 
42 #if (F77_CALL_C == ADD_)
43 /*
44  * These defines set up the naming scheme required to have a fortran 77
45  * routine call a C routine
46  * No redefinition necessary to have following Fortran to C interface:
47  * FORTRAN CALL C DECLARATION
48  * call dgemm(...) void dgemm_(...)
49  *
50  * This is the default.
51  */
52 /* These are the functions defined in F90 wraper */
53 #define f_create_gridinfo_handle f_create_gridinfo_handle_
54 #define f_create_options_handle f_create_options_handle_
55 #define f_create_ScalePerm_handle f_create_scaleperm_handle_
56 #define f_create_LUstruct_handle f_create_lustruct_handle_
57 #define f_create_SOLVEstruct_handle f_create_solvestruct_handle_
58 #define f_create_SuperMatrix_handle f_create_supermatrix_handle_
59 #define f_destroy_gridinfo_handle f_destroy_gridinfo_handle_
60 #define f_destroy_options_handle f_destroy_options_handle_
61 #define f_destroy_ScalePerm_handle f_destroy_scaleperm_handle_
62 #define f_destroy_LUstruct_handle f_destroy_lustruct_handle_
63 #define f_destroy_SOLVEstruct_handle f_destroy_solvestruct_handle_
64 #define f_destroy_SuperMatrix_handle f_destroy_supermatrix_handle_
65 #define f_create_SuperLUStat_handle f_create_superlustat_handle_
66 #define f_destroy_SuperLUStat_handle f_destroy_superlustat_handle_
67 #define f_get_gridinfo f_get_gridinfo_
68 #define f_get_SuperMatrix f_get_supermatrix_
69 #define f_set_SuperMatrix f_set_supermatrix_
70 #define f_get_CompRowLoc_Matrix f_get_comprowloc_matrix_
71 #define f_set_CompRowLoc_Matrix f_set_comprowloc_matrix_
72 #define f_get_superlu_options f_get_superlu_options_
73 #define f_set_superlu_options f_set_superlu_options_
74 #define f_set_default_options f_set_default_options_
75 #define f_superlu_gridinit f_superlu_gridinit_
76 #define f_superlu_gridexit f_superlu_gridexit_
77 #define f_ScalePermstructInit f_scalepermstructinit_
78 #define f_ScalePermstructFree f_scalepermstructfree_
79 #define f_PStatInit f_pstatinit_
80 #define f_PStatFree f_pstatfree_
81 #define f_LUstructInit f_lustructinit_
82 #define f_LUstructFree f_lustructfree_
83 #define f_Destroy_LU f_destroy_lu_
84 #define f_dCreate_CompRowLoc_Mat_dist f_dcreate_comprowloc_mat_dist_
85 #define f_Destroy_CompRowLoc_Mat_dist f_destroy_comprowloc_mat_dist_
86 #define f_Destroy_SuperMat_Store_dist f_destroy_supermat_store_dist_
87 #define f_dSolveFinalize f_dsolvefinalize_
88 #define f_pdgssvx f_pdgssvx_
89 #define f_dcreate_dist_matrix f_dcreate_dist_matrix_
90 #define f_check_malloc f_check_malloc_
91 #endif
92 
93 #if (F77_CALL_C == UPCASE)
94 /*
95  * These defines set up the naming scheme required to have a fortran 77
96  * routine call a C routine
97  * following Fortran to C interface:
98  * FORTRAN CALL C DECLARATION
99  * call dgemm(...) void DGEMM(...)
100  */
101 /* BLAS */
102 #define sasum_ SASUM
103 #define isamax_ ISAMAX
104 #define scopy_ SCOPY
105 #define sscal_ SSCAL
106 #define sger_ SGER
107 #define snrm2_ SNRM2
108 #define ssymv_ SSYMV
109 #define sdot_ SDOT
110 #define saxpy_ SAXPY
111 #define ssyr2_ SSYR2
112 #define srot_ SROT
113 #define sgemv_ SGEMV
114 #define strsv_ STRSV
115 #define sgemm_ SGEMM
116 #define strsm_ STRSM
117 
118 #define dasum_ DASUM
119 #define idamax_ IDAMAX
120 #define dcopy_ DCOPY
121 #define dscal_ DSCAL
122 #define dger_ DGER
123 #define dnrm2_ DNRM2
124 #define dsymv_ DSYMV
125 #define ddot_ DDOT
126 #define daxpy_ DAXPY
127 #define dsyr2_ DSYR2
128 #define drot_ DROT
129 #define dgemv_ DGEMV
130 #define dtrsv_ DTRSV
131 #define dgemm_ DGEMM
132 #define dtrsm_ DTRSM
133 
134 #define scasum_ SCASUM
135 #define icamax_ ICAMAX
136 #define ccopy_ CCOPY
137 #define cscal_ CSCAL
138 #define scnrm2_ SCNRM2
139 #define caxpy_ CAXPY
140 #define cgemv_ CGEMV
141 #define ctrsv_ CTRSV
142 #define cgemm_ CGEMM
143 #define ctrsm_ CTRSM
144 #define cgerc_ CGERC
145 #define chemv_ CHEMV
146 #define cher2_ CHER2
147 
148 #define dzasum_ DZASUM
149 #define izamax_ IZAMAX
150 #define zcopy_ ZCOPY
151 #define zscal_ ZSCAL
152 #define dznrm2_ DZNRM2
153 #define zaxpy_ ZAXPY
154 #define zgemv_ ZGEMV
155 #define ztrsv_ ZTRSV
156 #define zgemm_ ZGEMM
157 #define ztrsm_ ZTRSM
158 #define zgerc_ ZGERC
159 #define zhemv_ ZHEMV
160 #define zher2_ ZHER2
161 #define zgeru_ ZGERU
162 
163 /* LAPACK */
164 #define dlamch_ DLAMCH
165 #define slamch_ SLAMCH
166 #define xerbla_ XERBLA
167 #define lsame_ LSAME
168 
169 #define mc64id_ MC64ID
170 #define mc64ad_ MC64AD
171 #define c_bridge_dgssv_ C_BRIDGE_DGSSV
172 #define c_fortran_slugrid_ C_FORTRAN_SLUGRID
173 #define c_fortran_pdgssvx_ C_FORTRAN_PDGSSVX
174 #define c_fortran_pdgssvx_ABglobal_ C_FORTRAN_PDGSSVX_ABGLOBAL
175 #define c_fortran_pzgssvx_ C_FORTRAN_PZGSSVX
176 #define c_fortran_pzgssvx_ABglobal_ C_FORTRAN_PZGSSVX_ABGLOBAL
177 
178 /* These are the functions defined in F90 wraper */
179 #define f_create_gridinfo_handle F_CREATE_GRIDINFO_HANDLE
180 #define f_create_options_handle F_CREATE_OPTIONS_HANDLE
181 #define f_create_ScalePerm_handle F_CREATE_SCALEPERM_HANDLE
182 #define f_create_LUstruct_handle F_CREATE_LUSTRUCT_HANDLE
183 #define f_create_SOLVEstruct_handle F_CREATE_SOLVESTRUCT_HANDLE
184 #define f_create_SuperMatrix_handle F_CREATE_SUPERMATRIX_HANDLE
185 #define f_destroy_gridinfo_handle F_DESTROY_GRIDINFO_HANDLE
186 #define f_destroy_options_handle F_DESTROY_OPTIONS_HANDLE
187 #define f_destroy_ScalePerm_handle F_DESTROY_SCALEPERM_HANDLE
188 #define f_destroy_LUstruct_handle F_DESTROY_LUSTRUCT_HANDLE
189 #define f_destroy_SOLVEstruct_handle F_DESTROY_SOLVESTRUCT_HANDLE
190 #define f_destroy_SuperMatrix_handle F_DESTROY_SUPERMATRIX_HANDLE
191 #define f_create_SuperLUStat_handle F_CREATE_SUPERLUSTAT_HANDLE
192 #define f_destroy_SuperLUStat_handle F_DESTROY_SUPERLUSTAT_HANDLE
193 #define f_get_gridinfo F_GET_GRIDINFO
194 #define f_get_SuperMatrix F_GET_SUPERMATRIX
195 #define f_set_SuperMatrix F_SET_SUPERMATRIX
196 #define f_get_CompRowLoc_Matrix F_GET_COMPROWLOC_MATRIX
197 #define f_set_CompRowLoc_Matrix F_SET_COMPROWLOC_MATRIX
198 #define f_get_superlu_options F_GET_SUPERLU_OPTIONS
199 #define f_set_superlu_options F_SET_SUPERLU_OPTIONS
200 #define f_set_default_options F_SET_DEFAULT_OPTIONS
201 #define f_superlu_gridinit F_SUPERLU_GRIDINIT
202 #define f_superlu_gridexit F_SUPERLU_GRIDEXIT
203 #define f_ScalePermstructInit F_SCALEPERMSTRUCTINIT
204 #define f_ScalePermstructFree F_SCALEPERMSTRUCTFREE
205 #define f_PStatInit F_PSTATINIT
206 #define f_PStatFree F_PSTATFREE
207 #define f_LUstructInit F_LUSTRUCTINIT
208 #define f_LUstructFree F_LUSTRUCTFREE
209 #define f_Destroy_LU F_DESTROY_LU
210 #define f_dCreate_CompRowLoc_Mat_dist F_DCREATE_COMPROWLOC_MAT_DIST
211 #define f_Destroy_CompRowLoc_Mat_dist F_DESTROY_COMPROWLOC_MAT_DIST
212 #define f_Destroy_SuperMat_Store_dist F_DESTROY_SUPERMAT_STORE_DIST
213 #define f_dSolveFinalize F_DSOLVEFINALIZE
214 #define f_pdgssvx F_PDGSSVX
215 #define f_dcreate_dist_matrix F_DCREATE_DIST_MATRIX
216 #define f_check_malloc F_CHECK_MALLOC
217 #endif
218 
219 #if (F77_CALL_C == NOCHANGE)
220 /*
221  * These defines set up the naming scheme required to have a fortran 77
222  * routine call a C routine
223  * for following Fortran to C interface:
224  * FORTRAN CALL C DECLARATION
225  * call dgemm(...) void dgemm(...)
226  */
227 /* BLAS */
228 #define sasum_ sasum
229 #define isamax_ isamax
230 #define scopy_ scopy
231 #define sscal_ sscal
232 #define sger_ sger
233 #define snrm2_ snrm2
234 #define ssymv_ ssymv
235 #define sdot_ sdot
236 #define saxpy_ saxpy
237 #define ssyr2_ ssyr2
238 #define srot_ srot
239 #define sgemv_ sgemv
240 #define strsv_ strsv
241 #define sgemm_ sgemm
242 #define strsm_ strsm
243 
244 #define dasum_ dasum
245 #define idamax_ idamax
246 #define dcopy_ dcopy
247 #define dscal_ dscal
248 #define dger_ dger
249 #define dnrm2_ dnrm2
250 #define dsymv_ dsymv
251 #define ddot_ ddot
252 #define daxpy_ daxpy
253 #define dsyr2_ dsyr2
254 #define drot_ drot
255 #define dgemv_ dgemv
256 #define dtrsv_ dtrsv
257 #define dgemm_ dgemm
258 #define dtrsm_ dtrsm
259 
260 #define scasum_ scasum
261 #define icamax_ icamax
262 #define ccopy_ ccopy
263 #define cscal_ cscal
264 #define scnrm2_ scnrm2
265 #define caxpy_ caxpy
266 #define cgemv_ cgemv
267 #define ctrsv_ ctrsv
268 #define cgemm_ cgemm
269 #define ctrsm_ ctrsm
270 #define cgerc_ cgerc
271 #define chemv_ chemv
272 #define cher2_ cher2
273 
274 #define dzasum_ dzasum
275 #define izamax_ izamax
276 #define zcopy_ zcopy
277 #define zscal_ zscal
278 #define dznrm2_ dznrm2
279 #define zaxpy_ zaxpy
280 #define zgemv_ zgemv
281 #define ztrsv_ ztrsv
282 #define zgemm_ zgemm
283 #define ztrsm_ ztrsm
284 #define zgerc_ zgerc
285 #define zhemv_ zhemv
286 #define zher2_ zher2
287 #define zgeru_ zgeru
288 
289 /* LAPACK */
290 #define dlamch_ dlamch
291 #define slamch_ slamch
292 #define xerbla_ xerbla
293 #define lsame_ lsame
294 
295 #define mc64id_ mc64id
296 #define mc64ad_ mc64ad
297 
298 #define c_bridge_dgssv_ c_bridge_dgssv
299 #define c_fortran_slugrid_ c_fortran_slugrid
300 #define c_fortran_pdgssvx_ c_fortran_pdgssvx
301 #define c_fortran_pdgssvx_ABglobal_ c_fortran_pdgssvx_abglobal
302 #define c_fortran_pzgssvx_ c_fortran_pzgssvx
303 #define c_fortran_pzgssvx_ABglobal_ c_fortran_pzgssvx_abglobal
304 
305 /* These are the functions defined in F90 wraper */
306 #define f_create_gridinfo_handle f_create_gridinfo_handle
307 #define f_create_options_handle f_create_options_handle
308 #define f_create_ScalePerm_handle f_create_scaleperm_handle
309 #define f_create_LUstruct_handle f_create_lustruct_handle
310 #define f_create_SOLVEstruct_handle f_create_solvestruct_handle
311 #define f_create_SuperMatrix_handle f_create_supermatrix_handle
312 #define f_destroy_gridinfo_handle f_destroy_gridinfo_handle
313 #define f_destroy_options_handle f_destroy_options_handle
314 #define f_destroy_ScalePerm_handle f_destroy_scaleperm_handle
315 #define f_destroy_LUstruct_handle f_destroy_lustruct_handle
316 #define f_destroy_SOLVEstruct_handle f_destroy_solvestruct_handle
317 #define f_destroy_SuperMatrix_handle f_destroy_supermatrix_handle
318 #define f_create_SuperLUStat_handle f_create_superlustat_handle
319 #define f_destroy_SuperLUStat_handle f_destroy_superlustat_handle
320 #define f_get_gridinfo f_get_gridinfo
321 #define f_get_SuperMatrix f_get_supermatrix
322 #define f_set_SuperMatrix f_set_supermatrix
323 #define f_get_CompRowLoc_Matrix f_get_comprowloc_matrix
324 #define f_set_CompRowLoc_Matrix f_set_comprowloc_matrix
325 #define f_get_superlu_options f_get_superlu_options
326 #define f_set_superlu_options f_set_superlu_options
327 #define f_set_default_options f_set_default_options
328 #define f_superlu_gridinit f_superlu_gridinit
329 #define f_superlu_gridexit f_superlu_gridexit
330 #define f_ScalePermstructInit f_scalepermstructinit
331 #define f_ScalePermstructFree f_scalepermstructfree
332 #define f_PStatInit f_pstatinit
333 #define f_PStatFree f_pstatfree
334 #define f_LUstructInit f_lustructinit
335 #define f_LUstructFree f_lustructfree
336 #define f_Destroy_LU f_destroy_lu
337 #define f_dCreate_CompRowLoc_Mat_dist f_dcreate_comprowloc_mat_dist
338 #define f_Destroy_CompRowLoc_Mat_dist f_destroy_comprowloc_mat_dist
339 #define f_Destroy_SuperMat_Store_dist f_destroy_supermat_store_dist
340 #define f_dSolveFinalize f_dsolvefinalize
341 #define f_pdgssvx f_pdgssvx
342 #define f_dcreate_dist_matrix f_dcreate_dist_matrix
343 #define f_check_malloc f_check_malloc
344 #endif
345 
346 #endif /* __SUPERLU_CNAMES */