14#include "arcane/utils/NumArray.h"
16#include "arcane/utils/FatalErrorException.h"
17#include "arcane/utils/MemoryView.h"
18#include "arcane/utils/MemoryUtils.h"
29MemoryAllocationOptions NumArrayBaseCommon::
38MemoryAllocationOptions NumArrayBaseCommon::
41 return MemoryUtils::getAllocationOptions(r);
47void NumArrayBaseCommon::
52 ARCANE_FATAL(
"Invalid access from '{0}' ressource memory to host memory", (
int)r);
58void NumArrayBaseCommon::
62 MemoryUtils::copy(MutableMemoryView(to), to_mem, ConstMemoryView(from), from_mem, queue);
68void NumArrayBaseCommon::
69_memoryAwareFill(Span<std::byte> to,
Int64 nb_element,
const void* fill_address,
70 Int32 datatype_size, SmallSpan<const Int32> indexes, RunQueue* queue)
72 ConstMemoryView fill_value_view(makeConstMemoryView(fill_address, datatype_size, 1));
73 MutableMemoryView destination(makeMutableMemoryView(to.data(), datatype_size, nb_element));
74 destination.fillIndexes(fill_value_view, indexes, queue);
80void NumArrayBaseCommon::
81_memoryAwareFill(Span<std::byte> to,
Int64 nb_element,
const void* fill_address,
82 Int32 datatype_size, RunQueue* queue)
84 ConstMemoryView fill_value_view(makeConstMemoryView(fill_address, datatype_size, 1));
85 MutableMemoryView destination(makeMutableMemoryView(to.data(), datatype_size, nb_element));
86 destination.fill(fill_value_view, queue);
100template class NumArray<Real, MDDim4>;
101template class NumArray<Real, MDDim3>;
102template class NumArray<Real, MDDim2>;
103template class NumArray<Real, MDDim1>;
105template class ArrayStridesBase<1>;
106template class ArrayStridesBase<2>;
107template class ArrayStridesBase<3>;
108template class ArrayStridesBase<4>;
112 template class NumArrayContainer<Real>;
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eMemoryRessource
Liste des ressources mémoire disponibles.
@ UnifiedMemory
Alloue en utilisant la mémoire unifiée.