12#ifndef ARCANE_CORE_MATERIALS_INTERNAL_IMESHMATERIALVARIABLEINTERNAL_H
13#define ARCANE_CORE_MATERIALS_INTERNAL_IMESHMATERIALVARIABLEINTERNAL_H
18#include "arcane/core/materials/MaterialsCoreGlobal.h"
19#include "arcane/accelerator/core/RunQueue.h"
34struct ARCANE_CORE_EXPORT CopyBetweenDataInfo
41 , m_data_size(data_size)
48 Int32 m_data_size = 0;
54class ARCANE_CORE_EXPORT VariableIndexerCommonArgs
58 VariableIndexerCommonArgs(
Int32 var_index,
const RunQueue& queue)
59 : m_var_index(var_index)
67 Int32 data_size)
const
75 bool isUseOneCommand()
const {
return m_copy_data; }
79 Int32 m_var_index = -1;
91class ARCANE_CORE_EXPORT CopyBetweenPartialAndGlobalArgs
92:
public VariableIndexerCommonArgs
96 CopyBetweenPartialAndGlobalArgs(
Int32 var_index,
100 bool is_global_to_partial,
102 : VariableIndexerCommonArgs(var_index, queue)
103 , m_local_ids(local_ids)
104 , m_indexes_in_multiple(indexes_in_multiple)
105 , m_do_copy_between_partial_and_pure(do_copy)
106 , m_is_global_to_partial(is_global_to_partial)
113 bool m_do_copy_between_partial_and_pure =
true;
114 bool m_is_global_to_partial =
false;
115 bool m_use_generic_copy =
false;
124class ARCANE_CORE_EXPORT InitializeWithZeroArgs
125:
public VariableIndexerCommonArgs
131 : VariableIndexerCommonArgs(var_index, queue)
132 , m_indexes_in_multiple(indexes_in_multiple)
146class ARCANE_CORE_EXPORT ResizeVariableIndexerArgs
147:
public VariableIndexerCommonArgs
151 ResizeVariableIndexerArgs(
Int32 var_index,
const RunQueue& queue)
152 : VariableIndexerCommonArgs(var_index, queue)
Declarations of types on entities.
Execution queue for an accelerator.
Constant view of an array of type T.
Interface of a data item.
Helper class for building a list of ComponentItems for a MeshMaterialVariableIndexer.
Arguments for methods copying between partial and global values.
Interface of a component (material or environment) of a mesh.
Arcane internal API for 'IMeshMaterialVariable'.
virtual void syncReferences(bool check_resize)=0
Synchronizes references.
virtual ConstArrayView< VariableRef * > variableReferenceList() const =0
List of 'VariableRef' associated with this variable.
virtual void copyFromBuffer(SmallSpan< const MatVarIndex > matvar_indexes, Span< const std::byte > bytes, RunQueue *queue)=0
Copies the variable values from a buffer.
virtual Int32 dataTypeSize() const =0
Byte size to save a variable value.
virtual void restoreData(IMeshComponent *component, IData *data, Integer data_index, Int32ConstArrayView ids, bool allow_null_id)=0
virtual void resizeForIndexer(ResizeVariableIndexerArgs &args)=0
Resizes the partial value associated with index index.
virtual void saveData(IMeshComponent *component, IData *data)=0
virtual void copyToBuffer(SmallSpan< const MatVarIndex > matvar_indexes, Span< std::byte > bytes, RunQueue *queue) const =0
Copies the variable values into a buffer.
virtual void copyBetweenPartialAndGlobal(const CopyBetweenPartialAndGlobalArgs &args)=0
virtual void initializeNewItemsWithZero(InitializeWithZeroArgs &args)=0
Initialize the values of new components with zero.
virtual Ref< IData > internalCreateSaveDataRef(Integer nb_value)=0
Arguments for methods copying between partial and global values.
Arguments for methods copying between partial and global values.
UniqueArray< CopyBetweenDataInfo > * m_copy_data
Copy information if only one command is used.
Reference to an instance.
View of an array of elements of type T.
View of an array of elements of type T.
1D data vector with value semantics (STL style).
Always enables tracing in Arcane parts concerning materials.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.
Information for copying between two memory regions.