12#ifndef ARCANE_CORE_MESHVARIABLEARRAYREF_H
13#define ARCANE_CORE_MESHVARIABLEARRAYREF_H
17#include "arcane/core/PrivateVariableArray.h"
19#include "arcane/core/ItemGroupRangeIterator.h"
20#include "arcane/core/ItemPairEnumerator.h"
34template <
class DataTypeT>
36:
public PrivateVariableArrayT<DataTypeT>
40 typedef DataTypeT DataType;
47 typedef PrivateVariableArrayT<DataType> BaseClass;
48 typedef typename BaseClass::PrivatePartType PrivatePartType;
96 ARCANE_CORE_EXPORT
void fill(
const DataType& value);
98 ARCANE_CORE_EXPORT
void fill(
const DataType& value,
const ItemGroup& group);
100 ARCANE_CORE_EXPORT
void fill(
const DataType& value,
RunQueue* queue);
115template <
class ItemTypeT,
class DataTypeT>
121 typedef DataTypeT DataType;
122 typedef ItemTypeT ItemType;
139 typedef typename ItemTypeT::LocalIdType ItemLocalIdType;
154 ThatClass& operator=(
const ThatClass& rhs) =
delete;
159 ConstArrayType
operator[](ItemLocalIdType item)
const {
return this->m_view[item.localId()]; }
162 ArrayType
operator[](ItemLocalIdType item) {
return this->m_view[item.localId()]; }
165 const DataType
operator()(ItemLocalIdType item,
Int32 i)
const {
return this->m_view[item.localId()][i]; }
168 DataType&
operator()(ItemLocalIdType item,
Int32 i) {
return this->m_view[item.localId()][i]; }
Execution queue for an accelerator.
Mutable view for a 2D array.
Modifiable view of an array of type T.
Constant view of an array of type T.
Index of an Item in a variable.
Characteristics of mesh elements.
Array variable on a mesh entity type.
void copy(const ItemVariableArrayRefT< DataType > &v)
Copies the values of v into this variable.
ArrayType operator[](ItemLocalId item)
Modifiable value of entity item.
ItemVariableArrayRefT(const VariableBuildInfo &b, eItemKind ik)
Constructs a reference to the variable specified in vb.
DataType & operator()(ItemLocalId item, Int32 i)
Modifiable value of the i-th value of entity item.
ConstArrayType operator[](ItemLocalId item) const
Read-only value of entity item.
ItemVariableArrayRefT< DataType > & operator=(const ItemVariableArrayRefT< DataType > &rhs)
Positions the instance reference to the variable rhs.
const DataType operator()(ItemLocalId item, Int32 i) const
Read-only value of the i-th value of entity item.
void fill(const DataType &value)
Fills the variable with the value value.
MeshVariableArrayRefT(const MeshVariableArrayRefT< ItemType, DataType > &rhs)
Constructs a reference from rhs.
GroupType itemGroup() const
Group associated with the quantity.
const DataType operator()(ItemLocalIdType item, Int32 i) const
Read-only value of the i-th value of entity item.
MeshVariableArrayRefT(IVariable *var)
Constructs a reference from var.
void swapValues(MeshVariableArrayRefT< ItemType, DataType > &rhs)
Swaps the values of the variable rhs with those of the instance.
ArrayType operator[](ItemLocalIdType item)
Modifiable value of entity item.
DataType & operator()(ItemLocalIdType item, Int32 i)
Modifiable value of the i-th value of entity item.
ConstArrayType operator[](ItemLocalIdType item) const
Read-only value of entity item.
void refersTo(const MeshVariableArrayRefT< ItemType, DataType > &rhs)
Positions the instance reference to the variable rhs.
MeshVariableArrayRefT(const VariableBuildInfo &b)
Constructs a reference to the variable specified in vb.
Base class for a variable on mesh entities.
2D data vector with value semantics (STL style).
Parameters necessary for building a variable.
Variable factory registrar.
Information characterizing a variable.
Information characterizing the type of a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eItemKind
Mesh entity type.
std::int32_t Int32
Signed integer type of 32 bits.