Grok 12.0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
hwy::PoolCommands Class Reference

#include <thread_pool.h>

Public Member Functions

void Broadcast (uint32_t cmd)
 
uint32_t WorkerWaitForNewCommand (PoolWaitMode wait_mode, uint32_t &prev_seq_cmd)
 

Static Public Member Functions

static uint32_t WorkerInitialSeqCmd ()
 

Static Public Attributes

static constexpr uint32_t kTerminate = 1
 
static constexpr uint32_t kWork = 2
 
static constexpr uint32_t kNop = 3
 

Static Private Member Functions

static HWY_INLINE uint32_t SpinUntilDifferent (const uint32_t prev_seq_cmd, std::atomic< uint32_t > &current)
 

Private Attributes

uint32_t epoch_ {0}
 
std::atomic< uint32_t > seq_cmd_ {kInitial}
 

Static Private Attributes

static constexpr uint32_t kInitial = 0
 
static constexpr uint32_t kMask = 0xF
 
static constexpr size_t kShift = hwy::CeilLog2(kMask)
 

Member Function Documentation

◆ Broadcast()

void hwy::PoolCommands::Broadcast ( uint32_t cmd)
inline

◆ SpinUntilDifferent()

static HWY_INLINE uint32_t hwy::PoolCommands::SpinUntilDifferent ( const uint32_t prev_seq_cmd,
std::atomic< uint32_t > & current )
inlinestaticprivate

References hwy::Pause().

Referenced by WorkerWaitForNewCommand().

◆ WorkerInitialSeqCmd()

static uint32_t hwy::PoolCommands::WorkerInitialSeqCmd ( )
inlinestatic

References kInitial.

◆ WorkerWaitForNewCommand()

uint32_t hwy::PoolCommands::WorkerWaitForNewCommand ( PoolWaitMode wait_mode,
uint32_t & prev_seq_cmd )
inline

Member Data Documentation

◆ epoch_

uint32_t hwy::PoolCommands::epoch_ {0}
private

Referenced by Broadcast().

◆ kInitial

constexpr uint32_t hwy::PoolCommands::kInitial = 0
staticconstexprprivate

Referenced by WorkerInitialSeqCmd().

◆ kMask

constexpr uint32_t hwy::PoolCommands::kMask = 0xF
staticconstexprprivate

◆ kNop

constexpr uint32_t hwy::PoolCommands::kNop = 3
staticconstexpr

◆ kShift

constexpr size_t hwy::PoolCommands::kShift = hwy::CeilLog2(kMask)
staticconstexprprivate

Referenced by Broadcast().

◆ kTerminate

constexpr uint32_t hwy::PoolCommands::kTerminate = 1
staticconstexpr

◆ kWork

constexpr uint32_t hwy::PoolCommands::kWork = 2
staticconstexpr

◆ seq_cmd_

std::atomic<uint32_t> hwy::PoolCommands::seq_cmd_ {kInitial}
private

The documentation for this class was generated from the following file: