12#ifndef ARCANE_MATERIALS_ALLCELLTOALLENVCELLCONVERTER_H
13#define ARCANE_MATERIALS_ALLCELLTOALLENVCELLCONVERTER_H
19#include "arcane/core/materials/MatItem.h"
21#include "arcane/core/materials/CellToAllEnvCellConverter.h"
55 friend class CellToAllEnvCellAccessor;
56 friend class CellToAllComponentCellEnumerator;
57 friend AllCellToAllEnvCellContainer;
64 return m_allcell_allenvcell_ptr[cell_id];
87 friend class CellToAllComponentCellEnumerator;
91 using size_type = Span<ComponentItemLocalId>::size_type;
95 CellToAllEnvCellAccessor() =
default;
98 ARCCORE_HOST_DEVICE size_type nbEnvironment(
Int32 cid)
const
100 return m_cell_allenvcell[cid].size();
107 return m_cell_allenvcell;
120 friend class EnumeratorTracer;
124 using index_type = Span<ComponentItemLocalId>::index_type;
125 using size_type = Span<ComponentItemLocalId>::size_type;
133 m_ptr = all_env_view[cell_id];
135 ARCCORE_HOST_DEVICE
void operator++()
140 ARCCORE_HOST_DEVICE
bool hasNext()
const
142 return m_index < m_ptr.size();
145 ARCCORE_HOST_DEVICE ComponentItemLocalId
operator*()
const
147 return m_ptr[m_index];
152 index_type m_index = 0;
169#define RUNCOMMAND_ENUMERATE_CELL_ALLENVCELL(cell_to_allenvcellaccessor, iter_name, cell_group) \
170 A_FUNCINFO << cell_group << [=] ARCCORE_HOST_DEVICE(CellLocalId iter_name)
176#define A_ENUMERATE_CELL_ALLCOMPONENTCELL(_EnumeratorClassName, iname, cid, cell_to_allenvcellaccessor) \
177 for (A_TRACE_COMPONENT(_EnumeratorClassName) iname(::Arcane::Materials::_EnumeratorClassName(cid, cell_to_allenvcellaccessor) A_TRACE_ENUMERATOR_WHERE); iname.hasNext(); ++iname)
193#define ENUMERATE_CELL_ALLENVCELL(iname, cid, cell_to_allenvcellaccessor) \
194 A_ENUMERATE_CELL_ALLCOMPONENTCELL(CellToAllComponentCellEnumerator, iname, cid, cell_to_allenvcellaccessor)
Connectivity table from 'Cell' to its 'AllEnvCell' intended for use on accelerator.
Encapsulation class to access the equivalent connectivity cell -> allenvcell. Intended to be used wit...
Interface for the material and environment manager of a mesh.
View of an array of elements of type T.
Always enables tracing in Arcane parts concerning materials.
class ARCANE_MATERIALS_EXPORT(64) SimdMatVarIndex
SIMD indexer on a component.
Real2 operator*(Real sca, const Real2Proxy &vec)
Multiplication by a scalar.
std::int32_t Int32
Signed integer type of 32 bits.