CEPS  24.01
Cardiac ElectroPhysiology Simulator
ceps::HoldsProcIds Class Reference

Detailed Description

Abstract class for objects that contain a CPU Id.

The first element of the set of CPU IDs used as attribute is the owner of the object. Other pIDs are considered the "neighbors" (halo) of the object

Definition at line 45 of file HoldsProcIds.hpp.

#include <HoldsProcIds.hpp>

Inheritance diagram for ceps::HoldsProcIds:
[legend]

Public Member Functions

 HoldsProcIds (const CepsProcId &owner, const CepsVector< CepsProcId > &halosPid={})
 Constructor with own CPU Id and Ids of neighboring CPUs. More...
 
 HoldsProcIds ()=default
 Default constructor. More...
 
 HoldsProcIds (const HoldsProcIds &)=default
 Copy constructor. More...
 
 HoldsProcIds (HoldsProcIds &&) noexcept=default
 Copy constructor. More...
 
virtual ~HoldsProcIds ()=default
 Destructor. More...
 
HoldsProcIdsoperator= (const HoldsProcIds &)=default
 Assignment operator. More...
 
HoldsProcIdsoperator= (HoldsProcIds &&) noexcept=default
 Assignment operator. More...
 
CepsBool isShared () const
 Tells if there are halo CPUs. More...
 
void setShared (CepsBool flag)
 Tells if there are halo CPUs. More...
 
void setOwner (const CepsProcId &pid)
 Set shared between several processes ? More...
 
const CepsProcIdgetOwner () const
 Get owner (processus id) of this entity. More...
 
void setAsHaloFor (const CepsProcId &pid)
 Adds pid to the set of halo CPUs
More...
 
CepsBool isHaloFor (const CepsProcId &pid) const
 Detect if this entity is in the halo of. More...
 
void reset ()
 Gives ownership to rank(), removes halos. More...
 

Private Attributes

CepsVector< CepsProcIdm_procIds
 The CPU Ids, first element is owner, other are halos. More...
 
CepsBool m_isShared
 We can know that something is shared, but not by who... More...
 

Constructor & Destructor Documentation

◆ HoldsProcIds() [1/4]

ceps::HoldsProcIds::HoldsProcIds ( const CepsProcId owner,
const CepsVector< CepsProcId > &  halosPid = {} 
)
explicit

Constructor with own CPU Id and Ids of neighboring CPUs.

Definition at line 35 of file HoldsProcIds.cpp.

◆ HoldsProcIds() [2/4]

ceps::HoldsProcIds::HoldsProcIds ( )
default

Default constructor.

◆ HoldsProcIds() [3/4]

ceps::HoldsProcIds::HoldsProcIds ( const HoldsProcIds )
default

Copy constructor.

◆ HoldsProcIds() [4/4]

ceps::HoldsProcIds::HoldsProcIds ( HoldsProcIds &&  )
defaultnoexcept

Copy constructor.

◆ ~HoldsProcIds()

virtual ceps::HoldsProcIds::~HoldsProcIds ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getOwner()

const CepsProcId & ceps::HoldsProcIds::getOwner ( ) const

Get owner (processus id) of this entity.

Definition at line 66 of file HoldsProcIds.cpp.

◆ isHaloFor()

CepsBool ceps::HoldsProcIds::isHaloFor ( const CepsProcId pid) const

Detect if this entity is in the halo of.

Definition at line 83 of file HoldsProcIds.cpp.

◆ isShared()

CepsBool ceps::HoldsProcIds::isShared ( ) const

Tells if there are halo CPUs.

Definition at line 43 of file HoldsProcIds.cpp.

◆ operator=() [1/2]

HoldsProcIds& ceps::HoldsProcIds::operator= ( const HoldsProcIds )
default

Assignment operator.

◆ operator=() [2/2]

HoldsProcIds& ceps::HoldsProcIds::operator= ( HoldsProcIds &&  )
defaultnoexcept

Assignment operator.

◆ reset()

void ceps::HoldsProcIds::reset ( )

Gives ownership to rank(), removes halos.

Definition at line 89 of file HoldsProcIds.cpp.

◆ setAsHaloFor()

void ceps::HoldsProcIds::setAsHaloFor ( const CepsProcId pid)

Adds pid to the set of halo CPUs

Definition at line 72 of file HoldsProcIds.cpp.

◆ setOwner()

void ceps::HoldsProcIds::setOwner ( const CepsProcId pid)

Set shared between several processes ?

Definition at line 56 of file HoldsProcIds.cpp.

◆ setShared()

void ceps::HoldsProcIds::setShared ( CepsBool  flag)

Tells if there are halo CPUs.

Definition at line 49 of file HoldsProcIds.cpp.

Field Documentation

◆ m_isShared

CepsBool ceps::HoldsProcIds::m_isShared
private

We can know that something is shared, but not by who...

Definition at line 108 of file HoldsProcIds.hpp.

◆ m_procIds

CepsVector<CepsProcId> ceps::HoldsProcIds::m_procIds
private

The CPU Ids, first element is owner, other are halos.

Definition at line 105 of file HoldsProcIds.hpp.


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