Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
VariableViews.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/* VariableViews.cc (C) 2000-2024 */
9/* */
10/* Gestion des vues sur les variables pour les accélérateurs. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
15
16#include "arcane/accelerator/core/RunCommand.h"
17#include "arcane/accelerator/core/RunQueue.h"
18#include "arcane/accelerator/core/internal/RunQueueImpl.h"
19#include "arcane/accelerator/core/internal/IRunQueueStream.h"
20
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34namespace Arcane::Accelerator
35{
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40VariableViewBase::
41VariableViewBase(const ViewBuildInfo& vbi, IVariable* var)
42{
43 impl::RunQueueImpl* q = vbi._internalQueue();
44 if (q->isAutoPrefetchCommand()) {
45 RunQueue rq(q);
46 VariableUtils::prefetchVariableAsync(var, &rq);
47 }
48}
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53} // namespace Arcane::Accelerator
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
Fonctions utilitaires sur les variables.
Espace de nom pour l'utilisation des accélérateurs.