STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions

Implements the base class for distributed objects. More...

Public Member Functions

 p_object (const unsigned int flags=0)
 Constructs a new p_object. More...
 
 p_object (p_object const &other)
 Copy constructs a new p_object in the gang of the caller. More...
 
 p_object (p_object &&other)
 Move constructs a new p_object in the gang of the caller. More...
 
p_objectoperator= (p_object const &other) noexcept
 Assigns other to *this. More...
 
p_objectoperator= (p_object &&other) noexcept
 Move assigns other to *this. More...
 
runtime::location_md const & get_location_md (void) const noexcept
 Returns the location metadata of the location this object registered in.
 
runtime::location_mdget_location_md (void) noexcept
 Returns the location metadata of the location this object registered in. noexcept More...
 
Distributed Object Management
rmi_handle::const_reference const & get_rmi_handle (void) const noexcept
 Returns the associated rmi_handle.
 
rmi_handle::reference const & get_rmi_handle (void) noexcept
 Returns the associated rmi_handle.
 
size_type get_location_id (void) const noexcept
 Returns the location id of the local sub-object.
 
size_type get_num_locations (void) const noexcept
 Returns the number of locations of the gang of this p_object.
 
void advance_epoch (void)
 Advances the epoch of the object. More...
 
void unlock (void)
 Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More...
 
void lock (void)
 Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More...
 
bool try_lock (void)
 Attempt to maintain atomicity with respect to incoming RMIs. More...
 

Public Types

using size_type = rmi_handle::size_type
 

Protected Member Functions

virtual ~p_object (void)=default
 Unregisters and destroys this p_object.
 

Detailed Description

Implements the base class for distributed objects.

A user class can extend from p_object to have automatic registration and unregistration, as well as access to information describing the location it was created in without the need to call the stand-alone functions.

See also
rmi_handle

Constructor & Destructor Documentation

◆ p_object() [1/3]

stapl::p_object::p_object ( const unsigned int  flags = 0)
explicit

Constructs a new p_object.

Parameters
flagsRegistration flags.

◆ p_object() [2/3]

stapl::p_object::p_object ( p_object const &  other)

Copy constructs a new p_object in the gang of the caller.

Warning
The new object is registered in the current gang, not in the gang of other.

◆ p_object() [3/3]

stapl::p_object::p_object ( p_object &&  other)

Move constructs a new p_object in the gang of the caller.

Warning
The new object is registered in the current gang, not in the gang of other.

Member Function Documentation

◆ operator=() [1/2]

p_object& stapl::p_object::operator= ( p_object const &  other)
noexcept

Assigns other to *this.

Warning
The gang associated with *this does not change.

◆ operator=() [2/2]

p_object& stapl::p_object::operator= ( p_object &&  other)
noexcept

Move assigns other to *this.

Warning
The gang associated with *this does not change.

◆ get_location_md()

runtime::location_md& stapl::p_object::get_location_md ( void  )
noexcept

Returns the location metadata of the location this object registered in. noexcept

noexcept

◆ advance_epoch()

void stapl::p_object::advance_epoch ( void  )

Advances the epoch of the object.

Advancing the epoch will flush any pending RMIs. It will also increase the epoch of the current gang if the object is not a named object.

◆ unlock()

void stapl::p_object::unlock ( void  )

Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs.

Mutates counter in the associated runqueue.

◆ lock()

void stapl::p_object::lock ( void  )

Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs.

Mutates counter in the associated runqueue.

◆ try_lock()

bool stapl::p_object::try_lock ( void  )

Attempt to maintain atomicity with respect to incoming RMIs.

Mutates counter in the associated runqueue.

Returns
true if the lock was able to be acquired. false if it is already locked.

The documentation for this class was generated from the following file: