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

#include <machine_impl.h>

Collaboration diagram for Realm::ProcessorQueryImpl:
[legend]

Classes

struct  AffinityCache
struct  BestAffinityCostFn

Public Types

typedef QueryResultList< Processor > CachedList
typedef QueryKindCache< Processor, NUM_PROCESSOR_KINDS > KindCache

Public Member Functions

 ProcessorQueryImpl (const Machine &_machine)
 ProcessorQueryImpl (const MachineImpl *_machine_impl)
void add_reference (void)
void remove_reference (void)
ProcessorQueryImpl * writeable_reference (void)
void restrict_to_node (int new_node_id)
void restrict_to_kind (Processor::Kind new_kind)
void add_predicate (ProcQueryPredicate *pred)
Processor first_match (void) const
Processor next_match (Processor after)
size_t count_matches (void) const
Processor random_match (void) const
void set_cached_mem (Memory m)
void reset_cached_mem ()
Processor cache_next (Processor after)

Static Public Attributes

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

Protected Member Functions

 ProcessorQueryImpl (const ProcessorQueryImpl &copy_from)
 ~ProcessorQueryImpl (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)
const CachedList * list_in (const AffinityCache *ac) const
KindCache * build_kind_cache (unsigned generation) const
AffinityCache * build_affinity_cache (unsigned generation) const
const CachedList * best_affinity_list () const
 REALM_ATTR_NOINLINE (Processor best_affinity_next(Processor after) const)
void build_best_affinity_list (std::vector< Processor > &result) const
const CachedList * attach (const CachedList *list) const
const CachedList * attached_list () const
void reset_cached_list ()
bool cached_query (Processor p, Processor &pval)
bool cached_query (Processor &pval, QueryType q) const
bool cached_query (size_t &count) const

Protected Attributes

atomic< int > references
const MachineImpl * machine
bool is_restricted_node
int restricted_node_id
bool is_restricted_kind
Processor::Kind restricted_kind
std::vector< ProcQueryPredicate * > predicates
std::optional< BestAffinityCostFn > best_affinity_cost
Memory cached_mem
bool is_cached_mem
atomic< const CachedList * > attached
UnfairMutex build_mutex
std::optional< CachedList > first_own
std::vector< std::unique_ptr< CachedList > > own_lists

Friends

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

Member Typedef Documentation

◆ CachedList

◆ KindCache

Constructor & Destructor Documentation

◆ ProcessorQueryImpl() [1/3]

Realm::ProcessorQueryImpl::ProcessorQueryImpl ( const Machine & _machine)

◆ ProcessorQueryImpl() [2/3]

Realm::ProcessorQueryImpl::ProcessorQueryImpl ( const MachineImpl * _machine_impl)

◆ ProcessorQueryImpl() [3/3]

Realm::ProcessorQueryImpl::ProcessorQueryImpl ( const ProcessorQueryImpl & copy_from)
protected

◆ ~ProcessorQueryImpl()

Realm::ProcessorQueryImpl::~ProcessorQueryImpl ( void )
protected

Member Function Documentation

◆ add_predicate()

void Realm::ProcessorQueryImpl::add_predicate ( ProcQueryPredicate * pred)

◆ add_reference()

void Realm::ProcessorQueryImpl::add_reference ( void )

◆ attach()

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

◆ attached_list()

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

◆ best_affinity_list()

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

◆ build_affinity_cache()

AffinityCache * Realm::ProcessorQueryImpl::build_affinity_cache ( unsigned generation) const
protected

◆ build_best_affinity_list()

void Realm::ProcessorQueryImpl::build_best_affinity_list ( std::vector< Processor > & result) const
protected

◆ build_kind_cache()

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

◆ cache_next()

Processor Realm::ProcessorQueryImpl::cache_next ( Processor after)

◆ cached_list()

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

◆ cached_query() [1/3]

bool Realm::ProcessorQueryImpl::cached_query ( Processor & pval,
QueryType q ) const
protected

◆ cached_query() [2/3]

bool Realm::ProcessorQueryImpl::cached_query ( Processor p,
Processor & pval )
protected

◆ cached_query() [3/3]

bool Realm::ProcessorQueryImpl::cached_query ( size_t & count) const
protected

◆ count_matches()

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

◆ first_match()

Processor Realm::ProcessorQueryImpl::first_match ( void ) const

◆ list_in()

const CachedList * Realm::ProcessorQueryImpl::list_in ( const AffinityCache * ac) const
protected

◆ next_match()

Processor Realm::ProcessorQueryImpl::next_match ( Processor after)

◆ random_match()

Processor Realm::ProcessorQueryImpl::random_match ( void ) const

◆ REALM_ATTR_NOINLINE() [1/3]

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

◆ REALM_ATTR_NOINLINE() [2/3]

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

◆ REALM_ATTR_NOINLINE() [3/3]

Realm::ProcessorQueryImpl::REALM_ATTR_NOINLINE ( Processor best_affinity_next(Processor after) const )
protected

◆ remove_reference()

void Realm::ProcessorQueryImpl::remove_reference ( void )

◆ reset_cached_list()

void Realm::ProcessorQueryImpl::reset_cached_list ( )
protected

◆ reset_cached_mem()

void Realm::ProcessorQueryImpl::reset_cached_mem ( )
inline

◆ restrict_to_kind()

void Realm::ProcessorQueryImpl::restrict_to_kind ( Processor::Kind new_kind)

◆ restrict_to_node()

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

◆ set_cached_mem()

void Realm::ProcessorQueryImpl::set_cached_mem ( Memory m)
inline

◆ shared_cache_covers()

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

◆ writeable_reference()

ProcessorQueryImpl * Realm::ProcessorQueryImpl::writeable_reference ( void )

◆ Machine::ProcessorQuery::best_affinity_to

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

Member Data Documentation

◆ affinity_cache

QueryCacheSlot<AffinityCache> Realm::ProcessorQueryImpl::affinity_cache
static

◆ attached

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

◆ best_affinity_cost

std::optional<BestAffinityCostFn> Realm::ProcessorQueryImpl::best_affinity_cost
protected

◆ build_mutex

UnfairMutex Realm::ProcessorQueryImpl::build_mutex
mutableprotected

◆ cache_invalid_count

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

◆ cached_mem

Memory Realm::ProcessorQueryImpl::cached_mem
protected

◆ first_own

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

◆ is_cached_mem

bool Realm::ProcessorQueryImpl::is_cached_mem
protected

◆ is_restricted_kind

bool Realm::ProcessorQueryImpl::is_restricted_kind
protected

◆ is_restricted_node

bool Realm::ProcessorQueryImpl::is_restricted_node
protected

◆ kind_cache

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

◆ machine

const MachineImpl* Realm::ProcessorQueryImpl::machine
protected

◆ own_lists

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

◆ predicates

std::vector<ProcQueryPredicate *> Realm::ProcessorQueryImpl::predicates
protected

◆ references

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

◆ restricted_kind

Processor::Kind Realm::ProcessorQueryImpl::restricted_kind
protected

◆ restricted_node_id

int Realm::ProcessorQueryImpl::restricted_node_id
protected

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