69 void resize(intmax_t)
override;
71 bool empty()
const override;
98 intmax_t m_thread_bin;
99 mutable intmax_t m_insert_bin;
100 std::atomic_bool* m_hold =
nullptr;
101 std::atomic_uintmax_t* m_ntasks =
nullptr;
102 Mutex* m_mutex =
nullptr;
104 std::vector<int> m_rand_list = {};
105 std::vector<int>::iterator m_rand_itr = {};
113 return (m_ntasks->load(std::memory_order_relaxed) == 0);
121 return m_ntasks->load(std::memory_order_relaxed);
129 return (*m_subqueues)[bin]->size();
137 return (*m_subqueues)[bin]->empty();
145 for(
const auto& itr : *m_subqueues)
157 for(
const auto& itr : *m_subqueues)
#define PTL_NO_SANITIZE_THREAD
VUserTaskQueue * clone() override
size_type true_size() const override
void resize(intmax_t) override
task_pointer GetTask(intmax_t subq=-1, intmax_t nitr=-1) override
intmax_t GetThreadBin() const override
void ExecuteOnSpecificThreads(ThreadIdSet tid_set, ThreadPool *tp, function_type f) override
intmax_t GetInsertBin() const
std::vector< TaskSubQueue * > TaskSubQueueContainer
bool bin_empty(size_type bin) const override
void ExecuteOnAllThreads(ThreadPool *tp, function_type f) override
std::default_random_engine random_engine_t
intmax_t InsertTask(task_pointer &&, ThreadData *=nullptr, intmax_t subq=-1) override PTL_NO_SANITIZE_THREAD
size_type bin_size(size_type bin) const override
bool true_empty() const override
std::shared_ptr< VTask > task_pointer
bool empty() const override
~UserTaskQueue() override
std::uniform_int_distribution< int > int_dist_t
task_pointer GetThreadBinTask()
size_type size() const override
std::set< ThreadId > ThreadIdSet
std::function< void()> function_type