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

#include <machine_impl.h>

Collaboration diagram for Realm::MemoryQueryImpl:
[legend]

Classes

struct  BestProcAffinityCostFn
struct  BestMemAffinityCostFn

Public Types

typedef QueryResultList< Memory > CachedList
typedef QueryKindCache< Memory, NUM_MEMORY_KINDS > KindCache

Public Member Functions

 MemoryQueryImpl (const Machine &_machine)
 MemoryQueryImpl (const MachineImpl *_machine_impl)
void add_reference (void)
void remove_reference (void)
MemoryQueryImpl * writeable_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)
void set_affinity_proc (Processor p)
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

Static Public Attributes

static atomic< unsigned int > cache_invalid_count
static QueryCacheSlot< KindCache > kind_cache

Protected Member Functions

 MemoryQueryImpl (const MemoryQueryImpl &copy_from)
 ~MemoryQueryImpl (void)
bool shared_cache_covers () const
const CachedList * cached_list () const
 REALM_ATTR_NOINLINE (const CachedList *cached_list_lookup() const)
 REALM_ATTR_NOINLINE (const CachedList *cached_list_miss(unsigned generation) const)
KindCache * build_kind_cache (unsigned generation) const
const CachedList * best_affinity_list () const
 REALM_ATTR_NOINLINE (Memory best_affinity_next(Memory after) const)
void build_best_affinity_list (std::vector< Memory > &result) const
const CachedList * attach (const CachedList *list) const
const CachedList * attached_list () const
void reset_cached_list ()
const std::map< Memory, Machine::ProcessorMemoryAffinity * > * anchor_affinities (Processor p, bool local_only) const
const std::map< Memory, Machine::MemoryMemoryAffinity * > * local_mem_affinities (Memory m) const
bool candidate_matches (Memory m) const

Protected Attributes

atomic< int > references
const MachineImpl * machine
bool is_restricted_node
int restricted_node_id
bool is_restricted_kind
Memory::Kind restricted_kind
size_t restricted_min_capacity
atomic< const CachedList * > attached
UnfairMutex build_mutex
std::optional< CachedList > first_own
std::vector< std::unique_ptr< CachedList > > own_lists
std::vector< MemoryQueryPredicate * > predicates
Processor affinity_proc
std::optional< BestProcAffinityCostFn > best_proc_affinity_cost
std::optional< BestMemAffinityCostFn > best_mem_affinity_cost

Friends

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

Member Typedef Documentation

◆ CachedList

◆ KindCache

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 )

◆ anchor_affinities()

const std::map< Memory, Machine::ProcessorMemoryAffinity * > * Realm::MemoryQueryImpl::anchor_affinities ( Processor p,
bool local_only ) const
protected

◆ attach()

const CachedList * Realm::MemoryQueryImpl::attach ( const CachedList * list) const
protected

◆ attached_list()

const CachedList * Realm::MemoryQueryImpl::attached_list ( ) const
inlineprotected

◆ best_affinity_list()

const CachedList * Realm::MemoryQueryImpl::best_affinity_list ( ) const
protected

◆ build_best_affinity_list()

void Realm::MemoryQueryImpl::build_best_affinity_list ( std::vector< Memory > & result) const
protected

◆ build_kind_cache()

KindCache * Realm::MemoryQueryImpl::build_kind_cache ( unsigned generation) const
protected

◆ cache_next()

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

◆ cached_list()

const CachedList * Realm::MemoryQueryImpl::cached_list ( ) const
inlineprotected

◆ 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

◆ candidate_matches()

bool Realm::MemoryQueryImpl::candidate_matches ( Memory m) const
protected

◆ count_matches()

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

◆ first_match()

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

◆ local_mem_affinities()

const std::map< Memory, Machine::MemoryMemoryAffinity * > * Realm::MemoryQueryImpl::local_mem_affinities ( Memory m) const
protected

◆ next_match()

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

◆ random_match()

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

◆ REALM_ATTR_NOINLINE() [1/3]

Realm::MemoryQueryImpl::REALM_ATTR_NOINLINE ( const CachedList *cached_list_lookup() const )
protected

◆ REALM_ATTR_NOINLINE() [2/3]

Realm::MemoryQueryImpl::REALM_ATTR_NOINLINE ( const CachedList *cached_list_miss(unsigned generation) const )
protected

◆ REALM_ATTR_NOINLINE() [3/3]

Realm::MemoryQueryImpl::REALM_ATTR_NOINLINE ( Memory best_affinity_next(Memory after) const )
protected

◆ remove_reference()

void Realm::MemoryQueryImpl::remove_reference ( void )

◆ reset_cached_list()

void Realm::MemoryQueryImpl::reset_cached_list ( )
protected

◆ 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)

◆ set_affinity_proc()

void Realm::MemoryQueryImpl::set_affinity_proc ( Processor p)

◆ shared_cache_covers()

bool Realm::MemoryQueryImpl::shared_cache_covers ( ) const
inlineprotected

◆ writeable_reference()

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

◆ 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

◆ affinity_proc

Processor Realm::MemoryQueryImpl::affinity_proc
protected

◆ attached

atomic<const CachedList *> Realm::MemoryQueryImpl::attached
mutableprotected

◆ 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

◆ build_mutex

UnfairMutex Realm::MemoryQueryImpl::build_mutex
mutableprotected

◆ cache_invalid_count

atomic<unsigned int> Realm::MemoryQueryImpl::cache_invalid_count
static

◆ first_own

std::optional<CachedList> Realm::MemoryQueryImpl::first_own
mutableprotected

◆ is_restricted_kind

bool Realm::MemoryQueryImpl::is_restricted_kind
protected

◆ is_restricted_node

bool Realm::MemoryQueryImpl::is_restricted_node
protected

◆ kind_cache

QueryCacheSlot<KindCache> Realm::MemoryQueryImpl::kind_cache
static

◆ machine

const MachineImpl* Realm::MemoryQueryImpl::machine
protected

◆ own_lists

std::vector<std::unique_ptr<CachedList> > Realm::MemoryQueryImpl::own_lists
mutableprotected

◆ 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

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