Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::MemoryQueryImpl Class Reference

#include <machine_impl.h>

Collaboration diagram for Realm::MemoryQueryImpl:

Classes

struct  BestMemAffinityCostFn
 
struct  BestProcAffinityCostFn
 

Public Member Functions

 MemoryQueryImpl (const Machine &_machine)
 
 MemoryQueryImpl (const MachineImpl *_machine_impl)
 
void add_reference (void)
 
void remove_reference (void)
 
MemoryQueryImplwriteable_reference (void)
 
void restrict_to_node (int new_node_id)
 
void restrict_to_kind (Memory::Kind new_kind)
 
void restrict_by_capacity (size_t new_min_bytes)
 
void add_predicate (MemoryQueryPredicate *pred)
 
Memory first_match (void) const
 
Memory next_match (Memory after) const
 
size_t count_matches (void) const
 
Memory random_match (void) const
 
Memory cache_next (Memory after)
 
bool cached_query (Memory p, Memory &pval)
 
bool cached_query (Memory &pval, QueryType q) const
 
bool cached_query (size_t &count) const
 
Memory mutated_cached_query (Memory p)
 

Static Public Attributes

static unsigned int init
 
static unsigned int cache_invalid_count
 
static bool global_valid_cache
 
static std::map< Memory::Kind, std::vector< Memory > > _mem_cache
 

Protected Member Functions

 MemoryQueryImpl (const MemoryQueryImpl &copy_from)
 
 ~MemoryQueryImpl (void)
 
std::vector< Memory > * cached_list () const
 
Memory next (Memory after)
 
Memory build_best_affinity_cache () const
 

Protected Attributes

atomic< int > references
 
const MachineImplmachine
 
bool is_restricted_node
 
int restricted_node_id
 
bool is_restricted_kind
 
Memory::Kind restricted_kind
 
size_t restricted_min_capacity
 
bool shared_cached_list
 
bool valid_cache
 
std::vector< Memory > * cur_cached_list
 
unsigned int invalid_count
 
unsigned int cur_index
 
std::vector< MemoryQueryPredicate * > predicates
 
std::optional< BestProcAffinityCostFnbest_proc_affinity_cost
 
std::optional< BestMemAffinityCostFnbest_mem_affinity_cost
 

Friends

Machine::MemoryQueryMachine::MemoryQuery::best_affinity_to (Memory m, int bandwidth_weight, int latency_weight)
 
Machine::MemoryQueryMachine::MemoryQuery::best_affinity_to (Processor p, int bandwidth_weight, int latency_weight)
 

Constructor & Destructor Documentation

◆ MemoryQueryImpl() [1/3]

Realm::MemoryQueryImpl::MemoryQueryImpl ( const Machine _machine)

◆ MemoryQueryImpl() [2/3]

Realm::MemoryQueryImpl::MemoryQueryImpl ( const MachineImpl _machine_impl)

◆ MemoryQueryImpl() [3/3]

Realm::MemoryQueryImpl::MemoryQueryImpl ( const MemoryQueryImpl copy_from)
protected

◆ ~MemoryQueryImpl()

Realm::MemoryQueryImpl::~MemoryQueryImpl ( void  )
protected

Member Function Documentation

◆ add_predicate()

void Realm::MemoryQueryImpl::add_predicate ( MemoryQueryPredicate pred)

◆ add_reference()

void Realm::MemoryQueryImpl::add_reference ( void  )

◆ build_best_affinity_cache()

Memory Realm::MemoryQueryImpl::build_best_affinity_cache ( ) const
protected

◆ cache_next()

Memory Realm::MemoryQueryImpl::cache_next ( Memory  after)

◆ cached_list()

std::vector< Memory > * Realm::MemoryQueryImpl::cached_list ( ) const
protected

◆ cached_query() [1/3]

bool Realm::MemoryQueryImpl::cached_query ( Memory pval,
QueryType  q 
) const

◆ cached_query() [2/3]

bool Realm::MemoryQueryImpl::cached_query ( Memory  p,
Memory pval 
)

◆ cached_query() [3/3]

bool Realm::MemoryQueryImpl::cached_query ( size_t &  count) const

◆ count_matches()

size_t Realm::MemoryQueryImpl::count_matches ( void  ) const

◆ first_match()

Memory Realm::MemoryQueryImpl::first_match ( void  ) const

◆ mutated_cached_query()

Memory Realm::MemoryQueryImpl::mutated_cached_query ( Memory  p)

◆ next()

Memory Realm::MemoryQueryImpl::next ( Memory  after)
protected

◆ next_match()

Memory Realm::MemoryQueryImpl::next_match ( Memory  after) const

◆ random_match()

Memory Realm::MemoryQueryImpl::random_match ( void  ) const

◆ remove_reference()

void Realm::MemoryQueryImpl::remove_reference ( void  )

◆ restrict_by_capacity()

void Realm::MemoryQueryImpl::restrict_by_capacity ( size_t  new_min_bytes)

◆ restrict_to_kind()

void Realm::MemoryQueryImpl::restrict_to_kind ( Memory::Kind  new_kind)

◆ restrict_to_node()

void Realm::MemoryQueryImpl::restrict_to_node ( int  new_node_id)

◆ writeable_reference()

MemoryQueryImpl * Realm::MemoryQueryImpl::writeable_reference ( void  )

Friends And Related Symbol Documentation

◆ Machine::MemoryQuery::best_affinity_to [1/2]

Machine::MemoryQuery & Machine::MemoryQuery::best_affinity_to ( Memory  m,
int  bandwidth_weight,
int  latency_weight 
)
friend

◆ Machine::MemoryQuery::best_affinity_to [2/2]

Machine::MemoryQuery & Machine::MemoryQuery::best_affinity_to ( Processor  p,
int  bandwidth_weight,
int  latency_weight 
)
friend

Member Data Documentation

◆ _mem_cache

std::map<Memory::Kind, std::vector<Memory> > Realm::MemoryQueryImpl::_mem_cache
static

◆ best_mem_affinity_cost

std::optional<BestMemAffinityCostFn> Realm::MemoryQueryImpl::best_mem_affinity_cost
protected

◆ best_proc_affinity_cost

std::optional<BestProcAffinityCostFn> Realm::MemoryQueryImpl::best_proc_affinity_cost
protected

◆ cache_invalid_count

unsigned int Realm::MemoryQueryImpl::cache_invalid_count
static

◆ cur_cached_list

std::vector<Memory>* Realm::MemoryQueryImpl::cur_cached_list
mutableprotected

◆ cur_index

unsigned int Realm::MemoryQueryImpl::cur_index
protected

◆ global_valid_cache

bool Realm::MemoryQueryImpl::global_valid_cache
static

◆ init

unsigned int Realm::MemoryQueryImpl::init
static

◆ invalid_count

unsigned int Realm::MemoryQueryImpl::invalid_count
mutableprotected

◆ is_restricted_kind

bool Realm::MemoryQueryImpl::is_restricted_kind
protected

◆ is_restricted_node

bool Realm::MemoryQueryImpl::is_restricted_node
protected

◆ machine

const MachineImpl* Realm::MemoryQueryImpl::machine
protected

◆ predicates

std::vector<MemoryQueryPredicate *> Realm::MemoryQueryImpl::predicates
protected

◆ references

atomic<int> Realm::MemoryQueryImpl::references
protected

◆ restricted_kind

Memory::Kind Realm::MemoryQueryImpl::restricted_kind
protected

◆ restricted_min_capacity

size_t Realm::MemoryQueryImpl::restricted_min_capacity
protected

◆ restricted_node_id

int Realm::MemoryQueryImpl::restricted_node_id
protected

◆ shared_cached_list

bool Realm::MemoryQueryImpl::shared_cached_list
mutableprotected

◆ valid_cache

bool Realm::MemoryQueryImpl::valid_cache
protected

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