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