Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
NumArrayViews.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* NumArrayViews.cc (C) 2000-2024 */
9/* */
10/* Gestion des vues sur les 'NumArray' pour les accélérateurs. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
15
16#include "arcane/utils/MemoryView.h"
17
18#include "arcane/accelerator/core/RunCommand.h"
19#include "arcane/accelerator/core/Memory.h"
20#include "arcane/accelerator/core/internal/RunQueueImpl.h"
21#include "arcane/accelerator/core/internal/IRunQueueStream.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34namespace Arcane::Accelerator
35{
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40NumArrayViewBase::
41NumArrayViewBase(const ViewBuildInfo& vbi, Span<const std::byte> bytes)
42{
43 impl::RunQueueImpl* q = vbi._internalQueue();
44 if (q->isAutoPrefetchCommand()) {
45 ConstMemoryView mem_view(bytes);
46 q->prefetchMemory(MemoryPrefetchArgs(mem_view).addAsync());
47 }
48}
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53} // namespace Arcane::Accelerator
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
Espace de nom pour l'utilisation des accélérateurs.