Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
DualUniqueArray.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* DualUniqueArray.cc (C) 2000-2024 */
9/* */
10/* 1D array allocated on both the CPU and the accelerator. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/DualUniqueArray.h"
15
16#include "arcane/utils/MemoryView.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28void DualUniqueArrayBase::
29_memoryCopy(Span<const std::byte> from, Span<std::byte> to)
30{
31 MemoryUtils::copy(MutableMemoryView(to), ConstMemoryView(from));
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37} // namespace Arcane
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
Memory and allocator management functions.
View of an array of elements of type T.
Definition Span.h:635
void copy(MutableMemoryView destination, eMemoryResource destination_mem, ConstMemoryView source, eMemoryResource source_mem, const RunQueue *queue=nullptr)
Copies source to destination using the queue queue.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --