Arcane
4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MetisGraph.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4
// See the top-level COPYRIGHT file for details.
5
// SPDX-License-Identifier: Apache-2.0
6
//-----------------------------------------------------------------------------
7
/*---------------------------------------------------------------------------*/
8
/* MetisGraph.h (C) 2000-2024 */
9
/* */
10
/* Management of a Metis graph. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCANE_STD_METISGRAPH
13
#define ARCANE_STD_METISGRAPH
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "arcane/utils/Array.h"
18
#include "arcane/utils/ArrayView.h"
19
#include <parmetis.h>
20
21
/*---------------------------------------------------------------------------*/
22
/*---------------------------------------------------------------------------*/
23
namespace
Arcane
24
{
25
26
/*---------------------------------------------------------------------------*/
27
/*---------------------------------------------------------------------------*/
28
29
struct
MetisGraph
30
{
31
int
nb_vertices = 0;
32
bool
have_vsize =
false
;
33
bool
have_adjwgt =
false
;
34
UniqueArray<idx_t>
xadj;
35
UniqueArray<idx_t>
adjncy;
36
UniqueArray<idx_t>
vwgt;
37
UniqueArray<idx_t>
vsize;
38
UniqueArray<idx_t>
adjwgt;
39
UniqueArray<idx_t>
part;
40
};
41
42
/*---------------------------------------------------------------------------*/
43
/*---------------------------------------------------------------------------*/
44
45
class
MetisGraphView
46
{
47
public
:
48
49
MetisGraphView() =
default
;
50
51
MetisGraphView(
MetisGraph
& graph)
52
: nb_vertices(graph.nb_vertices)
53
, have_vsize(graph.have_vsize)
54
, have_adjwgt(graph.have_adjwgt)
55
, xadj(graph.xadj)
56
, adjncy(graph.adjncy)
57
, vwgt(graph.vwgt)
58
, vsize(graph.vsize)
59
, adjwgt(graph.adjwgt)
60
, part(graph.part)
61
{}
62
63
public
:
64
65
int
nb_vertices = 0;
66
bool
have_vsize =
false
;
67
bool
have_adjwgt =
false
;
68
ArrayView<idx_t>
xadj;
69
ArrayView<idx_t>
adjncy;
70
ArrayView<idx_t>
vwgt;
71
ArrayView<idx_t>
vsize;
72
ArrayView<idx_t>
adjwgt;
73
ArrayView<idx_t>
part;
74
};
75
76
/*---------------------------------------------------------------------------*/
77
/*---------------------------------------------------------------------------*/
78
79
}
// End namespace Arcane
80
81
/*---------------------------------------------------------------------------*/
82
/*---------------------------------------------------------------------------*/
83
84
#endif
Arcane::ArrayView
Modifiable view of an array of type T.
Definition
arccore/src/base/arccore/base/ArrayView.h:96
Arcane::UniqueArray
1D data vector with value semantics (STL style).
Definition
arccore/src/common/arccore/common/Array.h:890
Arcane
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition
arcane/src/arcane/accelerator/AcceleratorGlobal.h:37
Arcane::MetisGraph
Definition
MetisGraph.h:30
arcane
std
internal
MetisGraph.h
Generated on
for Arcane by
1.16.1