![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
#include <Queue.hpp>
Public Member Functions | |
| Queue (internal::concepts::DeviceHandle auto device, uint32_t const idx, uint32_t numIdx, bool isBlocking) | |
| Queue (Queue &&)=delete | |
| Queue (Queue const &)=delete | |
| ~Queue () | |
| bool | operator!= (Queue const &other) const |
| Queue & | operator= (Queue &&)=delete |
| Queue & | operator= (Queue const &)=delete |
| bool | operator== (Queue const &other) const |
Private Member Functions | |
| void | _ () |
| template<alpaka::onHost::concepts::FrameSpec T_FrameSpec> | |
| void | enqueue (T_FrameSpec const &frameSpec, auto const &kernelBundle) |
| template<alpaka::onHost::concepts::ThreadSpec T_ThreadSpec> | |
| void | enqueue (T_ThreadSpec const &threadSpec, auto const &kernelBundle) |
| void | enqueueHostFn (auto const &task) |
| execute a task in the queue | |
| void | enqueueHostFnDeferred (auto const &task) |
| void | enqueueNativeFn (auto const &fn) |
| auto | getDevice () const |
| auto | getDeviceKind () const |
| std::string | getName () const |
| auto | getNativeHandle () const noexcept |
| std::shared_ptr< Queue > | getSharedPtr () |
| bool | isQueueEmpty () const |
| Checks if the queue is empty. | |
| template<typename T_Fn> | |
| auto | submit (T_Fn &&fn) |
| Submit a task to the queue. | |
Private Attributes | |
| Handle< T_Device > | m_device |
| uint32_t | m_idx = 0u |
| bool | m_isBlocking {false} |
| std::atomic< bool > | m_isBlockingTaskExecuted {false} |
| Flag to show if a blocking tasks is executed. | |
| std::mutex | m_mutex |
| Mutex to ensure sequential execution of tasks and operation if the queue is blocking. | |
| uint32_t | m_numaIdx = 0u |
| core::CallbackThread | m_workerThread |
Friends | |
| struct | alpaka::internal::GetApi |
| struct | alpaka::internal::GetDeviceType |
| struct | alpaka::internal::GetName |
| struct | internal::AllocDeferred |
| struct | internal::Enqueue |
| struct | internal::GetNativeHandle |
| struct | internal::IsQueueEmpty |
| struct | internal::Memcpy |
| struct | internal::MemcpyDeviceGlobal |
| struct | internal::Memset |
| struct | internal::Wait |
| struct | internal::WaitFor |
| struct | onHost::internal::GetDevice |
|
inline |
|
inline |
|
delete |
|
delete |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinenodiscardprivatenoexcept |
|
inlineprivate |
|
inlineprivate |
Checks if the queue is empty.
If m_isBlocking is true, only tasks will be taken into account, events will be ignored they could not influence the usage of isQueueEmpty. if m_isBlocking is false, events will be taken into account because they are handled as normal tasks.
|
inline |
|
delete |
|
delete |
|
inline |
|
inlineprivate |
Submit a task to the queue.
Centralizes blocking / non-blocking behavior within the method to keep other code as easy as possible. For a blocking queue this method is NOT giving the control back to the caller until the operation is processed. All internal calls should use this method and not enqueue tasks directly in m_workerThread
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |