STAPL API Reference |
Modules Classes |
Runtime System metadata managing functions and classes. More...
Classes | |
class | stapl::runtime::tunnel_aggregator |
RMI request aggregator for a single destination location. More... | |
class | stapl::runtime::bind_rmi_result< R, T, MemberFunctionPointerCreator, Arg > |
Establishes a communication tunnel to a member function of a distributed object. More... | |
class | stapl::runtime::topology |
Describes the topology of the processes of a gang. More... | |
class | stapl::runtime::context_impl::aggregator |
RMI request aggregator to a destination location. More... | |
class | stapl::runtime::context |
Execution context of a task or request. More... | |
struct | stapl::runtime::context_id |
Id for an execution context. It is associated with context object. More... | |
struct | std::hash< stapl::runtime::context_id > |
Hash value creation functor for stapl::runtime::context_id. More... | |
class | stapl::runtime::full_location |
Describes a location as a tuple of a gang id and a location id. More... | |
struct | std::hash< stapl::runtime::full_location > |
Hash value creation functor for stapl::runtime::full_location. More... | |
class | stapl::runtime::gang_switcher |
Switches to and from the given gang. More... | |
class | stapl::runtime::gang_description |
Contains information about the locations of a gang. More... | |
class | stapl::runtime::common_gang_md |
Metadata that can be shared between multiple gangs. More... | |
class | stapl::runtime::gang_md |
Gang metadata that is shared by the locations that are on the same process. More... | |
struct | stapl::runtime::fence_md_delete |
Destroys fence_md objects while sending the metadata to the correct process. More... | |
class | stapl::runtime::fence_md |
Fence metadata for intergang communication when a gang_md has no representative. More... | |
class | stapl::runtime::gang_retriever |
Retrieves the gang_md& associated with the gang id. More... | |
class | stapl::runtime::gang_md_registry |
Gang metadata registry. More... | |
class | stapl::runtime::location_md |
Location metadata. More... | |
class | stapl::runtime::fence_section |
Enters a section of the code that is related to fence. More... | |
class | stapl::runtime::object_virtual_address |
Distributed object virtual address. More... | |
class | stapl::runtime::rmi_handle_info |
Distributed object handle information. More... | |
class | stapl::runtime::rmi_handle_base |
Distributed object base handle. More... | |
class | stapl::runtime::rmi_handle_extended_base |
Extended distributed object handle information. More... | |
struct | std::hash< stapl::runtime::object_virtual_address > |
Hasher for stapl::runtime::object_virtual_address. More... | |
class | stapl::runtime::runqueue::impl |
Location RMI and RPC runqueue. More... | |
class | stapl::runtime::runqueue |
Queue for scheduling requests. More... | |
class | stapl::runtime::shared_runqueue::impl |
Shared runqueue implementation. More... | |
class | stapl::runtime::shared_runqueue |
Runqueue shared among locations of a gang that are on the same process. More... | |
struct | stapl::runtime::deferred_t |
Tag type to defer an operation. More... | |
struct | stapl::runtime::no_context_t |
Tag type to skip any operations related to a context. More... | |
class | stapl::runtime::distributor |
Gang id and metadata distributor. More... | |
struct | stapl::runtime::anonymous_namespace{p_object_registry.cc}::registry_entry |
Typed p_object registry entry. More... | |
class | stapl::runtime::request_queue |
Request queue. More... | |
class | stapl::runtime::array_mailbox |
Mailbox for multiple threads that are contiguously numbered. More... | |
class | stapl::runtime::mailbox |
Mailbox for multiple threads with arbitrary numbering. More... | |
class | stapl::runtime::ctx_impl |
Wrapper to store a context and allow queueing it into a boost::intrusive::list . More... | |
struct | stapl::runtime::runqueue_gang_id_comparator |
Less than equal comparator for runqueue::impl and gang ids. More... | |
class | stapl::runtime::stack |
Thread stack information object. More... | |
class | stapl::runtime::backoff_metadata< Clock > |
Backoff mechanism metadata. More... | |
Macros | |
#define | STAPL_RUNTIME_CACHELINE_ALIGNED alignas(STAPL_RUNTIME_CACHELINE_SIZE) |
#define | STAPL_RUNTIME_SPMD_REGISTRY_SIZE 20 |
Typedefs | |
typedef std::uint32_t | stapl::runtime::location_id |
Location id type. | |
typedef std::uint32_t | stapl::runtime::gang_id |
Gang id type. | |
typedef std::uint16_t | stapl::runtime::nesting_level |
RMI nesting level type. | |
typedef std::uint8_t | stapl::runtime::magic_id |
Magic number that disambiguates between different deeply-nested RMIs. | |
typedef std::uint32_t | stapl::runtime::internal_affinity_tag |
Raw affinity tag type. | |
typedef std::uintptr_t | stapl::runtime::object_id |
Registered object id type. More... | |
typedef object_id | stapl::runtime::collective_id |
Collective operation id type. | |
Enumerations | |
enum | stapl::runtime::polling_policy_t { stapl::runtime::NO_THREAD = 0x0, stapl::runtime::SINGLE_THREAD, stapl::runtime::FIRST_THREAD, stapl::runtime::MASTER_THREAD } |
Communicator polling policy. More... | |
Functions | |
executor_base & | stapl::runtime::get_executor (const gang_id gid) |
Returns the executor associated with the location of gang with id gid from the stack. More... | |
header::epoch_type | stapl::runtime::get_message_epoch (message const &m) noexcept |
Returns the epoch m was sent from. | |
std::tuple< context_id, header::epoch_type, process_id > | stapl::runtime::get_message_info (message const &m, const location_id lid) noexcept |
Returns the context id, the epoch and the process id m was sent from as a std::tuple . More... | |
void | stapl::runtime::this_context::push_base (context &) |
Pushes a base context on the stack. | |
void | stapl::runtime::this_context::pop_base (context &) |
Pops the base context from the stack. | |
void | stapl::runtime::this_context::push_placeholder (boost::optional< context > &) |
Pushes a placeholder for a new context on the stack. More... | |
void | stapl::runtime::this_context::pop_placeholder (void) |
Pops the placeholder from the stack. | |
void | stapl::runtime::this_context::switch_to (location_md &, boost::optional< context > &) |
Switches to the base context of l . More... | |
void | stapl::runtime::this_context::unswitch (void) |
Unswitches from the context on the stack. More... | |
context & | stapl::runtime::this_context::get (void) |
Returns the current context from the stack. More... | |
context & | stapl::runtime::this_context::base_of_top (void) |
Returns the base context of the context at the top of the stack. | |
context * | stapl::runtime::this_context::try_get (void) noexcept |
Returns a pointer to the current context from the stack. More... | |
context_id const & | stapl::runtime::this_context::get_id (void) |
Returns the current context id from the stack. More... | |
location_md * | stapl::runtime::this_context::try_get_location_md (const gang_id) noexcept |
Returns a pointer to the location metadata of the given gang id if it is in the stack, otherwise nullptr . | |
bool | stapl::runtime::this_context::can_restore (location_md &l) |
Returns true if the execution can be restored for location l . More... | |
void | stapl::runtime::fence_md_update_sent (const gang_md::id init_gid, const gang_md::id gid, const nesting_level n, const unsigned int sent) |
Updates count for sent intergang requests. More... | |
void | stapl::runtime::fence_md_update_processed (const gang_md::id init_gid, const gang_md::id gid, const nesting_level n, const unsigned int processed) |
Updates count for processed intergang requests. More... | |
void | stapl::runtime::fence_md_update (const gang_md::id init_gid, const gang_md::id gid, const nesting_level n, const unsigned int sent, const unsigned int processed) |
Updates counts for sent and processed intergang requests. More... | |
void | stapl::runtime::release_gang_md (const gang_id gid) |
Releases the gang_md object associated with gid . | |
static void | stapl::runtime::notify_created (runqueue::impl &rq) |
Notifies that rq has been created. | |
stack & | stapl::runtime::get_thread_stack (void) |
Returns the thread-local stack. | |
static void | stapl::runtime::deferred_process (gang_md &g, message_ptr m) |
Adds a message that was deferred because the gang metadata was not available. | |
static void | stapl::runtime::deferred_enqueue (const gang_md::id gid, message_ptr m) |
Defers the execution of the requests in m . | |
static | stapl::runtime::STAPL_RUNTIME_THREAD_LOCAL (backoff_metadata<>, backoff) static void bcast_unordered(gang_md &g |
Thread-local backoff metadata. More... | |
static void | stapl::runtime::bcast_unordered_init (gang_md &g, message_ptr m) |
Initializes a broadcast of m to all the locations of g . | |
static void | stapl::runtime::runqueue_add (message_ptr m) |
Adds m to its destination runqueue. | |
static void | stapl::runtime::process_incoming (const bool can_block) |
Process incoming messages. | |
std::size_t | hash_value (context_id const &id) noexcept |
Hash value creation function for context_id. More... | |
std::size_t | hash_value (full_location const &l) noexcept |
Hash value creation function for full_location. More... | |
constexpr bool | operator== (gang_md const &x, gang_md const &y) noexcept |
Returns if x is equal to y . More... | |
constexpr bool | operator== (location_md const &x, location_md const &y) noexcept |
Returns if x is equal to y . More... | |
Variables | |
constexpr gang_id | stapl::runtime::invalid_gang_id = std::numeric_limits<gang_id>::max() |
Invalid gang id. | |
constexpr object_id | stapl::runtime::invalid_object_id = std::numeric_limits<object_id>::max() |
Invalid object_id. | |
constexpr deferred_t | stapl::runtime::deferred = { } |
Tag to create gang_md objects with deferred id. | |
constexpr no_context_t | stapl::runtime::no_context = { } |
Tag to skip any operations related to a context. | |
Runtime System metadata managing functions and classes.
#define STAPL_RUNTIME_CACHELINE_ALIGNED alignas(STAPL_RUNTIME_CACHELINE_SIZE) |
Cache-line alignment directive.
#define STAPL_RUNTIME_SPMD_REGISTRY_SIZE 20 |
Default stapl::runtime::spmd_registry size.
typedef std::uintptr_t stapl::runtime::object_id |
Registered object id type.
executor_base & stapl::runtime::get_executor | ( | const gang_id | gid | ) |
Returns the executor associated with the location of gang with id gid
from the stack.
|
noexcept |
Returns the context id, the epoch and the process id m
was sent from as a std::tuple
.
lid | Location id of the receiving location. |
void stapl::runtime::this_context::push_placeholder | ( | boost::optional< context > & | placeholder | ) |
void stapl::runtime::this_context::switch_to | ( | location_md & | l, |
boost::optional< context > & | placeholder | ||
) |
void stapl::runtime::this_context::unswitch | ( | void | ) |
context & stapl::runtime::this_context::get | ( | void | ) |
|
noexcept |
context_id const & stapl::runtime::this_context::get_id | ( | void | ) |
Returns the current context id from the stack.
If the context creation was deferred (e.g. one location gangs defer the creation of all metadata) then this function will create all the required metadata and return the associated context object.
bool stapl::runtime::this_context::can_restore | ( | location_md & | l | ) |
Returns true
if the execution can be restored for location l
.
void stapl::runtime::fence_md_update_sent | ( | const gang_md::id | init_gid, |
const gang_md::id | gid, | ||
const nesting_level | n, | ||
const unsigned int | sent | ||
) |
Updates count for sent intergang requests.
init_gid | Gang to update its metadata. |
gid | Gang which is responsible for increasing the count. |
n | Nesting level. |
sent | Number of sent requests. |
void stapl::runtime::fence_md_update_processed | ( | const gang_md::id | init_gid, |
const gang_md::id | gid, | ||
const nesting_level | n, | ||
const unsigned int | processed | ||
) |
Updates count for processed intergang requests.
init_gid | Gang to update its metadata. |
gid | Gang which is responsible for increasing the count. |
n | Nesting level. |
processed | Number of processed requests. |
void stapl::runtime::fence_md_update | ( | const gang_md::id | init_gid, |
const gang_md::id | gid, | ||
const nesting_level | n, | ||
const unsigned int | sent, | ||
const unsigned int | processed | ||
) |
Updates counts for sent and processed intergang requests.
init_gid | Gang to update its metadata. |
gid | Gang which is responsible for increasing the count. |
n | Nesting level. |
sent | Number of sent requests. |
processed | Number of processed requests. |
|
static |
Thread-local backoff metadata.
Broadcasts m
to all children processes, except process id
.
If m
is already broadcast, it adds it locally.
|
related |
Hash value creation function for context_id.
Required for boost::hash
.
|
related |
Hash value creation function for full_location.
Required for boost::hash
.
Returns if x
is equal to y
.
Since there is only one gang_md object per process, the equality comparison is implemented by checking if the pointers to the objects are the same.
|
related |
Returns if x
is equal to y
.
Since there is only one location_md object per each location of any gang on one process, the equality comparison is implemented by checking if the pointers to the objects are the same.