MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / reset_empty

Method reset_empty

include/dmlc/concurrentqueue.h:1581–1591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579
1580 template<InnerQueueContext context>
1581 inline void reset_empty() {
1582 if (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) {
1583 // Reset flags
1584 for (size_t i = 0; i != BLOCK_SIZE; ++i) {
1585 emptyFlags[i].store(false, std::memory_order_relaxed);
1586 }
1587 } else {
1588 // Reset counter
1589 elementsCompletelyDequeued.store(0, std::memory_order_relaxed);
1590 }
1591 }
1592
1593 inline T *operator[](index_t idx) MOODYCAMEL_NOEXCEPT {
1594 return static_cast<T *>(static_cast<void *>(elements)) +

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected