#include <TaskSubQueue.hh>
Definition at line 37 of file TaskSubQueue.hh.
◆ container
◆ container_type
◆ size_type
◆ task_pointer
◆ TaskSubQueue() [1/2]
PTL::TaskSubQueue::TaskSubQueue |
( |
std::atomic_uintmax_t * |
_ntasks | ) |
|
|
inline |
Definition at line 83 of file TaskSubQueue.hh.
84: m_ntasks(0)
85, m_available(true)
86, m_all_tasks(_ntasks)
87{}
◆ TaskSubQueue() [2/2]
Definition at line 91 of file TaskSubQueue.hh.
92: m_ntasks(0)
93, m_available(true)
94, m_all_tasks(rhs.m_all_tasks)
95{}
◆ ~TaskSubQueue()
PTL::TaskSubQueue::~TaskSubQueue |
( |
| ) |
|
|
default |
◆ AcquireClaim()
bool PTL::TaskSubQueue::AcquireClaim |
( |
| ) |
|
|
inline |
◆ empty()
bool PTL::TaskSubQueue::empty |
( |
| ) |
const |
|
inline |
◆ GetId()
int PTL::TaskSubQueue::GetId |
( |
| ) |
const |
◆ operator=()
◆ PopTask()
Definition at line 152 of file TaskSubQueue.hh.
153{
154
155 assert(m_available.load(std::memory_order_relaxed) == false);
156 if(m_ntasks.load() == 0)
157 return nullptr;
158
160 if(front)
161 {
162#if defined(PTL_USE_LOCKS)
164#endif
165 _task = std::move(m_task_queue.front());
166 m_task_queue.pop_front();
167 }
168 else
169 {
170#if defined(PTL_USE_LOCKS)
172#endif
173 _task = std::move(m_task_queue.back());
174 m_task_queue.pop_back();
175 }
176 --m_ntasks;
177
178 return _task;
179}
std::shared_ptr< VTask > task_pointer
TemplateAutoLock< Mutex > AutoLock
Referenced by PTL::UserTaskQueue::GetTask(), and PTL::UserTaskQueue::GetThreadBinTask().
◆ PushTask()
Definition at line 138 of file TaskSubQueue.hh.
139{
140
141 assert(m_available.load(std::memory_order_relaxed) == false);
142 ++m_ntasks;
143#if defined(PTL_USE_LOCKS)
145#endif
146 m_task_queue.emplace_front(std::move(task));
147}
Referenced by PTL::UserTaskQueue::InsertTask().
◆ ReleaseClaim()
void PTL::TaskSubQueue::ReleaseClaim |
( |
| ) |
|
|
inline |
◆ size()
The documentation for this class was generated from the following file: