Global address class. More...
#include <Addressing.hpp>
Public Member Functions | |
GlobalAddress () | |
Construct a global address, initialized to a null pointer. More... | |
intptr_t | raw_bits () const |
Return the raw bits of a global address. More... | |
Core | core () const |
Return the home core of a global address. More... | |
Pool | pool () const |
Return the home core of a global address TODO: implement this. More... | |
T * | pointer () const |
Return the local pointer from a global address. More... | |
T * | localize (Core nid=-1) const |
Find lowest local address of the object at this address. More... | |
T * | operator-> () const |
Does not remotely dereference the global address, this is syntactic sugar for localize()-> More... | |
GlobalAddress< T > | block_min () const |
Find base address of block containing this byte. More... | |
GlobalAddress< char > | first_byte () const |
find global byte address of first byte of block More... | |
GlobalAddress< char > | last_byte () const |
find global byte address of last byte of block More... | |
GlobalAddress< T > | block_max () const |
bool | is_2D () const |
is this a 2D address? More... | |
bool | is_linear () const |
is this a linear address? More... | |
GlobalAddress< T > & | operator++ () |
increment address by one T More... | |
GlobalAddress< T > | operator++ (int) |
increment address by one T More... | |
GlobalAddress< T > & | operator-- () |
decrement address by one T More... | |
GlobalAddress< T > & | operator+= (ptrdiff_t i) |
increment address by i T's More... | |
GlobalAddress< T > & | operator-= (ptrdiff_t i) |
decrement address by i T's More... | |
bool | equals (const GlobalAddress< T > &t) const |
test for equality TODO: get rid of this More... | |
bool | operator== (const GlobalAddress< T > &t) const |
test for equality TODO: get rid of this More... | |
template<typename U > | |
bool | operator== (const GlobalAddress< U > &u) const |
test for equality More... | |
bool | operator< (const GlobalAddress< T > &t) const |
compare addresses More... | |
template<typename U > | |
operator GlobalAddress< U > () | |
generic cast operator More... | |
operator void * () | |
cast to void *. More... | |
Static Public Member Functions | |
static GlobalAddress | TwoDimensional (T *t, Core n=global_communicator.mycore) |
Construct a 2D global address with an initial pointer and core. More... | |
static GlobalAddress | Linear (T *t, Pool p=0) |
Construct a linear global address from a local pointer. More... | |
static GlobalAddress | Raw (intptr_t t) |
Construct a global address from raw bits. More... | |
Friends | |
template<typename U > | |
std::ostream & | operator<< (std::ostream &o, const GlobalAddress< U > &ga) |
template<typename U > | |
ptrdiff_t | operator- (const GlobalAddress< U > &t, const GlobalAddress< U > &u) |
Global address class.
We support two types of global addresses:
2D addresses are a PGAS-style tuple of ( core, address on core )
Linear addresses are block cyclic across all the cores in the system.
Definition at line 99 of file Addressing.hpp.
|
inline |
Construct a global address, initialized to a null pointer.
Definition at line 137 of file Addressing.hpp.
|
inline |
Definition at line 281 of file Addressing.hpp.
|
inline |
Find base address of block containing this byte.
Definition at line 256 of file Addressing.hpp.
|
inline |
Return the home core of a global address.
Definition at line 192 of file Addressing.hpp.
|
inline |
test for equality TODO: get rid of this
Definition at line 345 of file Addressing.hpp.
|
inline |
find global byte address of first byte of block
Definition at line 271 of file Addressing.hpp.
|
inline |
is this a 2D address?
Definition at line 298 of file Addressing.hpp.
|
inline |
is this a linear address?
Definition at line 303 of file Addressing.hpp.
|
inline |
find global byte address of last byte of block
Definition at line 276 of file Addressing.hpp.
|
inlinestatic |
Construct a linear global address from a local pointer.
TODO: the pool argument is currenly unused
Definition at line 153 of file Addressing.hpp.
|
inline |
Find lowest local address of the object at this address.
Used for PGAS-style local iteration.
Definition at line 228 of file Addressing.hpp.
|
inlineexplicit |
generic cast operator
Definition at line 370 of file Addressing.hpp.
|
inline |
cast to void *.
Definition at line 376 of file Addressing.hpp.
|
inline |
increment address by one T
Definition at line 312 of file Addressing.hpp.
|
inline |
increment address by one T
Definition at line 318 of file Addressing.hpp.
|
inline |
increment address by i T's
Definition at line 332 of file Addressing.hpp.
|
inline |
decrement address by one T
Definition at line 325 of file Addressing.hpp.
|
inline |
decrement address by i T's
Definition at line 338 of file Addressing.hpp.
|
inline |
Does not remotely dereference the global address, this is syntactic sugar for localize()->
Definition at line 253 of file Addressing.hpp.
|
inline |
compare addresses
Definition at line 362 of file Addressing.hpp.
|
inline |
test for equality TODO: get rid of this
Definition at line 351 of file Addressing.hpp.
|
inline |
test for equality
Definition at line 357 of file Addressing.hpp.
|
inline |
Return the local pointer from a global address.
Definition at line 211 of file Addressing.hpp.
|
inline |
Return the home core of a global address TODO: implement this.
Definition at line 205 of file Addressing.hpp.
|
inlinestatic |
Construct a global address from raw bits.
Definition at line 179 of file Addressing.hpp.
|
inline |
Return the raw bits of a global address.
Definition at line 187 of file Addressing.hpp.
|
inlinestatic |
Construct a 2D global address with an initial pointer and core.
Definition at line 140 of file Addressing.hpp.
|
friend |
|
friend |