1 /*
2  *
3  *  This file is part of MUMPS 5.1.2, released
4  *  on Mon Oct  2 07:37:01 UTC 2017
5  *
6  *
7  *  Copyright 1991-2017 CERFACS, CNRS, ENS Lyon, INP Toulouse, Inria,
8  *  University of Bordeaux.
9  *
10  *  This version of MUMPS is provided to you free of charge. It is
11  *  released under the CeCILL-C license:
12  *  http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
13  *
14  */
15 #ifndef MUMPS_COMMON_H
16 #define MUMPS_COMMON_H
17 #include "mumps_compat.h"
18 #include "mumps_c_types.h"
19 /**
20  * F_SYMBOL is a macro that converts a couple (lower case symbol, upper
21  * case symbol) into the symbol defined by the compiler convention.
22  * Example: For MUMPS_XXX, first define
23  *   #define MUMPS_XXX F_SYMBOL(xxx,XXX) and then use
24  *   MUMPS_XXX in the code to get rid of any symbol convention annoyance.
25  *
26  * NB: We need to provide both upper and lower case versions because to our
27  *     knowledge, there is no way to perform the conversion with CPP
28  *     directives only.
29  */
30 #if defined(UPPER) || defined(MUMPS_WIN32)
31 # define F_SYMBOL(lower_case,upper_case) MUMPS_##upper_case
32 #elif defined(Add_)
33 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case##_
34 #elif defined(Add__)
35 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case##__
36 #else
37 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case
38 #endif
39 MUMPS_INT*
40 mumps_get_mapping();
41 #define MUMPS_ASSIGN_MAPPING \
42     F_SYMBOL(assign_mapping,ASSIGN_MAPPING)
43 void MUMPS_CALL
44 MUMPS_ASSIGN_MAPPING(MUMPS_INT *f77mapping);
45 #define MUMPS_NULLIFY_C_MAPPING F_SYMBOL(nullify_c_mapping,NULLIFY_C_MAPPING)
46 void MUMPS_CALL
47 MUMPS_NULLIFY_C_MAPPING();
48 MUMPS_INT*
49 mumps_get_pivnul_list();
50 #define MUMPS_ASSIGN_PIVNUL_LIST \
51     F_SYMBOL(assign_pivnul_list,ASSIGN_PIVNUL_LIST)
52 void MUMPS_CALL
53 MUMPS_ASSIGN_PIVNUL_LIST(MUMPS_INT *f77pivnul_list);
54 #define MUMPS_NULLIFY_C_PIVNUL_LIST \
55     F_SYMBOL(nullify_c_pivnul_list,NULLIFY_C_PIVNUL_LIST)
56 void MUMPS_CALL
57 MUMPS_NULLIFY_C_PIVNUL_LIST();
58 MUMPS_INT*
59 mumps_get_uns_perm();
60 #define MUMPS_ASSIGN_UNS_PERM \
61     F_SYMBOL(assign_uns_perm,ASSIGN_UNS_PERM)
62 void MUMPS_CALL
63 MUMPS_ASSIGN_UNS_PERM(MUMPS_INT *f77sym_perm);
64 #define MUMPS_NULLIFY_C_UNS_PERM \
65     F_SYMBOL(nullify_c_uns_perm,NULLIFY_C_UNS_PERM)
66 void MUMPS_CALL
67 MUMPS_NULLIFY_C_UNS_PERM();
68 MUMPS_INT*
69 mumps_get_sym_perm();
70 #define MUMPS_ASSIGN_SYM_PERM \
71     F_SYMBOL(assign_sym_perm,ASSIGN_SYM_PERM)
72 void MUMPS_CALL
73 MUMPS_ASSIGN_SYM_PERM(MUMPS_INT * f77sym_perm);
74 #define MUMPS_NULLIFY_C_SYM_PERM \
75     F_SYMBOL(nullify_c_sym_perm,NULLIFY_C_SYM_PERM)
76 void MUMPS_CALL
77 MUMPS_NULLIFY_C_SYM_PERM();
78 #endif /* MUMPS_COMMON_H */
79