12#ifndef ARCANE_CORE_VARIABLEARRAY_H
13#define ARCANE_CORE_VARIABLEARRAY_H
17#include "arcane/core/Variable.h"
56 static ARCANE_CORE_EXPORT ThatClass* getReference(
IVariable* var);
67 ARCCORE_DEPRECATED_2021(
"use valueView() instead")
70 ConstArrayView<T> valueView()
const {
return m_value->
view(); }
71 ArrayView<T> valueView() {
return m_value->view(); }
73 ARCANE_CORE_EXPORT
Integer capacity();
79 void print(std::ostream& o)
const override;
83 const IData*
data()
const override {
return m_value; }
85 virtual void fill(
const T& v);
86 virtual void fill(
const T& v,
const ItemGroup& item_group);
90 ARCANE_CORE_EXPORT
void swapValues(ThatClass& rhs);
91 ValueDataType* trueData() {
return m_value; }
95 void _internalResize(
const VariableResizeArgs& resize_args)
override;
100 ValueDataType* m_value;
Base class for 1D data vectors.
Constant view of an array of type T.
virtual ConstArrayView< DataType > view() const =0
Constant view on the data.
Interface of a data item.
Unicode character string.
VariableArrayT(const VariableBuildInfo &v, const VariableInfo &vi)
Construit une variable basée sur la référence v.
void copyItemsMeanValues(Int32ConstArrayView first_source, Int32ConstArrayView second_source, Int32ConstArrayView destination) override
Copies the mean values of entities numbered first_source and second_source into entities numbered des...
void synchronize(Int32ConstArrayView local_ids) override
Synchronizes the variable on a list of entities.
void shrinkMemory() override
Frees any additional memory allocated for the data.
Integer nbElement() const override
Number of elements of the variable.
void compact(Int32ConstArrayView old_to_new_ids) override
Compresses the variable's values.
bool initialize(const ItemGroup &group, const String &value) override
Initializes the variable.
void copyItemsValues(Int32ConstArrayView source, Int32ConstArrayView destination) override
Copies the values of entities numbered source into entities numbered destination.
void setIsSynchronized(const ItemGroup &item_group) override
Indicates that the variable is synchronized on the group item_group.
const IData * data() const override
Data associated with the variable.
IData * data() override
Data associated with the variable.
VariableComparerResults _compareVariable(const VariableComparerArgs &compare_args) final
Comparison of values between variables.
void print(std::ostream &o) const override
Prints the variable's values to the stream o.
void setIsSynchronized() override
Indicates that the variable is synchronized.
Real allocatedMemory() const override
Memory size (in Bytes) used by the variable.
void synchronize() override
Synchronizes the variable.
Parameters necessary for building a variable.
Arguments for VariableComparer methods.
Results of a comparison operation.
Information characterizing a variable.
Variable(const VariableBuildInfo &v, const VariableInfo &vi)
Creates a variable linked to the reference v.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
double Real
Type representing a real number.