12#ifndef ARCANE_ACCELERATOR_VARIABLEVIEWS_H
13#define ARCANE_ACCELERATOR_VARIABLEVIEWS_H
19#include "arcane/core/ItemLocalId.h"
21#include "arcane/core/GroupIndexTable.h"
23#include "arcane/accelerator/core/ViewBuildInfo.h"
24#include "arcane/accelerator/AcceleratorGlobal.h"
45class ARCANE_ACCELERATOR_EXPORT VariableViewBase
58template <
typename DataType>
66 using ValueType = DataType;
67 using DataTypeReturnReference = View1DSetter<DataType>;
71 ARCCORE_HOST_DEVICE DataViewSetter<DataType> operator[](
Int32 index)
const
73 return DataViewSetter<DataType>(m_data.ptrAt(index));
75 ARCCORE_HOST_DEVICE DataViewSetter<DataType> operator()(
Int32 index)
const
77 return DataViewSetter<DataType>(m_data.ptrAt(index));
79 DataTypeReturnReference& operator=(
const View1DSetter<DataType>& rhs) =
delete;
99template <
typename DataType>
100class View1DGetterSetter
101:
public View1DSetter<DataType>
103 using View1DSetter<DataType>::m_data;
107 using ValueType = DataType;
108 using DataTypeReturnReference = View1DGetterSetter<DataType>;
113 : View1DSetter<DataType>(data)
115 DataTypeReturnReference& operator=(
const View1DGetterSetter<DataType>& rhs) =
delete;
119 ARCCORE_HOST_DEVICE DataViewGetterSetter<DataType> operator[](
Int32 index)
const
121 return DataViewGetterSetter<DataType>(m_data.ptrAt(index));
129 ARCCORE_HOST_DEVICE
operator Span<DataType>() {
return { m_data.data(), m_data.size() }; }
130 ARCCORE_HOST_DEVICE
operator Span<const DataType>()
const {
return { m_data.data(), m_data.size() }; }
139template <
typename _ItemType,
typename _Accessor,
typename _IndexerType,
bool _HasSimd>
140class ItemVariableScalarOutViewBaseT
141:
public VariableViewBase
143 using Accessor = _Accessor;
147 using ItemType = _ItemType;
148 using IndexerType = _IndexerType;
149 using DataType =
typename _Accessor::ValueType;
150 using DataTypeReturnReference = DataType&;
155 : VariableViewBase(command, var)
173 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
175 ARCANE_CHECK_AT(item.asInt32(), m_size);
176 return Accessor(this->m_values + item.asInt32());
180 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
182 ARCANE_CHECK_AT(item.asInt32(), m_size);
183 return Accessor(this->m_values + item.asInt32());
187 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
189 ARCANE_CHECK_AT(item.asInt32(), m_size);
190 return Accessor(this->m_values + item.asInt32());
194 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
196 ARCANE_CHECK_AT(item.asInt32(), m_size);
197 this->m_values[item.asInt32()] = v;
212template <
typename _ItemType,
typename _Accessor>
213class ItemVariableScalarOutViewT
214:
public VariableViewBase
218 using DataType =
typename _Accessor::ValueType;
219 using Accessor = _Accessor;
220 using ItemType = _ItemType;
222 using DataTypeReturnReference = DataType&;
227 : VariableViewBase(command, var)
245 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
247 ARCANE_CHECK_AT(item.asInt32(), m_size);
248 return Accessor(this->m_values + item.asInt32());
252 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
254 ARCANE_CHECK_AT(item.asInt32(), m_size);
255 return Accessor(this->m_values + item.asInt32());
259 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
261 ARCANE_CHECK_AT(item.asInt32(), m_size);
262 return Accessor(this->m_values + item.asInt32());
266 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
268 ARCANE_CHECK_AT(item.asInt32(), m_size);
269 this->m_values[item.asInt32()] = v;
284template <
typename _ItemType,
typename _Accessor>
285class ItemPartialVariableScalarOutViewT
286:
public VariableViewBase
290 using DataType =
typename _Accessor::ValueType;
291 using Accessor = _Accessor;
292 using ItemType = _ItemType;
294 using DataTypeReturnReference = DataType&;
301 : VariableViewBase(command, var)
304 , m_table_view(table_view)
308 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
310 ARCANE_CHECK_AT(item.asInt32(), m_size);
311 return Accessor(this->m_values + item.asInt32());
315 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
317 ARCANE_CHECK_AT(item.asInt32(), m_size);
318 return Accessor(this->m_values + item.asInt32());
322 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
324 ARCANE_CHECK_AT(item.asInt32(), m_size);
325 return Accessor(this->m_values + item.asInt32());
329 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
331 ARCANE_CHECK_AT(item.asInt32(), m_size);
332 this->m_values[item.asInt32()] = v;
338 ARCCORE_HOST_DEVICE Accessor
operator[](ItemLocalIdType lid)
const
340 Int32 index = _toIndex(lid);
341 ARCANE_CHECK_AT(index, m_size);
342 return Accessor(m_values + index);
346 ARCCORE_HOST_DEVICE Accessor
operator()(ItemLocalIdType lid)
const
348 Int32 index = _toIndex(lid);
349 ARCANE_CHECK_AT(index, m_size);
350 return Accessor(m_values + index);
354 ARCCORE_HOST_DEVICE Accessor
value(ItemLocalIdType lid)
const
356 Int32 index = _toIndex(lid);
357 ARCANE_CHECK_AT(index, m_size);
358 return Accessor(m_values + index);
362 ARCCORE_HOST_DEVICE
void setValue(ItemLocalIdType lid,
const DataType& v)
const
364 Int32 index = _toIndex(lid);
365 ARCANE_CHECK_AT(index, m_size);
366 this->m_values[index] = v;
371 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
373 return m_table_view[lid];
392template <
typename _ItemType,
typename _DataType>
393class ItemVariableScalarInViewT
394:
public VariableViewBase
398 using ItemType = _ItemType;
399 using DataType = _DataType;
405 : VariableViewBase(command, var)
413 typename SimdTypeTraits<DataType>::SimdType
416 typedef typename SimdTypeTraits<DataType>::SimdType
SimdType;
421 typename SimdTypeTraits<DataType>::SimdType
424 typedef typename SimdTypeTraits<DataType>::SimdType
SimdType;
425 return SimdType(m_values.data() + simd_item.baseLocalId());
429 ARCCORE_HOST_DEVICE
const DataType&
operator[](IndexerType item)
const
431 return this->m_values[item.asInt32()];
435 ARCCORE_HOST_DEVICE
const DataType&
operator()(IndexerType item)
const
437 return this->m_values[item.asInt32()];
441 ARCCORE_HOST_DEVICE
const DataType&
value(IndexerType item)
const
443 return this->m_values[item.asInt32()];
457template <
typename _ItemType,
typename _DataType>
458class ItemPartialVariableScalarInViewT
459:
public VariableViewBase
463 using ItemType = _ItemType;
464 using DataType = _DataType;
472 : VariableViewBase(command, var)
474 , m_table_view(table_view)
480 ARCCORE_HOST_DEVICE
const DataType&
operator[](IndexerType item)
const
482 return m_values[item.asInt32()];
486 ARCCORE_HOST_DEVICE
const DataType&
operator()(IndexerType item)
const
488 return m_values[item.asInt32()];
492 ARCCORE_HOST_DEVICE
const DataType&
value(IndexerType item)
const
494 return m_values[item.asInt32()];
498 ARCCORE_HOST_DEVICE
const DataType&
operator[](ItemLocalIdType lid)
const
500 return m_values[_toIndex(lid)];
504 ARCCORE_HOST_DEVICE
const DataType&
operator()(ItemLocalIdType lid)
const
506 return m_values[_toIndex(lid)];
510 ARCCORE_HOST_DEVICE
const DataType&
value(ItemLocalIdType lid)
const
512 return m_values[_toIndex(lid)];
517 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
519 return m_table_view[lid];
537template <
typename _ItemType,
typename _DataType>
538class ItemPartialVariableArrayInViewT
539:
public VariableViewBase
543 using ItemType = _ItemType;
544 using DataType = _DataType;
552 : VariableViewBase(command, var)
554 , m_table_view(table_view)
560 return this->m_values[i.asInt32()];
566 return m_values[_toIndex(lid)];
572 return m_values[item.asInt32()][i];
578 return m_values[_toIndex(lid)][i];
584 return m_values[i.asInt32()];
590 return m_values[_toIndex(lid)];
595 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
597 return m_table_view[lid];
612template <
typename _ItemType,
typename _DataType>
613class ItemVariableArrayInViewT
614:
public VariableViewBase
622 using DataType = _DataType;
627 : VariableViewBase(command, var)
636 return this->m_values[i.asInt32()];
642 return this->m_values[item.asInt32()][i];
648 return this->m_values[i.asInt32()];
665template <
typename _ItemType,
typename _Accessor,
typename _Indexer>
666class ItemVariableArrayOutViewBaseT
667:
public VariableViewBase
671 using ItemType = _ItemType;
672 using Accessor = _Accessor;
673 using IndexerType = _Indexer;
674 using DataType =
typename Accessor::ValueType;
675 using DataTypeReturnType =
typename Accessor::DataTypeReturnReference;
680 : VariableViewBase(command, var)
685 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
687 return DataTypeReturnType(this->m_values[item.asInt32()]);
693 return this->m_values[item.asInt32()][i];
699 return DataTypeReturnType(this->m_values[item.asInt32()]);
713template <
typename _ItemType,
typename _Accessor>
714class ItemVariableArrayOutViewT
715:
public VariableViewBase
719 using ItemType = _ItemType;
720 using Accessor = _Accessor;
722 using DataType =
typename Accessor::ValueType;
723 using DataTypeReturnType =
typename Accessor::DataTypeReturnReference;
728 : VariableViewBase(command, var)
733 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
735 return DataTypeReturnType(this->m_values[item.asInt32()]);
741 return this->m_values[item.asInt32()][i];
747 return DataTypeReturnType(this->m_values[item.asInt32()]);
761template <
typename _ItemType,
typename _Accessor>
762class ItemPartialVariableArrayOutViewT
763:
public VariableViewBase
767 using ItemType = _ItemType;
768 using Accessor = _Accessor;
770 using DataType =
typename Accessor::ValueType;
771 using DataTypeReturnType =
typename Accessor::DataTypeReturnReference;
778 : VariableViewBase(command, var)
780 , m_table_view(table_view)
786 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](IndexerType item)
const
788 return DataTypeReturnType(m_values[item.asInt32()]);
794 return m_values[item.asInt32()][i];
800 return DataTypeReturnType(m_values[item.asInt32()]);
806 ARCCORE_HOST_DEVICE DataTypeReturnType
operator[](ItemLocalIdType lid)
const
808 return DataTypeReturnType(m_values[_toIndex(lid)]);
814 return m_values[_toIndex(lid)][i];
820 return DataTypeReturnType(m_values[_toIndex(lid)]);
825 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
827 return m_table_view[lid];
858template <
typename _ItemType,
typename _Accessor>
860:
public VariableViewBase
864 using ItemType = _ItemType;
865 using Accessor = _Accessor;
867 using DataType =
typename _Accessor::ValueType;
868 using DataTypeReturnReference = DataType&;
874 : VariableViewBase(command, var)
904 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
906 ARCANE_CHECK_AT(item.asInt32(), m_size);
907 return Accessor(m_values + item.asInt32());
911 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
913 ARCANE_CHECK_AT(item.asInt32(), m_size);
914 return Accessor(m_values + item.asInt32());
918 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
920 ARCANE_CHECK_AT(item.asInt32(), m_size);
921 return Accessor(m_values + item.asInt32());
925 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
927 ARCANE_CHECK_AT(item.asInt32(), m_size);
928 this->m_values[item.asInt32()] = v;
940template <
typename _ItemType,
typename _Accessor>
942:
public VariableViewBase
946 using ItemType = _ItemType;
947 using Accessor = _Accessor;
949 using DataType =
typename _Accessor::ValueType;
950 using DataTypeReturnReference = DataType&;
958 : VariableViewBase(command, var)
961 , m_table_view(table_view)
967 ARCCORE_HOST_DEVICE Accessor
operator[](IndexerType item)
const
969 ARCANE_CHECK_AT(item.asInt32(), m_size);
970 return Accessor(this->m_values + item.asInt32());
974 ARCCORE_HOST_DEVICE Accessor
operator()(IndexerType item)
const
976 ARCANE_CHECK_AT(item.asInt32(), m_size);
977 return Accessor(this->m_values + item.asInt32());
981 ARCCORE_HOST_DEVICE Accessor
value(IndexerType item)
const
983 ARCANE_CHECK_AT(item.asInt32(), m_size);
984 return Accessor(this->m_values + item.asInt32());
988 ARCCORE_HOST_DEVICE
void setValue(IndexerType item,
const DataType& v)
const
990 ARCANE_CHECK_AT(item.asInt32(), m_size);
991 this->m_values[item.asInt32()] = v;
997 ARCCORE_HOST_DEVICE Accessor
operator[](ItemLocalIdType lid)
const
999 Int32 index = _toIndex(lid);
1000 ARCANE_CHECK_AT(index, m_size);
1001 return Accessor(m_values + index);
1005 ARCCORE_HOST_DEVICE Accessor
operator()(ItemLocalIdType lid)
const
1007 Int32 index = _toIndex(lid);
1008 ARCANE_CHECK_AT(index, m_size);
1009 return Accessor(m_values + index);
1013 ARCCORE_HOST_DEVICE Accessor
value(ItemLocalIdType lid)
const
1015 Int32 index = _toIndex(lid);
1016 ARCANE_CHECK_AT(index, m_size);
1017 return Accessor(m_values + index);
1021 ARCCORE_HOST_DEVICE
void setValue(ItemLocalIdType lid,
const DataType& v)
const
1023 Int32 index = _toIndex(lid);
1024 ARCANE_CHECK_AT(index, m_size);
1025 m_values[index] = v;
1030 ARCCORE_HOST_DEVICE
Int32 _toIndex(ItemLocalIdType lid)
const
1032 return m_table_view[lid];
1037 DataType* m_values =
nullptr;
1051template <
typename DataType>
auto
1054 using Accessor = DataViewSetter<DataType>;
1061template <
typename ItemType,
typename DataType>
auto
1064 using Accessor = DataViewSetter<DataType>;
1071template <
typename ItemType,
typename DataType>
auto
1074 using Accessor = DataViewSetter<DataType>;
1082template <
typename ItemType>
auto
1085 using Accessor = DataViewSetter<Real3>;
1092template <
typename ItemType>
auto
1095 using Accessor = DataViewSetter<Real3>;
1103template <
typename ItemType>
auto
1106 using Accessor = DataViewSetter<Real2>;
1113template <
typename ItemType>
auto
1116 using Accessor = DataViewSetter<Real2>;
1124template <
typename ItemType,
typename DataType>
auto
1134template <
typename ItemType,
typename DataType>
auto
1148template <
typename DataType>
auto
1151 using Accessor = DataViewGetterSetter<DataType>;
1158template <
typename ItemType,
typename DataType>
auto
1161 using Accessor = DataViewGetterSetter<DataType>;
1168template <
typename ItemType,
typename DataType>
auto
1171 using Accessor = DataViewGetterSetter<DataType>;
1178template <
typename ItemType>
auto
1181 using Accessor = DataViewGetterSetter<Real3>;
1188template <
typename ItemType>
auto
1191 using Accessor = DataViewGetterSetter<Real3>;
1199template <
typename ItemType>
auto
1202 using Accessor = DataViewGetterSetter<Real2>;
1209template <
typename ItemType>
auto
1212 using Accessor = DataViewGetterSetter<Real2>;
1220template <
typename ItemType,
typename DataType>
auto
1230template <
typename ItemType,
typename DataType>
auto
1244template <
typename ItemType,
typename DataType>
auto
1253template <
typename ItemType,
typename DataType>
auto
1262template <
typename DataType>
auto
1271template <
typename ItemType,
typename DataType>
auto
1280template <
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[](IndexerType i) const
Access operator for 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 DataType & operator()(ItemLocalIdType lid, Int32 i) const
Access operator for the i-th value of entity item.
__host__ __device__ const SmallSpan< const DataType > value(IndexerType i) const
Access operator for entity item.
Write-only view on a partial array variable of the mesh.
__host__ __device__ DataTypeReturnType operator[](ItemLocalIdType lid) const
Access operator for local ID entity lid.
__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__ SmallSpan< DataType > value(ItemLocalIdType lid) const
Access operator for the i-th value of 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__ void setValue(IndexerType item, 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__ void setValue(ItemLocalIdType lid, const DataType &v) const
Sets the value for entity item at v.
__host__ __device__ Accessor value(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ Accessor operator()(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__ Accessor operator()(IndexerType item) const
Access operator for entity item.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for entity item.
Read view on a partial scalar variable of the mesh.
__host__ __device__ const DataType & operator()(ItemLocalIdType lid) const
Access operator for entity item.
__host__ __device__ const DataType & operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ const DataType & value(IndexerType item) 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 & operator()(IndexerType item) const
Access operator for entity item.
Write view on a partial scalar variable of the mesh.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for the entity item.
__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()(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__ 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.
__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 > 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()(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.
ItemVariableRealNScalarOutViewT(const ViewBuildInfo &command, IVariable *var, SmallSpan< DataType > v)
Constructs the view.
SimdDirectSetter< DataType > operator()(SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
SimdDirectSetter< DataType > operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator without indirection.
__host__ __device__ Accessor operator()(IndexerType item) const
Access operator for entity item.
__host__ __device__ Accessor value(IndexerType item) const
Access operator for entity item.
SimdSetter< DataType > operator()(SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ Accessor operator[](IndexerType item) const
Access operator for entity item.
__host__ __device__ void setValue(IndexerType item, const DataType &v) const
Positions the value for entity item at v.
SimdSetter< DataType > operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
Read view on a scalar variable of the mesh.
SimdTypeTraits< DataType >::SimdType operator[](SimdItemIndexT< 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 & operator()(IndexerType item) const
Access operator for the entity item.
SimdTypeTraits< DataType >::SimdType operator[](SimdItemDirectIndexT< ItemType > simd_item) const
Vector access operator with indirection.
__host__ __device__ const DataType & 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.
__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.
SimdSetter< DataType > operator[](SimdItemIndexT< ItemType > simd_item) const
Vector access operator with indirection.
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.
Write view on a scalar variable of the mesh.
__host__ __device__ Accessor value(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 operator()(IndexerType item) const
Access operator for the entity item.
__host__ __device__ Accessor operator[](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.
Characteristics of mesh elements.
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.
Object allowing positioning of values in a SIMD vector.
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.