Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IRunQueueStream.h
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/* IRunQueueStream.h (C) 2000-2026 */
9/* */
10/* Interface of an execution stream for a RunQueue. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_COMMON_ACCELERATOR_IRUNQUEUESTREAM_H
13#define ARCCORE_COMMON_ACCELERATOR_IRUNQUEUESTREAM_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/common/accelerator/CommonAcceleratorGlobal.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Accelerator::Impl
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
32class ARCCORE_COMMON_EXPORT IRunQueueStream
33{
34 public:
35
36 virtual ~IRunQueueStream() = default;
37
38 public:
39
41 virtual void notifyBeginLaunchKernel(RunCommandImpl& command) = 0;
42
48 virtual void notifyEndLaunchKernel(RunCommandImpl& command) = 0;
49
57 virtual void barrier() = 0;
58
60 virtual void copyMemory(const MemoryCopyArgs& args) = 0;
61
63 virtual void prefetchMemory(const MemoryPrefetchArgs& args) = 0;
64
65 public:
66
69
71 virtual bool _barrierNoException() = 0;
72
74 virtual void _setSyclLastCommandEvent([[maybe_unused]] void* sycl_event_ptr) {}
75};
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80} // namespace Arcane::Accelerator::Impl
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85#endif
Interface of an execution stream for a RunQueue.
virtual bool _barrierNoException()=0
Barrier without exception. Returns true in case of error.
virtual void prefetchMemory(const MemoryPrefetchArgs &args)=0
Performs a prefetch of a memory region.
virtual void notifyEndLaunchKernel(RunCommandImpl &command)=0
Notification of command launch completion.
virtual void barrier()=0
Blocks until all actions associated with this queue are finished.
virtual void _setSyclLastCommandEvent(void *sycl_event_ptr)
For SYCL, positions the event associated with the last executed command.
virtual void notifyBeginLaunchKernel(RunCommandImpl &command)=0
Notification before command launch.
virtual void copyMemory(const MemoryCopyArgs &args)=0
Performs a copy between two memory regions.
virtual Impl::NativeStream nativeStream()=0
Pointer to the internal structure dependent on the implementation.