14#include "arcane/core/internal/VariableUtilsInternal.h"
16#include "arcane/utils/ArrayView.h"
17#include "arcane/utils/MemoryView.h"
19#include "arcane/core/IVariable.h"
20#include "arcane/core/IData.h"
21#include "arcane/core/internal/IDataInternal.h"
23#include "arcane/accelerator/core/RunQueue.h"
34bool VariableUtilsInternal::
35fillFloat64Array(IVariable* v, ArrayView<double> values)
37 IData* var_data = v->data();
38 auto* true_data =
dynamic_cast<IArrayDataT<double>*
>(var_data);
42 ArrayView<Real> var_values(true_data->view());
43 values.copy(var_values);
50bool VariableUtilsInternal::
51setFromFloat64Array(IVariable* v, ConstArrayView<double> values)
53 return setFromMemoryBuffer(v, ConstMemoryView(values));
59bool VariableUtilsInternal::
60setFromMemoryBuffer(IVariable* v, ConstMemoryView mem_view)
62 INumericDataInternal* num_data = v->data()->_commonInternal()->numericData();
66 impl::copyContiguousData(num_data, mem_view, queue);
73IDataInternal* VariableUtilsInternal::
74getDataInternal(IVariable* v)
76 return v->data()->_commonInternal();
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-