Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
arcane/src/arcane/utils/Array.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2022 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
/* Array.h (C) 2000-2018 */
9
/* */
10
/* Tableau 1D. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCANE_UTILS_ARRAY_H
13
#define ARCANE_UTILS_ARRAY_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "arccore/collections/Array.h"
18
#include "
arcane/utils/UtilsTypes.h
"
19
#include "arcane/utils/StdHeader.h"
20
#include "arcane/utils/Iostream.h"
21
22
/*---------------------------------------------------------------------------*/
23
/*---------------------------------------------------------------------------*/
24
25
ARCANE_BEGIN_NAMESPACE
26
27
/*---------------------------------------------------------------------------*/
28
/*---------------------------------------------------------------------------*/
29
30
template
<
typename
T>
31
class
ArrayFullAccessorT
32
{
33
public
:
34
ArrayFullAccessorT
(
Array<T>
& v) : m_array(&v) {}
35
~ArrayFullAccessorT
() {}
36
public
:
37
T operator[](Integer i)
const
{
return
m_array->item(i); }
38
T& operator[](Integer i) {
return
(*m_array)[i]; }
39
Integer size()
const
{
return
m_array->size(); }
40
void
resize(Integer s){ m_array->resize(s); }
41
void
add(T v){ m_array->add(v); }
42
private
:
43
Array<T>
* m_array;
44
};
45
46
/*---------------------------------------------------------------------------*/
47
/*---------------------------------------------------------------------------*/
63
extern
ARCANE_UTILS_EXPORT
void
64
applySimdPadding(
Array<Int32>
& ids);
65
66
extern
ARCANE_UTILS_EXPORT
void
67
applySimdPadding(
Array<Int16>
& ids);
68
69
extern
ARCANE_UTILS_EXPORT
void
70
applySimdPadding(
Array<Int64>
& ids);
71
72
extern
ARCANE_UTILS_EXPORT
void
73
applySimdPadding(
Array<Real>
& ids);
75
76
/*---------------------------------------------------------------------------*/
77
/*---------------------------------------------------------------------------*/
78
79
ARCANE_END_NAMESPACE
80
81
/*---------------------------------------------------------------------------*/
82
/*---------------------------------------------------------------------------*/
83
84
#endif
UtilsTypes.h
Déclarations des types utilisés dans Arcane.
Arcane::ArrayFullAccessorT
Definition
arcane/src/arcane/utils/Array.h:32
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
arcane
utils
Array.h
Généré le Lundi 18 Novembre 2024 03:01:44 pour Arcane par
1.9.8