20 template<alpaka::concepts::Api T_Api, alpaka::concepts::DeviceKind T_DeviceKind>
23 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
35 internal::MakeQueue::Op<
ALPAKA_TYPEOF(*std::declval<DeviceInterface>().
get()), T_QueueKind>{}(
36 *std::declval<DeviceInterface>().get(),
44 template<
typename T_Queue>
56 return alpaka::internal::getApi(*m_queue.get());
66 return alpaka::internal::getDeviceKind(this->
getDevice());
71 static_assert(internal::concepts::Queue<element_type>);
76 return alpaka::internal::GetName::Op<std::decay_t<
decltype(*m_queue.get())>>{}(*m_queue.get());
81 return internal::getNativeHandle(*m_queue.get());
86 return this->
get() == other.get();
91 return this->
get() != other.get();
118 launchCfg.getNumFrames(),
119 launchCfg.getFrameExtents(),
121 internal::enqueue(*m_queue.get(), frameSpecWithExecutor, kernelBundle);
128 launchCfg.getNumBlocks(),
129 launchCfg.getNumThreads(),
131 internal::enqueue(*m_queue.get(), threadSpecWithExecutor, kernelBundle);
135 internal::enqueue(*m_queue.get(), launchCfg, kernelBundle);
218 internal::waitFor(*m_queue.get(), *event.get());
232 return internal::isQueueEmpty(*m_queue.get());
236 template<
typename T_Queue, alpaka::concepts::QueueKind T_QueueKind>
239 ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval<T_Queue>())),
240 ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval<T_Queue>()))>,
256 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
269 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
276 Vec const extentsVec = extents;
277 internal::Memcpy::Op<
278 std::decay_t<
decltype(*queue.get())>,
279 std::decay_t<
decltype(dest)>,
280 std::decay_t<
decltype(source)>,
281 std::decay_t<
decltype(extentsVec)>>{}(*queue.get(),
ALPAKA_FORWARD(dest), source, extentsVec);
290 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind,
typename T_Storage,
typename T>
293 onAcc::internal::GlobalDeviceMemoryWrapper<T_Storage, T> dest,
296 internal::MemcpyDeviceGlobal::Op<
297 std::decay_t<
decltype(*queue.get())>,
298 onAcc::internal::GlobalDeviceMemoryWrapper<T_Storage, T>,
299 std::decay_t<
decltype(source)>>{}(*queue.get(), dest,
ALPAKA_FORWARD(source));
308 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind,
typename T_Storage,
typename T>
312 onAcc::internal::GlobalDeviceMemoryWrapper<T_Storage, T> source)
314 internal::MemcpyDeviceGlobal::Op<
315 std::decay_t<
decltype(*queue.get())>,
316 std::decay_t<
decltype(dest)>,
317 onAcc::internal::GlobalDeviceMemoryWrapper<T_Storage, T>>{}(*queue.get(),
ALPAKA_FORWARD(dest), source);
328 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
343 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
350 Vec const extentsVec = extents;
351 internal::Memset::Op<
352 std::decay_t<
decltype(*queue.get())>,
353 std::decay_t<
decltype(dest)>,
354 std::decay_t<
decltype(extentsVec)>>{}(*queue.get(),
ALPAKA_FORWARD(dest), byteValue, extentsVec);
365 template<
typename T_Value,
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
383 template<
typename T_Value,
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
387 T_Value elementValue,
394 Vec const extentsVec = extents;
429 template<
typename T_Type,
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
434 Vec const extentsVec = extents;
435 return internal::AllocDeferred::Op<T_Type, std::decay_t<
decltype(*queue.get())>,
ALPAKA_TYPEOF(extentsVec)>{}(
459 template<
typename T_Device, alpaka::concepts::QueueKind T_QueueKind>
The class used to bind kernel function object and arguments together. Once an instance of this class ...
#define ALPAKA_TYPEOF(...)
Get the type of instance.
#define ALPAKA_FORWARD(instance)
Perfectly forward an instance as argument.
Concept to check for APIs.
Concept to check if something is a device kind.
Concept to check if a type is a KernelBundle.
Concept to check if a type is a queue kind.
Concept to check if a type is a vector or scalar variable.
Concept to check if a type is a ThreadSpec or a FrameSpec.
constexpr AnyExecutor anyExecutor
Automatic executor selection.
alpaka'S function interface
Functionality which is usable on the host CPU controller thread.
auto allocDeferred(Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::VectorOrScalar auto const &extents)
allocate memory that is accessible after it is processed in the queue
constexpr auto defaultExecutor(internal::concepts::DeviceHandle auto deviceHandle)
Select a default executor for the given device.
void fill(Queue< T_Device, T_QueueKind > const &queue, auto &&dest, T_Value elementValue)
fill memory element wise
std::shared_ptr< T > Handle
auto allocLikeDeferred(Queue< T_Device, T_QueueKind > const &queue, auto const &view)
allocate memory that is accessible after it is processed in the queue
decltype(auto) makeAccessibleOnAcc(auto &&any)
Provides an instance of an object which can be used within the compute kernel.
void memcpy(Queue< T_Device, T_QueueKind > const &queue, auto &&dest, auto const &source)
copy data byte wise from one to another container
Queue(Handle< T_Queue > &&, T_QueueKind) -> Queue< Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Queue >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Queue >()))>, T_QueueKind >
constexpr bool isThreadSpec_v
constexpr bool isFrameSpec_v
void memset(Queue< T_Device, T_QueueKind > const &queue, auto &&dest, uint8_t byteValue)
fill memory byte wise
typename GetValueType< T >::type GetValueType_t
constexpr decltype(auto) getExecutor(auto &&any)
Get the executor associated with an object.
constexpr decltype(auto) get(concepts::SpecializationOf< Dict > auto &t) noexcept
Description of a specific device that one can schedule kernels on.
Device/Api-agnostic description of the logical parallelism exposed to a kernel.
bool operator!=(Queue const &other) const
Queue(Handle< T_Queue > &&queue, T_QueueKind)
auto getDevice() const
Get the device of this queue.
void waitFor(Event< Device< T_Api, T_DeviceKind > > const &event) const
Wait until all operations in this queue are finished.
void enqueue(Event< Device< T_Api, T_DeviceKind > > const &event) const
Enqueue an event.
std::string getName() const
void enqueueHostFn(auto const &task) const
Enqueue an operation which is executed on the host side.
constexpr alpaka::concepts::Api auto getApi() const
void enqueueHostFnDeferred(auto const &task) const
Enqueue an operation which is executed asynchronously on the host side.
bool isEmpty() const
Checks if the queue does not have any enqueued work to process.
void enqueueNativeFn(auto const &fn) const
Enqueue a native Api call.
void enqueue(onHost::concepts::ThreadOrFrameSpec auto const &launchCfg, auto const &f, auto &&... args) const
Enqueue a kernel functor to a queue.
bool operator==(Queue const &other) const
void enqueue(onHost::concepts::ThreadOrFrameSpec auto const &launchCfg, alpaka::concepts::KernelBundle auto const &kernelBundle) const
Enqueue a kernel functor to a queue.
constexpr alpaka::concepts::QueueKind auto getQueueKind() const
auto getNativeHandle() const
typename QueueHandle::element_type element_type
constexpr alpaka::concepts::DeviceKind auto getDeviceKind() const
Backend-specific description of the actual block and thread launch shape.