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

Method size_approx

ngscuda/concurrentqueue.h:1325–1332  ·  view source on GitHub ↗

Returns an estimate of the total number of elements currently in the queue. This estimate is only accurate if the queue has completely stabilized before it is called (i.e. all enqueue and dequeue operations have completed and their memory effects are visible on the calling thread, and no further operations start while this method is being called). Thread-safe.

Source from the content-addressed store, hash-verified

1323 // being called).
1324 // Thread-safe.
1325 size_t size_approx() const
1326 {
1327 size_t size = 0;
1328 for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) {
1329 size += ptr->size_approx();
1330 }
1331 return size;
1332 }
1333
1334
1335 // Returns true if the underlying atomic variables used by

Callers

nothing calls this directly

Calls 3

loadMethod · 0.80
next_prodMethod · 0.80
size_approxMethod · 0.45

Tested by

no test coverage detected