1 /*
2  *
3  *  This file is part of MUMPS 4.10.0, built on Tue May 10 12:56:32 UTC 2011
4  *
5  *
6  *  This version of MUMPS is provided to you free of charge. It is public
7  *  domain, based on public domain software developed during the Esprit IV
8  *  European project PARASOL (1996-1999). Since this first public domain
9  *  version in 1999, research and developments have been supported by the
10  *  following institutions: CERFACS, CNRS, ENS Lyon, INPT(ENSEEIHT)-IRIT,
11  *  INRIA, and University of Bordeaux.
12  *
13  *  The MUMPS team at the moment of releasing this version includes
14  *  Patrick Amestoy, Maurice Bremond, Alfredo Buttari, Abdou Guermouche,
15  *  Guillaume Joslin, Jean-Yves L'Excellent, Francois-Henry Rouet, Bora
16  *  Ucar and Clement Weisbecker.
17  *
18  *  We are also grateful to Emmanuel Agullo, Caroline Bousquet, Indranil
19  *  Chowdhury, Philippe Combes, Christophe Daniel, Iain Duff, Vincent Espirat,
20  *  Aurelia Fevre, Jacko Koster, Stephane Pralet, Chiara Puglisi, Gregoire
21  *  Richard, Tzvetomila Slavova, Miroslav Tuma and Christophe Voemel who
22  *  have been contributing to this project.
23  *
24  *  Up-to-date copies of the MUMPS package can be obtained
25  *  from the Web pages:
26  *  http://mumps.enseeiht.fr/  or  http://graal.ens-lyon.fr/MUMPS
27  *
28  *
29  *   THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
30  *   EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
31  *
32  *
33  *  User documentation of any code that uses this software can
34  *  include this complete notice. You can acknowledge (using
35  *  references [1] and [2]) the contribution of this package
36  *  in any scientific publication dependent upon the use of the
37  *  package. You shall use reasonable endeavours to notify
38  *  the authors of the package of this publication.
39  *
40  *   [1] P. R. Amestoy, I. S. Duff, J. Koster and  J.-Y. L'Excellent,
41  *   A fully asynchronous multifrontal solver using distributed dynamic
42  *   scheduling, SIAM Journal of Matrix Analysis and Applications,
43  *   Vol 23, No 1, pp 15-41 (2001).
44  *
45  *   [2] P. R. Amestoy and A. Guermouche and J.-Y. L'Excellent and
46  *   S. Pralet, Hybrid scheduling for the parallel solution of linear
47  *   systems. Parallel Computing Vol 32 (2), pp 136-156 (2006).
48  *
49  */
50 #ifndef MUMPS_COMMON_H
51 #define MUMPS_COMMON_H
52 #include "mumps_compat.h"
53 #include "mumps_c_types.h"
54 /**
55  * F_SYMBOL is a macro that converts a couple (lower case symbol, upper
56  * case symbol) into the symbol defined by the compiler convention.
57  * Example: For MUMPS_XXX, first define
58  *   #define MUMPS_XXX F_SYMBOL(xxx,XXX) and then use
59  *   MUMPS_XXX in the code to get rid of any symbol convention annoyance.
60  *
61  * NB: We need to provide both upper and lower case versions because to our
62  *     knowledge, there is no way to perform the conversion with CPP
63  *     directives only.
64  */
65 #if defined(UPPER) || defined(MUMPS_WIN32)
66 # define F_SYMBOL(lower_case,upper_case) MUMPS_##upper_case
67 #elif defined(Add_)
68 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case##_
69 #elif defined(Add__)
70 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case##__
71 #else
72 # define F_SYMBOL(lower_case,upper_case) mumps_##lower_case
73 #endif
74 MUMPS_INT*
75 mumps_get_mapping();
76 #define MUMPS_AFFECT_MAPPING \
77     F_SYMBOL(affect_mapping,AFFECT_MAPPING)
78 void MUMPS_CALL
79 MUMPS_AFFECT_MAPPING(MUMPS_INT *f77mapping);
80 #define MUMPS_NULLIFY_C_MAPPING F_SYMBOL(nullify_c_mapping,NULLIFY_C_MAPPING)
81 void MUMPS_CALL
82 MUMPS_NULLIFY_C_MAPPING();
83 MUMPS_INT*
84 mumps_get_pivnul_list();
85 #define MUMPS_AFFECT_PIVNUL_LIST \
86     F_SYMBOL(affect_pivnul_list,AFFECT_PIVNUL_LIST)
87 void MUMPS_CALL
88 MUMPS_AFFECT_PIVNUL_LIST(MUMPS_INT *f77pivnul_list);
89 #define MUMPS_NULLIFY_C_PIVNUL_LIST \
90     F_SYMBOL(nullify_c_pivnul_list,NULLIFY_C_PIVNUL_LIST)
91 void MUMPS_CALL
92 MUMPS_NULLIFY_C_PIVNUL_LIST();
93 MUMPS_INT*
94 mumps_get_uns_perm();
95 #define MUMPS_AFFECT_UNS_PERM \
96     F_SYMBOL(affect_uns_perm,AFFECT_UNS_PERM)
97 void MUMPS_CALL
98 MUMPS_AFFECT_UNS_PERM(MUMPS_INT *f77sym_perm);
99 #define MUMPS_NULLIFY_C_UNS_PERM \
100     F_SYMBOL(nullify_c_uns_perm,NULLIFY_C_UNS_PERM)
101 void MUMPS_CALL
102 MUMPS_NULLIFY_C_UNS_PERM();
103 MUMPS_INT*
104 mumps_get_sym_perm();
105 #define MUMPS_AFFECT_SYM_PERM \
106     F_SYMBOL(affect_sym_perm,AFFECT_SYM_PERM)
107 void MUMPS_CALL
108 MUMPS_AFFECT_SYM_PERM(MUMPS_INT * f77sym_perm);
109 #define MUMPS_NULLIFY_C_SYM_PERM \
110     F_SYMBOL(nullify_c_sym_perm,NULLIFY_C_SYM_PERM)
111 void MUMPS_CALL
112 MUMPS_NULLIFY_C_SYM_PERM();
113 #endif /* MUMPS_COMMON_H */
114