OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
rid Struct Reference

Detailed Description

Here we define different the remapped-id

rid, gid and lid are all unsigned long integer, and can be easily interchanged by mistake encapsulating avoid that this could happen. The second is readability, from the definition of function/structure we see immediately which id parameter accept/store

Definition at line 18 of file ids.hpp.

#include <ids.hpp>

Public Member Functions

 rid (size_t id)
 Cosntructor from id. More...
 
 rid ()
 Constructor.
 
bool operator<= (const rid &r) const
 Compare two gid. More...
 
bool operator< (const rid &r) const
 Compare two gid. More...
 
rid operator- (int i) const
 Subtract two gid. More...
 
rid operator- (struct rid i) const
 Subtract two gid. More...
 
rid operator+ (int i) const
 Sum two gid. More...
 
ridoperator+= (const rid &i)
 Sum two gid. More...
 
ridoperator++ ()
 Increment the id. More...
 
bool operator== (const rid &r) const
 compare two ids More...
 

Data Fields

idx_t id
 id
 

Constructor & Destructor Documentation

rid::rid ( size_t  id)
inline

Cosntructor from id.

Parameters
id

Definition at line 28 of file ids.hpp.

Member Function Documentation

rid rid::operator+ ( int  i) const
inline

Sum two gid.

Parameters
igid to subtract
Returns
itself

Definition at line 96 of file ids.hpp.

rid& rid::operator++ ( )
inline

Increment the id.

Returns
itself

Definition at line 121 of file ids.hpp.

rid& rid::operator+= ( const rid i)
inline

Sum two gid.

Parameters
igid to sum
Returns
itself

Definition at line 110 of file ids.hpp.

rid rid::operator- ( int  i) const
inline

Subtract two gid.

Parameters
i
Returns
itself

Definition at line 68 of file ids.hpp.

rid rid::operator- ( struct rid  i) const
inline

Subtract two gid.

Parameters
igid to subtract
Returns
itself

Definition at line 82 of file ids.hpp.

bool rid::operator< ( const rid r) const
inline

Compare two gid.

Parameters
rgid to compare with
Returns
the result for comparation

Definition at line 56 of file ids.hpp.

bool rid::operator<= ( const rid r) const
inline

Compare two gid.

Parameters
rgid to compare with
Returns
the result for comparation

Definition at line 44 of file ids.hpp.

bool rid::operator== ( const rid r) const
inline

compare two ids

Parameters
rid to check with
Returns
the result

Definition at line 135 of file ids.hpp.


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