14#include "arccore/common/accelerator/RunCommand.h"
16#include "arccore/common/ArraySimdPadder.h"
18#include "arccore/common/accelerator/RunQueue.h"
19#include "arccore/common/accelerator/NativeStream.h"
20#include "arccore/common/accelerator/internal/RunQueueImpl.h"
21#include "arccore/common/accelerator/internal/ReduceMemoryImpl.h"
22#include "arccore/common/accelerator/internal/RunCommandImpl.h"
23#include "arccore/common/accelerator/internal/IRunQueueStream.h"
36: m_p(run_queue._getCommandImpl())
38 m_p->m_has_living_run_command =
true;
47 m_p->m_has_living_run_command =
false;
48 m_p->_notifyDestroyRunCommand();
59executionPolicy()
const
61 return m_p->m_execution_policy;
70 return m_p->traceInfo();
79 return m_p->kernelName();
86nbThreadPerBlock()
const
88 return m_p->m_nb_thread_per_block;
94RunCommand& RunCommand::
97 m_p->m_trace_info = ti;
104RunCommand& RunCommand::
105addKernelName(
const String& v)
107 m_p->m_kernel_name = v;
114RunCommand& RunCommand::
115addNbThreadPerBlock(
Int32 v)
121 m_p->m_nb_thread_per_block = v;
128RunCommand& RunCommand::
132 if (m_p->m_use_accelerator) {
135 m_p->m_nb_stride = v;
146 m_p->m_parallel_loop_options = opt;
153parallelLoopOptions()
const
155 return m_p->m_parallel_loop_options;
161extern "C++" ARCCORE_COMMON_EXPORT RunCommand&
171_internalNativeStream()
const
173 return m_p->internalStream()->nativeStream();
179Impl::RunQueueImpl* RunCommand::
180_internalQueueImpl()
const
188Impl::RunCommandImpl* RunCommand::
189_internalCreateImpl(Impl::RunQueueImpl* queue)
191 return new Impl::RunCommandImpl(queue);
198_internalDestroyImpl(Impl::RunCommandImpl* p)
207_allocateReduceMemory(Int32 nb_grid)
209 auto& mem_list = m_p->m_active_reduce_memory_list;
210 if (!mem_list.empty()) {
211 for (
auto& x : mem_list)
212 x->setGridSizeAndAllocate(nb_grid);
220_internalNotifyBeginLaunchKernel()
222 m_p->notifyBeginLaunchKernel();
229_internalNotifyEndLaunchKernel()
231 m_p->notifyEndLaunchKernel();
238_internalNotifyBeginLaunchKernelSyclEvent(
void* sycl_event_ptr)
240 m_p->notifyLaunchKernelSyclEvent(sycl_event_ptr);
246ForLoopOneExecStat* RunCommand::
247_internalCommandExecStat()
249 return m_p->m_loop_one_exec_stat_ptr;
256_addSharedMemory(Int32 size)
258 Int32 current_size = m_p->m_shared_memory_size;
259 m_p->m_shared_memory_size += ArraySimdPadder::getSizeWithSpecificPadding<16>(size);
269 return m_p->m_shared_memory_size;
278 return m_p->m_nb_stride;
Opaque type to encapsulate a native 'stream'.
friend RunCommand & operator<<(RunCommand &command, const TraceInfo &trace_info)
Displaying command information.
RunCommand & addTraceInfo(const TraceInfo &ti)
Sets the trace information.
Execution queue for an accelerator.
Execution options for a parallel loop in multi-threading.
Unicode character string.
Namespace for accelerator usage.
eExecutionPolicy
Execution policy for a Runner.
std::int32_t Int32
Signed integer type of 32 bits.