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 110 of file Addressing.hpp.
|
inline |
Construct a global address, initialized to a null pointer.
Definition at line 148 of file Addressing.hpp.
|
inline |
Definition at line 292 of file Addressing.hpp.
|
inline |
Find base address of block containing this byte.
Definition at line 267 of file Addressing.hpp.
|
inline |
Return the home core of a global address.
Definition at line 203 of file Addressing.hpp.
|
inline |
test for equality TODO: get rid of this
Definition at line 356 of file Addressing.hpp.
|
inline |
find global byte address of first byte of block
Definition at line 282 of file Addressing.hpp.
|
inline |
is this a 2D address?
Definition at line 309 of file Addressing.hpp.
|
inline |
is this a linear address?
Definition at line 314 of file Addressing.hpp.
|
inline |
find global byte address of last byte of block
Definition at line 287 of file Addressing.hpp.
|
inlinestatic |
Construct a linear global address from a local pointer.
TODO: the pool argument is currenly unused
Definition at line 164 of file Addressing.hpp.
|
inline |
Find lowest local address of the object at this address.
Used for PGAS-style local iteration.
Definition at line 239 of file Addressing.hpp.
|
inlineexplicit |
generic cast operator
Definition at line 381 of file Addressing.hpp.
|
inline |
cast to void *.
Definition at line 387 of file Addressing.hpp.
|
inline |
increment address by one T
Definition at line 323 of file Addressing.hpp.
|
inline |
increment address by one T
Definition at line 329 of file Addressing.hpp.
|
inline |
increment address by i T's
Definition at line 343 of file Addressing.hpp.
|
inline |
decrement address by one T
Definition at line 336 of file Addressing.hpp.
|
inline |
decrement address by i T's
Definition at line 349 of file Addressing.hpp.
|
inline |
Does not remotely dereference the global address, this is syntactic sugar for localize()->
Definition at line 264 of file Addressing.hpp.
|
inline |
compare addresses
Definition at line 373 of file Addressing.hpp.
|
inline |
test for equality TODO: get rid of this
Definition at line 362 of file Addressing.hpp.
|
inline |
test for equality
Definition at line 368 of file Addressing.hpp.
|
inline |
Return the local pointer from a global address.
Definition at line 222 of file Addressing.hpp.
|
inline |
Return the home core of a global address TODO: implement this.
Definition at line 216 of file Addressing.hpp.
|
inlinestatic |
Construct a global address from raw bits.
Definition at line 190 of file Addressing.hpp.
|
inline |
Return the raw bits of a global address.
Definition at line 198 of file Addressing.hpp.
|
inlinestatic |
Construct a 2D global address with an initial pointer and core.
Definition at line 151 of file Addressing.hpp.
|
friend |
|
friend |