Creates a new gang by partitioning the existing one from which the gang construction is invoked. More...
Public Member Functions | |
gang (void) | |
Creates a new gang of one location. More... | |
template<typename MappingFunction , typename ResolutionFunction > | |
gang (const size_type size, MappingFunction &&mf, ResolutionFunction &&rf) | |
Creates a new gang. More... | |
template<typename MappingFunction , typename ResolutionFunction > | |
gang (const std::size_t id, const size_type size, MappingFunction &&mf, ResolutionFunction &&rf) | |
Creates a new gang. More... | |
template<typename T > | |
gang (T const &t) | |
Switches to the gang of t . | |
void | leave (void) |
Leaves the gang. More... | |
gang (gang const &)=delete | |
gang & | operator= (gang const &)=delete |
void * | operator new (std::size_t)=delete |
void | operator delete (void *)=delete |
void * | operator new[] (std::size_t)=delete |
void | operator delete[] (void *)=delete |
void * | operator new (std::size_t size, void *ptr) noexcept |
void | operator delete (void *ptr, void *ptr2) noexcept |
Public Types | |
using | size_type = runtime::gang_description::size_type |
Creates a new gang by partitioning the existing one from which the gang construction is invoked.
A new gang object has to be created in all locations that want to participate in it. It is the user's responsibility to ensure that.
The new gang is described by its size and two functions. The first function takes as input the id of a location in the creator gang and returns the id of a location in the created gang. The second function takes as input the id of a function in the created gang and returns the id of a location in the creator gang.
For example, creating a gang that includes all the even numbered locations of a gang can be done as follows:
stapl::gang::gang | ( | void | ) |
Creates a new gang of one location.
The creation of the metadata is deferred until any kind of object registration (rmi_handle, p_object) or communication is required.
stapl::gang::gang | ( | const size_type | size, |
MappingFunction && | mf, | ||
ResolutionFunction && | rf | ||
) |
Creates a new gang.
The creation of the metadata requires communication to set up the gang id, therefore the construction will only finish until the id is received.
size | Size of the new gang. |
mf | Mapping function to translate a location id from the creator gang to a location id in the created gang. |
rf | Mapping function to translate a location id from the created gang to a location id in the creator gang. |
stapl::gang::gang | ( | const std::size_t | id, |
const size_type | size, | ||
MappingFunction && | mf, | ||
ResolutionFunction && | rf | ||
) |
Creates a new gang.
Since the id is given at construction, there is no communication required to set-up the gang id. However, the user is responsible for supplying an unused gang id.
id | Id of the new gang. |
size | Size of the new gang. |
mf | Mapping function to translate a location id from the creator gang to a location id in the created gang. |
rf | Mapping function to translate a location id from the created gang to a location id in the creator gang. |
void stapl::gang::leave | ( | void | ) |
Leaves the gang.