12#ifndef ARCANE_ACCELERATOR_CORE_RUNQUEUE_H
13#define ARCANE_ACCELERATOR_CORE_RUNQUEUE_H
17#include "arcane/utils/AutoRef.h"
19#include "arcane/accelerator/core/RunCommand.h"
61 friend class impl::CudaUtils;
62 friend class impl::HipUtils;
63 friend class impl::SyclUtils;
72 explicit ScopedAsync(
RunQueue* queue)
77 m_is_async = m_queue->isAsync();
78 m_queue->setAsync(
true);
81 ~ScopedAsync()
noexcept(
false)
85 m_queue->setAsync(m_is_async);
91 bool m_is_async =
false;
103 ARCANE_DEPRECATED_REASON(
"Y2024: Use makeQueue(runner) instead")
104 explicit
RunQueue(const Runner& runner);
106 ARCANE_DEPRECATED_REASON(
"Y2024: Use makeQueue(runner,bi) instead")
135 void setAsync(
bool v);
137 bool isAsync()
const;
147 const RunQueue& addAsync(
bool is_async)
const;
150 void barrier()
const;
211 void setConcurrentCommandCreation(
bool v);
213 bool isConcurrentCommandCreation()
const;
229 ARCANE_DEPRECATED_REASON(
"Y2024: Use toCudaNativeStream(), toHipNativeStream() or toSyclNativeStream() instead")
230 void* platformStream() const;
236 return q1.m_p.get() == q2.m_p.get();
240 return q1.m_p.
get() != q2.m_p.
get();
245 impl::RunQueueImpl* _internalImpl()
const;
252 RunQueue(
const Runner& runner,
bool);
254 RunQueue(
const Runner& runner,
const RunQueueBuildInfo& bi,
bool);
255 explicit RunQueue(impl::RunQueueImpl* p);
259 impl::IRunnerRuntime* _internalRuntime()
const;
260 impl::IRunQueueStream* _internalStream()
const;
261 impl::RunCommandImpl* _getCommandImpl()
const;
262 impl::NativeStream _internalNativeStream()
const;
263 void _checkNotNull()
const;
266 friend class VariableViewBase;
267 friend class NumArrayViewBase;
271 AutoRef2<impl::RunQueueImpl> m_p;
285 run_queue._checkNotNull();
286 return RunCommand(run_queue);
296 run_queue->_checkNotNull();
297 return RunCommand(*run_queue);
#define ARCANE_CHECK_POINTER(ptr)
Macro retournant le pointeur ptr s'il est non nul ou lancant une exception s'il est nul.
Arguments pour la copie mémoire.
Arguments pour le préfetching mémoire.
Gestion d'une commande sur accélérateur.
Informations pour créer une RunQueue.
Evènement pour une file d'exécution.
File d'exécution pour un accélérateur.
friend RunCommand makeCommand(const RunQueue &run_queue)
Créé une commande associée à la file run_queue.
RunQueue()
Créé une file nulle.
bool isNull() const
Indique si la RunQueue est nulle.
T * get() const
Retourne l'objet référé par l'instance.
Options pour configurer les allocations.
Référence à une instance.
Espace de nom pour l'utilisation des accélérateurs.
RunCommand makeCommand(const RunQueue &run_queue)
Créé une commande associée à la file run_queue.
eExecutionPolicy
Politique d'exécution pour un Runner.
bool isAcceleratorPolicy(eExecutionPolicy exec_policy)
Indique si exec_policy correspond à un accélérateur.
Arcane::eMemoryResource eMemoryRessource
Typedef pour la version Arcane historique (avec 2's')