MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / try_dequeue_bulk

Method try_dequeue_bulk

ngscuda/concurrentqueue.h:1231–1241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229 // Never allocates. Thread-safe.
1230 template<typename It>
1231 size_t try_dequeue_bulk(It itemFirst, size_t max)
1232 {
1233 size_t count = 0;
1234 for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) {
1235 count += ptr->dequeue_bulk(itemFirst, max - count);
1236 if (count == max) {
1237 break;
1238 }
1239 }
1240 return count;
1241 }
1242
1243 // Attempts to dequeue several elements from the queue using an explicit consumer token.
1244 // Returns the number of items actually dequeued.

Callers

nothing calls this directly

Calls 3

loadMethod · 0.80
next_prodMethod · 0.80
dequeue_bulkMethod · 0.80

Tested by

no test coverage detected