Arcane
v3.16.2.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MetisGraph.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2024 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
/* Gestion d'un graphe de Metis. */
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
MetisGraphView() =
default
;
49
50
MetisGraphView(
MetisGraph
& graph)
51
: nb_vertices(graph.nb_vertices)
52
, have_vsize(graph.have_vsize)
53
, have_adjwgt(graph.have_adjwgt)
54
, xadj(graph.xadj)
55
, adjncy(graph.adjncy)
56
, vwgt(graph.vwgt)
57
, vsize(graph.vsize)
58
, adjwgt(graph.adjwgt)
59
, part(graph.part)
60
{}
61
public
:
62
int
nb_vertices = 0;
63
bool
have_vsize =
false
;
64
bool
have_adjwgt =
false
;
65
ArrayView<idx_t>
xadj;
66
ArrayView<idx_t>
adjncy;
67
ArrayView<idx_t>
vwgt;
68
ArrayView<idx_t>
vsize;
69
ArrayView<idx_t>
adjwgt;
70
ArrayView<idx_t>
part;
71
};
72
73
/*---------------------------------------------------------------------------*/
74
/*---------------------------------------------------------------------------*/
75
76
}
// End namespace Arcane
77
78
/*---------------------------------------------------------------------------*/
79
/*---------------------------------------------------------------------------*/
80
81
#endif
Arcane::ArrayView
Vue modifiable d'un tableau d'un type T.
Definition
arccore/src/base/arccore/base/ArrayView.h:94
Arcane::UniqueArray
Vecteur 1D de données avec sémantique par valeur (style STL).
Definition
arccore/src/collections/arccore/collections/Array.h:1844
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
Arcane::MetisGraph
Definition
MetisGraph.h:30
arcane
std
internal
MetisGraph.h
Généré le Mercredi 23 Avril 2025 06:45:00 pour Arcane par
1.13.2