STAPL API Reference |
Modules Classes |
Distributed object creation, registration, retrieval and destruction. More...
Classes | |
class | stapl::p_object_delete< T, Deleter > |
Deletes a distributed object. More... | |
class | stapl::p_object |
Implements the base class for distributed objects. More... | |
class | stapl::rmi_handle |
Provides a registration mechanism for RMI communication. More... | |
Enumerations | |
enum | stapl::rmi_handle_flags { stapl::no_aggregation = 0x1, stapl::no_fence_information = 0x2, stapl::allow_try_rmi = 0x4 } |
Flags for registering objects. More... | |
Functions | |
template<typename T , typename... Args> | |
future< rmi_handle::reference > | stapl::construct (neighbor_locations_t, Args &&... args) |
Creates an object of type T in a new gang over all the locations of the current gang that are on shared memory. More... | |
template<typename T , typename U , typename... Args> | |
future< rmi_handle::reference > | stapl::construct (location_range_wrapper< U > const &r, Args &&... args) |
Creates an object of type T in a new gang over the range r of the locations of the current gang. More... | |
template<typename T , typename Function , typename U , typename... Args> | |
void | stapl::async_construct (Function &&f, location_range_wrapper< U > const &r, Args &&... args) |
Creates an object of type T in a new gang over the range r of the locations of the current gang and calls f with the object pointer. More... | |
template<typename T , typename... Args> | |
future< rmi_handle::reference > | stapl::construct (rmi_handle::const_reference const &h, all_locations_t, Args &&... args) |
Creates an object of type T in a new gang over all the locations of the gang of h . More... | |
template<typename T , typename Function , typename... Args> | |
void | stapl::async_construct (Function &&f, rmi_handle::const_reference const &h, all_locations_t, Args &&... args) |
Creates an object of type T in a new gang over all the locations of the gang of h and calls f with the object pointer. More... | |
template<typename T , typename U , typename... Args> | |
future< rmi_handle::reference > | stapl::construct (rmi_handle::const_reference const &h, location_range_wrapper< U > const &r, Args &&... args) |
Creates an object of type T in a new gang over the range r of the locations of the gang of h . More... | |
template<typename T , typename Function , typename U , typename... Args> | |
void | stapl::async_construct (Function &&f, rmi_handle::const_reference const &h, location_range_wrapper< U > const &r, Args &&... args) |
Creates an object of type T in a new gang over the range r of the locations of the gang of h and calls f with the object pointer. More... | |
template<typename T , typename... Args> | |
future< rmi_handle::reference > | stapl::construct (level const &l, Args &&... args) |
Creates an object of type T in a new gang over the level l of the hierarchy. More... | |
template<typename Handle , typename MemFun , typename... T> | |
future< typename callable_traits< MemFun >::result_type > | stapl::restore (Handle const &h, MemFun const &pmf, T &&... t) |
Restores the SPMD execution of the gang of the given object, using as the entry point the given member function. More... | |
template<typename T > | |
T const & | stapl::get_p_object (rmi_handle::const_reference const &h) |
Returns a reference to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T const & | stapl::get_p_object (rmi_handle::const_light_reference const &h) |
Returns a reference to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T & | stapl::get_p_object (rmi_handle::reference const &h) |
Returns a reference to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T & | stapl::get_p_object (rmi_handle::light_reference const &h) |
Returns a reference to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T const * | stapl::resolve_handle (rmi_handle::const_reference const &h) noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T * | stapl::resolve_handle (rmi_handle::reference const &h) noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T const * | stapl::resolve_handle (rmi_handle::const_light_reference const &h) noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h refers to. More... | |
template<typename T > | |
T * | stapl::resolve_handle (rmi_handle::light_reference const &h) noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h refers to. More... | |
int | stapl::compare_gangs (rmi_handle::const_reference const &x, rmi_handle::const_reference const &y) noexcept |
Returns if the two handles are defined over identical, similar or completely different gangs. More... | |
Distributed object creation, registration, retrieval and destruction.
Flags for registering objects.
Enumerator | |
---|---|
no_aggregation | Disables aggregation for the object. |
no_fence_information | Disables fence bookkeeping for the object. |
allow_try_rmi | Enables support for try_rmi(). |
future<rmi_handle::reference> stapl::construct | ( | neighbor_locations_t | , |
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over all the locations of the current gang that are on shared memory.
args | Arguments to pass to the constructor of T . |
future<rmi_handle::reference> stapl::construct | ( | location_range_wrapper< U > const & | r, |
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over the range r
of the locations of the current gang.
r
may only contain locations of the current gang.r | Location id range of the current that the new gang will be created in. |
args | Arguments to pass to the constructor of T . |
void stapl::async_construct | ( | Function && | f, |
location_range_wrapper< U > const & | r, | ||
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over the range r
of the locations of the current gang and calls f
with the object pointer.
r
may only contain locations of the current gang.f | Function to pass the pointer of the constructed object. |
r | Location id range of the current that the new gang will be created in. |
args | Arguments to pass to the constructor of T . |
future<rmi_handle::reference> stapl::construct | ( | rmi_handle::const_reference const & | h, |
all_locations_t | , | ||
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over all the locations of the gang of h
.
h | Target distributed object handle. |
args | Arguments to pass to the constructor of T . |
void stapl::async_construct | ( | Function && | f, |
rmi_handle::const_reference const & | h, | ||
all_locations_t | , | ||
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over all the locations of the gang of h
and calls f
with the object pointer.
f | Function to pass the pointer of the constructed object. |
h | Target distributed object handle. |
args | Arguments to pass to the constructor of T . |
future<rmi_handle::reference> stapl::construct | ( | rmi_handle::const_reference const & | h, |
location_range_wrapper< U > const & | r, | ||
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over the range r
of the locations of the gang of h
.
r
may only contain locations of the gang of the object associated with the rmi_handle::const_reference.h | Target distributed object handle. |
r | Location id range of the gang of h that the new gang will be created in. |
args | Arguments to pass to the constructor of T . |
void stapl::async_construct | ( | Function && | f, |
rmi_handle::const_reference const & | h, | ||
location_range_wrapper< U > const & | r, | ||
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over the range r
of the locations of the gang of h
and calls f
with the object pointer.
r
may only contain locations of the gang of the object associated with the rmi_handle::const_reference.f | Function to pass the pointer of the constructed object. |
h | Target distributed object handle. |
r | Location id range of the gang of h that the new gang will be created in. |
args | Arguments to pass to the constructor of T . |
future<rmi_handle::reference> stapl::construct | ( | level const & | l, |
Args &&... | args | ||
) |
Creates an object of type T
in a new gang over the level l
of the hierarchy.
l | Target hierarchy level. |
args | Arguments to pass to the constructor of T . |
future<typename callable_traits<MemFun>::result_type> stapl::restore | ( | Handle const & | h, |
MemFun const & | pmf, | ||
T &&... | t | ||
) |
Restores the SPMD execution of the gang of the given object, using as the entry point the given member function.
h | Handle to the target object. |
pmf | Member function to invoke. |
t | Arguments to pass to the member function. |
T const& stapl::get_p_object | ( | rmi_handle::const_reference const & | h | ) |
Returns a reference to the object registered with the rmi_handle that h
refers to.
This function can only return references to objects that have been registered in the same gang that the caller executes in.
h | Reference to an rmi_handle. |
T const& stapl::get_p_object | ( | rmi_handle::const_light_reference const & | h | ) |
Returns a reference to the object registered with the rmi_handle that h
refers to.
This function can only return references to objects that have been registered in the same gang that the caller executes in.
h | Reference to an rmi_handle. |
T& stapl::get_p_object | ( | rmi_handle::reference const & | h | ) |
Returns a reference to the object registered with the rmi_handle that h
refers to.
This function can only return references to objects that have been registered in the same gang that the caller executes in.
h | Reference to an rmi_handle. |
T& stapl::get_p_object | ( | rmi_handle::light_reference const & | h | ) |
Returns a reference to the object registered with the rmi_handle that h
refers to.
This function can only return references to objects that have been registered in the same gang that the caller executes in.
h | Reference to an rmi_handle. |
|
noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h
refers to.
This function will return a pointer to the object even if the requesting code executes in a gang other than the one that the object was registered in. The only requirement is that the location the object registered in and the location that the caller executes in are scheduled on the same thread.
h
is an invalid handle, nullptr
is returned instead of an error.h | Reference to an rmi_handle. |
|
noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h
refers to.
This function will return a pointer to the object even if the requesting code executes in a gang other than the one that the object was registered in. The only requirement is that the location the object registered in and the location that the caller executes in are scheduled on the same thread.
h
is an invalid handle, nullptr
is returned instead of an error.h | Reference to an rmi_handle. |
|
noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h
refers to.
This function will return a pointer to the object even if the requesting code executes in a gang other than the one that the object was registered in. The only requirement is that the location the object registered in and the location that the caller executes in are scheduled on the same thread.
h
is an invalid handle, nullptr
is returned instead of an error.h | Reference to an rmi_handle. |
|
noexcept |
Attempts to return a pointer to the object registered with the rmi_handle that h
refers to.
This function will return a pointer to the object even if the requesting code executes in a gang other than the one that the object was registered in. The only requirement is that the location the object registered in and the location that the caller executes in are scheduled on the same thread.
h
is an invalid handle, nullptr
is returned instead of an error.h | Reference to an rmi_handle. |
|
noexcept |
Returns if the two handles are defined over identical, similar or completely different gangs.
0
if the gangs of the two objects are identical, 1
if the gangs are similar (they exist on the same processing elements) or -1
if the gangs are completely different or information is not enough.