OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
 rid ()
 Constructor.
 
bool operator<= (const rid &r) const
 Compare two gid.
 
bool operator< (const rid &r) const
 Compare two gid.
 
rid operator- (int i) const
 Subtract two gid.
 
rid operator- (struct rid i) const
 Subtract two gid.
 
rid operator+ (int i) const
 Sum two gid.
 
ridoperator+= (const rid &i)
 Sum two gid.
 
ridoperator++ ()
 Increment the id.
 
bool operator== (const rid &r) const
 compare two ids
 

Data Fields

idx_t id
 id
 

Constructor & Destructor Documentation

◆ rid() [1/2]

rid::rid ( size_t  id)
inline

Cosntructor from id.

Parameters
id

Definition at line 28 of file ids.hpp.

◆ rid() [2/2]

rid::rid ( )
inline

Constructor.

Definition at line 33 of file ids.hpp.

Member Function Documentation

◆ operator+()

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

Sum two gid.

Parameters
igid to subtract
Returns
itself

Definition at line 96 of file ids.hpp.

◆ operator++()

rid & rid::operator++ ( )
inline

Increment the id.

Returns
itself

Definition at line 121 of file ids.hpp.

◆ operator+=()

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

Sum two gid.

Parameters
igid to sum
Returns
itself

Definition at line 110 of file ids.hpp.

◆ operator-() [1/2]

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

Subtract two gid.

Parameters
i
Returns
itself

Definition at line 68 of file ids.hpp.

◆ operator-() [2/2]

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.

◆ operator<()

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.

◆ operator<=()

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.

◆ operator==()

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.

Field Documentation

◆ id

idx_t rid::id

id

Definition at line 21 of file ids.hpp.


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