14#include "arcane/materials/internal/ConstituentModifierWorkInfo.h"
16#include "arcane/materials/internal/MaterialModifierOperation.h"
27ConstituentModifierWorkInfo::
28ConstituentModifierWorkInfo(
const MemoryAllocationOptions& opts,
eMemoryRessource mem)
29: pure_local_ids(opts.allocator())
30, partial_indexes(opts.allocator())
31, cells_changed_in_env(opts)
32, cells_unchanged_in_env(opts)
33, m_saved_matvar_indexes(opts.allocator())
34, m_saved_local_ids(opts.allocator())
35, m_cells_current_nb_material(opts)
36, m_cells_is_partial(mem)
37, m_removed_local_ids_filter(mem)
38, m_cells_to_transform(mem)
40 cells_changed_in_env.setDebugName(
"WorkInfoCellsChangedInEnv");
41 cells_unchanged_in_env.setDebugName(
"WorkInfoCellsUnchangedInEnv");
47void ConstituentModifierWorkInfo::
48initialize(Int32 max_local_id, Int32 nb_material, Int32 nb_environment, RunQueue& queue)
50 m_is_materials_modified.resizeHost(nb_material);
51 m_is_environments_modified.resizeHost(nb_environment);
52 m_cells_to_transform.resize(max_local_id);
53 m_cells_to_transform.fill(
false, &queue);
54 m_removed_local_ids_filter.resize(max_local_id);
55 m_removed_local_ids_filter.fill(
false, &queue);
57 m_saved_matvar_indexes.resizeHost(max_local_id);
58 m_saved_local_ids.resizeHost(max_local_id);
61 if (queue.isAcceleratorPolicy())
62 m_variables_copy_data = NumArray<CopyBetweenDataInfo, MDDim1>(eMemoryRessource::Device);
68void ConstituentModifierWorkInfo::
69setRemovedCells(ConstArrayView<Int32> local_ids,
bool value)
72 for (Int32 lid : local_ids)
73 m_removed_local_ids_filter[lid] = value;
79void ConstituentModifierWorkInfo::
80setCurrentOperation(MaterialModifierOperation* operation)
82 m_is_add = operation->isAdd();
Active toujours les traces dans les parties Arcane concernant les matériaux.
eMemoryRessource
Liste des ressources mémoire disponibles.