12#ifndef ARCANE_ACCELERATOR_VARIABLEVIEWS_H
13#define ARCANE_ACCELERATOR_VARIABLEVIEWS_H
20#include "arcane/core/GroupIndexTable.h"
22#include "arcane/accelerator/core/ViewBuildInfo.h"
23#include "arcane/accelerator/AcceleratorGlobal.h"
40class ARCANE_ACCELERATOR_EXPORT VariableViewBase
52template <
typename DataType>
60 using ValueType = DataType;
61 using DataTypeReturnReference = View1DSetter<DataType>;
65 ARCCORE_HOST_DEVICE DataViewSetter<DataType> operator[](
Int32 index)
const
67 return DataViewSetter<DataType>(m_data.ptrAt(index));
69 ARCCORE_HOST_DEVICE DataViewSetter<DataType> operator()(
Int32 index)
const
71 return DataViewSetter<DataType>(m_data.ptrAt(index));
73 DataTypeReturnReference& operator=(
const View1DSetter<DataType>& rhs) =
delete;
92template <
typename DataType>
93class View1DGetterSetter
94:
public View1DSetter<DataType>
96 using View1DSetter<DataType>::m_data;
100 using ValueType = DataType;
101 using DataTypeReturnReference = View1DGetterSetter<DataType>;
106 : View1DSetter<DataType>(data)
108 DataTypeReturnReference& operator=(
const View1DGetterSetter<DataType>& rhs) =
delete;
112 ARCCORE_HOST_DEVICE DataViewGetterSetter<DataType> operator[](
Int32 index)
const
114 return DataViewGetterSetter<DataType>(m_data.ptrAt(index));
122 ARCCORE_HOST_DEVICE
operator Span<DataType>() {
return { m_data.data(), m_data.size() }; }
123 ARCCORE_HOST_DEVICE
operator Span<const DataType>()
const {
return { m_data.data(), m_data.size() }; }
131template <
typename ItemType_,
typename Accessor_,
typename IndexerType_,
bool HasSimd_>
132class ItemVariableScalarOutViewBaseT
133:
public VariableViewBase
135 using Accessor = Accessor_;
139 using ItemType = ItemType_;
140 using IndexerType = IndexerType_;
141 using DataType = Accessor_::ValueType;
142 using DataTypeReturnReference = DataType&;
147 : VariableViewBase(command, var)
165 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
167 ARCANE_CHECK_AT(item.asInt32(), m_size);
168 return Accessor(this->m_values + item.asInt32());
172 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
174 ARCANE_CHECK_AT(item.asInt32(), m_size);
175 return Accessor(this->m_values + item.asInt32());
179 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
181 ARCANE_CHECK_AT(item.asInt32(), m_size);
182 return Accessor(this->m_values + item.asInt32());
186 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
188 ARCANE_CHECK_AT(item.asInt32(), m_size);
189 this->m_values[item.asInt32()] = v;
194 DataType* m_values =
nullptr;
203template <
typename ItemType_,
typename Accessor_>
204class ItemVariableScalarOutViewT
205:
public VariableViewBase
209 using DataType = Accessor_::ValueType;
210 using Accessor = Accessor_;
211 using ItemType = ItemType_;
213 using DataTypeReturnReference = DataType&;
218 : VariableViewBase(command, var)
236 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
238 ARCANE_CHECK_AT(item.asInt32(), m_size);
239 return Accessor(this->m_values + item.asInt32());
243 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
245 ARCANE_CHECK_AT(item.asInt32(), m_size);
246 return Accessor(this->m_values + item.asInt32());
250 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
252 ARCANE_CHECK_AT(item.asInt32(), m_size);
253 return Accessor(this->m_values + item.asInt32());
257 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
259 ARCANE_CHECK_AT(item.asInt32(), m_size);
260 this->m_values[item.asInt32()] = v;
265 DataType* m_values =
nullptr;
274template <
typename ItemType_,
typename Accessor_>
275class ItemPartialVariableScalarOutViewT
276:
public VariableViewBase
280 using DataType = Accessor_::ValueType;
281 using Accessor = Accessor_;
282 using ItemType = ItemType_;
284 using DataTypeReturnReference = DataType&;
291 : VariableViewBase(command, var)
294 , m_table_view(table_view)
298 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
300 ARCANE_CHECK_AT(item.asInt32(), m_size);
301 return Accessor(this->m_values + item.asInt32());
305 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
307 ARCANE_CHECK_AT(item.asInt32(), m_size);
308 return Accessor(this->m_values + item.asInt32());
312 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
314 ARCANE_CHECK_AT(item.asInt32(), m_size);
315 return Accessor(this->m_values + item.asInt32());
319 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
321 ARCANE_CHECK_AT(item.asInt32(), m_size);
322 this->m_values[item.asInt32()] = v;
328 ARCCORE_HOST_DEVICE Accessor
operator[](ItemLocalIdType lid)
const
330 Int32 index = _toIndex(lid);
331 ARCANE_CHECK_AT(index, m_size);
332 return Accessor(m_values + index);
336 ARCCORE_HOST_DEVICE Accessor
operator()(ItemLocalIdType lid)
const
338 Int32 index = _toIndex(lid);
339 ARCANE_CHECK_AT(index, m_size);
340 return Accessor(m_values + index);
344 ARCCORE_HOST_DEVICE Accessor
value(ItemLocalIdType lid)
const
346 Int32 index = _toIndex(lid);
347 ARCANE_CHECK_AT(index, m_size);
348 return Accessor(m_values + index);
352 ARCCORE_HOST_DEVICE
void setValue(ItemLocalIdType lid,
const DataType& v)
const
354 Int32 index = _toIndex(lid);
355 ARCANE_CHECK_AT(index, m_size);
356 this->m_values[index] = v;
361 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
363 return m_table_view[lid];
368 DataType* m_values =
nullptr;
378template <
typename ItemType_,
typename DataType_>
379class ItemVariableScalarInViewT
380:
public VariableViewBase
384 using ItemType = ItemType_;
385 using DataType = DataType_;
391 : VariableViewBase(command, var)
399 typename SimdTypeTraits<DataType>::SimdType
402 typedef typename SimdTypeTraits<DataType>::SimdType
SimdType;
407 typename SimdTypeTraits<DataType>::SimdType
410 typedef typename SimdTypeTraits<DataType>::SimdType
SimdType;
411 return SimdType(m_values.data() + simd_item.baseLocalId());
415 ARCCORE_HOST_DEVICE
const DataType&
operator[](IndexerType item)
const
417 return this->m_values[item.asInt32()];
421 ARCCORE_HOST_DEVICE
const DataType&
operator()(IndexerType item)
const
423 return this->m_values[item.asInt32()];
427 ARCCORE_HOST_DEVICE
const DataType&
value(IndexerType item)
const
429 return this->m_values[item.asInt32()];
442template <
typename ItemType_,
typename DataType_>
443class ItemPartialVariableScalarInViewT
444:
public VariableViewBase
448 using ItemType = ItemType_;
449 using DataType = DataType_;
457 : VariableViewBase(command, var)
459 , m_table_view(table_view)
465 ARCCORE_HOST_DEVICE
const DataType&
operator[](IndexerType item)
const
467 return m_values[item.asInt32()];
471 ARCCORE_HOST_DEVICE
const DataType&
operator()(IndexerType item)
const
473 return m_values[item.asInt32()];
477 ARCCORE_HOST_DEVICE
const DataType&
value(IndexerType item)
const
479 return m_values[item.asInt32()];
483 ARCCORE_HOST_DEVICE
const DataType&
operator[](ItemLocalIdType lid)
const
485 return m_values[_toIndex(lid)];
489 ARCCORE_HOST_DEVICE
const DataType&
operator()(ItemLocalIdType lid)
const
491 return m_values[_toIndex(lid)];
495 ARCCORE_HOST_DEVICE
const DataType&
value(ItemLocalIdType lid)
const
497 return m_values[_toIndex(lid)];
502 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
504 return m_table_view[lid];
518template <
typename ItemType_,
typename DataType_>
519class ItemPartialVariableArrayInViewT
520:
public VariableViewBase
524 using ItemType = ItemType_;
525 using DataType = DataType_;
533 : VariableViewBase(command, var)
535 , m_table_view(table_view)
541 return this->m_values[i.asInt32()];
547 return m_values[_toIndex(lid)];
553 return m_values[item.asInt32()][i];
559 return m_values[_toIndex(lid)][i];
565 return m_values[i.asInt32()];
571 return m_values[_toIndex(lid)];
576 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
578 return m_table_view[lid];
592template <
typename ItemType_,
typename DataType_>
593class ItemVariableArrayInViewT
594:
public VariableViewBase
602 using DataType = DataType_;
607 : VariableViewBase(command, var)
616 return this->m_values[i.asInt32()];
622 return this->m_values[item.asInt32()][i];
628 return this->m_values[i.asInt32()];
641template <
typename ItemType_,
typename Accessor_,
typename Indexer_>
642class ItemVariableArrayOutViewBaseT
643:
public VariableViewBase
647 using ItemType = ItemType_;
648 using Accessor = Accessor_;
649 using IndexerType = Indexer_;
650 using DataType = Accessor::ValueType;
651 using DataTypeReturnType = Accessor::DataTypeReturnReference;
656 : VariableViewBase(command, var)
661 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
663 return DataTypeReturnType(this->m_values[item.asInt32()]);
669 return this->m_values[item.asInt32()][i];
675 return DataTypeReturnType(this->m_values[item.asInt32()]);
688template <
typename ItemType_,
typename Accessor_>
689class ItemVariableArrayOutViewT
690:
public VariableViewBase
694 using ItemType = ItemType_;
695 using Accessor = Accessor_;
697 using DataType = Accessor::ValueType;
698 using DataTypeReturnType = Accessor::DataTypeReturnReference;
703 : VariableViewBase(command, var)
708 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
710 return DataTypeReturnType(this->m_values[item.asInt32()]);
716 return this->m_values[item.asInt32()][i];
722 return DataTypeReturnType(this->m_values[item.asInt32()]);
736template <
typename ItemType_,
typename Accessor_>
737class ItemPartialVariableArrayOutViewT
738:
public VariableViewBase
742 using ItemType = ItemType_;
743 using Accessor = Accessor_;
745 using DataType = Accessor::ValueType;
746 using DataTypeReturnType = Accessor::DataTypeReturnReference;
753 : VariableViewBase(command, var)
755 , m_table_view(table_view)
761 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
763 return DataTypeReturnType(m_values[item.asInt32()]);
769 return m_values[item.asInt32()][i];
775 return DataTypeReturnType(m_values[item.asInt32()]);
781 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](ItemLocalIdType lid)
const
783 return DataTypeReturnType(m_values[_toIndex(lid)]);
789 return m_values[_toIndex(lid)][i];
795 return DataTypeReturnType(m_values[_toIndex(lid)]);
800 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
802 return m_table_view[lid];
832template <
typename ItemType_,
typename Accessor_>
834:
public VariableViewBase
838 using ItemType = ItemType_;
839 using Accessor = Accessor_;
841 using DataType = Accessor_::ValueType;
842 using DataTypeReturnReference = DataType&;
848 : VariableViewBase(command, var)
878 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
880 ARCANE_CHECK_AT(item.asInt32(), m_size);
881 return Accessor(m_values + item.asInt32());
885 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
887 ARCANE_CHECK_AT(item.asInt32(), m_size);
888 return Accessor(m_values + item.asInt32());
892 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
894 ARCANE_CHECK_AT(item.asInt32(), m_size);
895 return Accessor(m_values + item.asInt32());
899 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
901 ARCANE_CHECK_AT(item.asInt32(), m_size);
902 this->m_values[item.asInt32()] = v;
907 DataType* m_values =
nullptr;
914template <
typename ItemType_,
typename Accessor_>
916:
public VariableViewBase
920 using ItemType = ItemType_;
921 using Accessor = Accessor_;
923 using DataType =
typename Accessor_::ValueType;
924 using DataTypeReturnReference = DataType&;
932 : VariableViewBase(command, var)
935 , m_table_view(table_view)
941 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
943 ARCANE_CHECK_AT(item.asInt32(), m_size);
944 return Accessor(this->m_values + item.asInt32());
948 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
950 ARCANE_CHECK_AT(item.asInt32(), m_size);
951 return Accessor(this->m_values + item.asInt32());
955 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
957 ARCANE_CHECK_AT(item.asInt32(), m_size);
958 return Accessor(this->m_values + item.asInt32());
962 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
964 ARCANE_CHECK_AT(item.asInt32(), m_size);
965 this->m_values[item.asInt32()] = v;
971 ARCCORE_HOST_DEVICE Accessor
operator[](ItemLocalIdType lid)
const
973 Int32 index = _toIndex(lid);
974 ARCANE_CHECK_AT(index, m_size);
975 return Accessor(m_values + index);
979 ARCCORE_HOST_DEVICE Accessor
operator()(ItemLocalIdType lid)
const
981 Int32 index = _toIndex(lid);
982 ARCANE_CHECK_AT(index, m_size);
983 return Accessor(m_values + index);
987 ARCCORE_HOST_DEVICE Accessor
value(ItemLocalIdType lid)
const
989 Int32 index = _toIndex(lid);
990 ARCANE_CHECK_AT(index, m_size);
991 return Accessor(m_values + index);
995 ARCCORE_HOST_DEVICE
void setValue(ItemLocalIdType lid,
const DataType& v)
const
997 Int32 index = _toIndex(lid);
998 ARCANE_CHECK_AT(index, m_size);
1004 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
1006 return m_table_view[lid];
1011 DataType* m_values =
nullptr;
1024template <
typename DataType>
auto
1027 using Accessor = DataViewSetter<DataType>;
1034template <
typename ItemType,
typename DataType>
auto
1037 using Accessor = DataViewSetter<DataType>;
1044template <
typename ItemType,
typename DataType>
auto
1047 using Accessor = DataViewSetter<DataType>;
1055template <
typename ItemType>
auto
1058 using Accessor = DataViewSetter<Real3>;
1065template <
typename ItemType>
auto
1068 using Accessor = DataViewSetter<Real3>;
1076template <
typename ItemType>
auto
1079 using Accessor = DataViewSetter<Real2>;
1086template <
typename ItemType>
auto
1089 using Accessor = DataViewSetter<Real2>;
1097template <
typename ItemType,
typename DataType>
auto
1107template <
typename ItemType,
typename DataType>
auto
1121template <
typename DataType>
auto
1124 using Accessor = DataViewGetterSetter<DataType>;
1131template <
typename ItemType,
typename DataType>
auto
1134 using Accessor = DataViewGetterSetter<DataType>;
1141template <
typename ItemType,
typename DataType>
auto
1144 using Accessor = DataViewGetterSetter<DataType>;
1151template <
typename ItemType>
auto
1154 using Accessor = DataViewGetterSetter<Real3>;
1161template <
typename ItemType>
auto
1164 using Accessor = DataViewGetterSetter<Real3>;
1172template <
typename ItemType>
auto
1175 using Accessor = DataViewGetterSetter<Real2>;
1182template <
typename ItemType>
auto
1185 using Accessor = DataViewGetterSetter<Real2>;
1193template <
typename ItemType,
typename DataType>
auto
1203template <
typename ItemType,
typename DataType>
auto
1217template <
typename ItemType,
typename DataType>
auto
1226template <
typename ItemType,
typename DataType>
auto
1235template <
typename DataType>
auto
1244template <
typename ItemType,
typename DataType>
auto
1253template <
typename ItemType,
typename DataType>
auto
Declarations of types on entities.
Read-only view on a partial array variable of the mesh.
__host__ __device__ const DataType & operator()(IndexerType item, Int32 i) const
Access operator for the i-th value of entity item.
__host__ __device__ const SmallSpan< const DataType > operator[](ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const SmallSpan< const DataType > value(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const SmallSpan< const DataType > operator[](IndexerType i) const
Access operator for entity item.
__host__ __device__ const SmallSpan< const DataType > value(IndexerType i) const
Access operator for entity item.
__host__ __device__ const DataType & operator()(ItemLocalIdType lid, Int32 i) const
Access operator for the i-th value of entity item.
Write-only view on a partial array variable of the mesh.
__host__ __device__ SmallSpan< DataType > value(IndexerType item) const
Access operator for entity item.
__host__ __device__ SmallSpan< DataType > value(ItemLocalIdType lid) const
Access operator for the i-th value of entity item.
__host__ __device__ DataTypeReturnType operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ DataType & operator()(ItemLocalIdType lid, Int32 i) const
Access operator for local ID entity lid.
__host__ __device__ DataType & operator()(IndexerType item, Int32 i) const
Access operator for the i-th value of entity item.
__host__ __device__ DataTypeReturnType operator[](ItemLocalIdType lid) const
Access operator for local ID entity lid.
__host__ __device__ Accessor value(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ Accessor operator[](ItemLocalIdType lid) const
Access operator for entity item.
ItemPartialVariableRealNScalarOutViewT(const ViewBuildInfo &command, IVariable *var, SmallSpan< DataType > v, GroupIndexTableView table_view)
Constructs the view.
__host__ __device__ void setValue(ItemLocalIdType lid, const DataType &v) const
Sets the value for entity item at v.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for entity item.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for entity item.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Sets the value for entity item at v.
__host__ __device__ Accessor operator()(ItemLocalIdType lid) const
Access operator for entity item.
Read view on a partial scalar variable of the mesh.
__host__ __device__ const DataType & operator()(IndexerType item) const
Access operator for entity item.
__host__ __device__ const DataType & operator[](ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const DataType & value(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const DataType & operator()(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const DataType & value(IndexerType item) const
Access operator for entity item.
__host__ __device__ const DataType & operator[](IndexerType item) const
Access operator for entity item.
Write view on a partial scalar variable of the mesh.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Positions the value for the entity item at v.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor value(ItemLocalIdType lid) const
Access operator for the local ID entity lid.
__host__ __device__ void setValue(ItemLocalIdType lid, const DataType &v) const
Positions the value for the local ID entity lid at v.
__host__ __device__ Accessor operator[](ItemLocalIdType lid) const
Access operator for the local ID entity lid.
__host__ __device__ Accessor operator()(ItemLocalIdType lid) const
Access operator for the local ID entity lid.
Read-only view on a mesh array variable.
__host__ __device__ const SmallSpan< const DataType > value(IndexerType i) const
Access operator for entity item.
__host__ __device__ const SmallSpan< const DataType > operator[](IndexerType i) const
Access operator for entity item.
__host__ __device__ const DataType & operator()(IndexerType item, Int32 i) const
Access operator for the i-th value of entity item.
__host__ __device__ DataTypeReturnType operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ SmallSpan< DataType > value(IndexerType item) const
Access operator for entity item.
__host__ __device__ DataType & operator()(IndexerType item, Int32 i) const
Access operator for the i-th value of entity item.
Write-only view on a mesh array variable.
__host__ __device__ DataTypeReturnType operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ SmallSpan< DataType > value(IndexerType item) const
Access operator for entity item.
__host__ __device__ DataType & operator()(IndexerType item, Int32 i) const
Access operator for the i-th value of entity item.
Write-only view on a scalar variable of type 'RealN' of the mesh.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for entity item.
SimdDirectSetter< DataType > operator()(SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
ItemVariableRealNScalarOutViewT(const ViewBuildInfo &command, IVariable *var, SmallSpan< DataType > v)
Constructs the view.
SimdSetter< DataType > operator()(SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Positions the value for entity item at v.
SimdDirectSetter< DataType > operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
SimdSetter< DataType > operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for entity item.
Read view on a scalar variable of the mesh.
SimdTypeTraits< DataType >::SimdType operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ const DataType & operator[](IndexerType item) const
Access operator for the entity item.
__host__ __device__ const DataType & value(IndexerType item) const
Access operator for the entity item.
__host__ __device__ const DataType & operator()(IndexerType item) const
Access operator for the entity item.
SimdTypeTraits< DataType >::SimdType operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
SimdSetter< DataType > operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for the entity item.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Positions the value for the entity item at v.
SimdDirectSetter< DataType > operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for the entity item.
Write view on a scalar variable of the mesh.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for the entity item.
SimdSetter< DataType > operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Positions the value for the entity item at v.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for the entity item.
SimdDirectSetter< DataType > operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
Class to access a 1D array of a read/write view.
Class to access a 1D array of a read/write view.
Information to build a view for accelerator data.
typename ItemTraitsT< ItemType >::LocalIdType LocalIdType
Type of the localId().
GroupIndexTableView tableView() const
View of the group indirection table.
GroupIndexTableView tableView() const
View of the group's redirection table.
Write view on a mesh scalar variable of type 'RealN'.
Read view on a scalar mesh variable.
Write view on a scalar mesh variable.
Scalar variable on a mesh entity type.
Scalar partial variable on a mesh entity type.
Scalar variable on a mesh entity type.
Array variable on a mesh entity type.
Scalar variable on a mesh entity type.
Object allowing positioning of values in a SIMD vector.
Vector index without indirection for an entity type.
Vector index with indirection for an entity type. TODO: store the indices in a vector register to be ...
const SimdIndexType &ARCANE_RESTRICT simdLocalIds() const
List of local IDs of the instance entities.
View for a 2D array whose size is an 'Int32'.
View of an array of elements of type T.
constexpr __host__ __device__ pointer data() const noexcept
Pointer to the start of the view.
constexpr __host__ __device__ SizeType size() const noexcept
Returns the size of the array.
View of an array of elements of type T.
IVariable * variable() const
Associated variable.
Namespace for accelerator usage.
auto viewInOut(const ViewBuildInfo &vbi, CellMaterialVariableScalarRef< DataType > &var)
Read/write view for scalar material variables.
auto viewOut(const ViewBuildInfo &vbi, CellMaterialVariableScalarRef< DataType > &var)
Write view for scalar material variables.
auto viewIn(const ViewBuildInfo &vbi, const CellMaterialVariableScalarRef< DataType > &var)
Read view for scalar material variables.
std::int32_t Int32
Signed integer type of 32 bits.