1 /* Copyright 2004,2007,2010,2012 IPB, Universite de Bordeaux, INRIA & CNRS
2 **
3 ** This file is part of the Scotch software package for static mapping,
4 ** graph partitioning and sparse matrix ordering.
5 **
6 ** This software is governed by the CeCILL-C license under French law
7 ** and abiding by the rules of distribution of free software. You can
8 ** use, modify and/or redistribute the software under the terms of the
9 ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
10 ** URL: "http://www.cecill.info".
11 **
12 ** As a counterpart to the access to the source code and rights to copy,
13 ** modify and redistribute granted by the license, users are provided
14 ** only with a limited warranty and the software's author, the holder of
15 ** the economic rights, and the successive licensors have only limited
16 ** liability.
17 **
18 ** In this respect, the user's attention is drawn to the risks associated
19 ** with loading, using, modifying and/or developing or reproducing the
20 ** software by the user in light of its specific status of free software,
21 ** that may mean that it is complicated to manipulate, and that also
22 ** therefore means that it is reserved for developers and experienced
23 ** professionals having in-depth computer knowledge. Users are therefore
24 ** encouraged to load and test the software's suitability as regards
25 ** their requirements in conditions enabling the security of their
26 ** systems and/or data to be ensured and, more generally, to use and
27 ** operate it in the same conditions as regards security.
28 **
29 ** The fact that you are presently reading this means that you have had
30 ** knowledge of the CeCILL-C license and that you accept its terms.
31 */
32 /************************************************************/
33 /**                                                        **/
34 /**   NAME       : hgraph.h                                **/
35 /**                                                        **/
36 /**   AUTHOR     : Francois PELLEGRINI                     **/
37 /**                                                        **/
38 /**   FUNCTION   : These lines are the data declarations   **/
39 /**                for the source halo graph structure.    **/
40 /**                                                        **/
41 /**   DATES      : # Version 4.0  : from : 02 jan 2002     **/
42 /**                                 to     30 apr 2004     **/
43 /**                # Version 5.0  : from : 19 dec 2006     **/
44 /**                                 to     19 dec 2006     **/
45 /**                # Version 5.1  : from : 04 nov 2010     **/
46 /**                                 to     04 nov 2010     **/
47 /**                # Version 6.0  : from : 17 oct 2012     **/
48 /**                                 to     17 oct 2012     **/
49 /**                                                        **/
50 /************************************************************/
51 
52 #define HGRAPH_H
53 
54 /*
55 **  The defines.
56 */
57 
58 /*+ Graph option flags. +*/
59 
60 #define HGRAPHFREEVNHD              0x0400        /* Free vnhdtab array */
61 #define HGRAPHFREETABS              (GRAPHFREETABS | HGRAPHFREEVNHD)
62 
63 /*
64 **  The type and structure definitions.
65 */
66 
67 /*+ Halo graph structure. +*/
68 
69 typedef struct Hgraph_ {
70   Graph                     s;                    /*+ Source graph                                                   +*/
71   Gnum                      vnohnbr;              /*+ Number of non-halo vertices                                    +*/
72   Gnum                      vnohnnd;              /*+ Based number of first halo vertex in graph (s.vertnnd if none) +*/
73   Gnum *                    vnhdtax;              /*+ End vertex array for non-halo vertices [vnohnbr, based]        +*/
74   Gnum                      vnlosum;              /*+ Sum of vertex loads for non-halo vertices only (<= s.velosum)  +*/
75   Gnum                      enohnbr;              /*+ Number of non-halo edges                                       +*/
76   Gnum                      enohsum;              /*+ Sum of non-halo edge loads                                     +*/
77   Gnum                      levlnum;              /*+ Nested dissection level                                        +*/
78 } Hgraph;
79 
80 /*
81 **  The function prototypes.
82 */
83 
84 #ifndef HGRAPH
85 #define static
86 #endif
87 
88 int                         hgraphInit          (Hgraph * const);
89 void                        hgraphExit          (Hgraph * const);
90 void                        hgraphFree          (Hgraph * const);
91 Gnum                        hgraphBase          (Hgraph * const, const Gnum);
92 int                         hgraphCheck         (const Hgraph *);
93 int                         hgraphInduceList    (const Hgraph * const, const VertList * const, const Gnum, Hgraph * const);
94 void                        hgraphUnhalo        (const Hgraph * const, Graph * const);
95 
96 #undef static
97