19 template<
typename TDev>
20 class EventGenericThreads;
29 # pragma clang diagnostic push
30 # pragma clang diagnostic ignored "-Wweak-vtables"
33 template<
typename TDev>
36 # pragma clang diagnostic pop
41 :
m_dev(std::move(dev))
69 template<
typename TDev>
77 :
m_spQueueImpl(std::make_shared<generic::detail::QueueGenericThreadsBlockingImpl<TDev>>(dev))
91 return !((*this) == rhs);
95 std::shared_ptr<generic::detail::QueueGenericThreadsBlockingImpl<TDev>>
m_spQueueImpl;
101 template<
typename TDev>
108 template<
typename TDev>
113 return queue.m_spQueueImpl->m_dev;
118 template<
typename TDev>
126 template<
typename TDev,
typename TTask>
131 std::lock_guard<std::mutex> lk(queue.m_spQueueImpl->m_mutex);
133 queue.m_spQueueImpl->m_bCurrentlyExecutingTask =
true;
137 queue.m_spQueueImpl->m_bCurrentlyExecutingTask =
false;
142 template<
typename TDev>
147 return !queue.m_spQueueImpl->m_bCurrentlyExecutingTask;
155 template<
typename TDev>
160 std::lock_guard<std::mutex> lk(queue.m_spQueueImpl->m_mutex);
#define ALPAKA_DEBUG_FULL_LOG_SCOPE
std::shared_ptr< generic::detail::QueueGenericThreadsBlockingImpl< TDev > > m_spQueueImpl
auto operator==(QueueGenericThreadsBlocking< TDev > const &rhs) const -> bool
auto operator!=(QueueGenericThreadsBlocking< TDev > const &rhs) const -> bool
QueueGenericThreadsBlocking(TDev const &dev)
The CPU device queue implementation.
auto operator=(QueueGenericThreadsBlockingImpl< TDev > const &) -> QueueGenericThreadsBlockingImpl< TDev > &=delete
TDev const m_dev
The device this queue is bound to.
std::atomic< bool > m_bCurrentlyExecutingTask
void wait(EventGenericThreads< TDev > const &ev) final
waiting for the event
QueueGenericThreadsBlockingImpl(TDev dev) noexcept
QueueGenericThreadsBlockingImpl(QueueGenericThreadsBlockingImpl< TDev > const &)=delete
void enqueue(EventGenericThreads< TDev > &ev) final
enqueue the event
The alpaka accelerator library.
ALPAKA_FN_HOST auto enqueue(TQueue &queue, TTask &&task) -> void
Queues the given task in the given queue.
ALPAKA_FN_HOST auto wait(TAwaited const &awaited) -> void
Waits the thread for the completion of the given awaited action to complete.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
static ALPAKA_FN_HOST auto currentThreadWaitFor(QueueGenericThreadsBlocking< TDev > const &queue) -> void
static ALPAKA_FN_HOST auto empty(QueueGenericThreadsBlocking< TDev > const &queue) -> bool
static ALPAKA_FN_HOST auto enqueue(QueueGenericThreadsBlocking< TDev > &queue, TTask const &task) -> void
static ALPAKA_FN_HOST auto getDev(QueueGenericThreadsBlocking< TDev > const &queue) -> TDev