CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
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>
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... | |
HoldsProcIds & | operator= (const HoldsProcIds &)=default |
Assignment operator. More... | |
HoldsProcIds & | operator= (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 CepsProcId & | getOwner () 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< CepsProcId > | m_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... | |
|
explicit |
Constructor with own CPU Id and Ids of neighboring CPUs.
Definition at line 35 of file HoldsProcIds.cpp.
|
default |
Default constructor.
|
default |
Copy constructor.
|
defaultnoexcept |
Copy constructor.
|
virtualdefault |
Destructor.
const CepsProcId & ceps::HoldsProcIds::getOwner | ( | ) | const |
Get owner (processus id) of this entity.
Definition at line 66 of file HoldsProcIds.cpp.
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.
CepsBool ceps::HoldsProcIds::isShared | ( | ) | const |
Tells if there are halo CPUs.
Definition at line 43 of file HoldsProcIds.cpp.
|
default |
Assignment operator.
|
defaultnoexcept |
Assignment operator.
void ceps::HoldsProcIds::reset | ( | ) |
Gives ownership to rank(), removes halos.
Definition at line 89 of file HoldsProcIds.cpp.
void ceps::HoldsProcIds::setAsHaloFor | ( | const CepsProcId & | pid | ) |
Adds pid to the set of halo CPUs
Definition at line 72 of file HoldsProcIds.cpp.
void ceps::HoldsProcIds::setOwner | ( | const CepsProcId & | pid | ) |
Set shared between several processes ?
Definition at line 56 of file HoldsProcIds.cpp.
void ceps::HoldsProcIds::setShared | ( | CepsBool | flag | ) |
Tells if there are halo CPUs.
Definition at line 49 of file HoldsProcIds.cpp.
|
private |
We can know that something is shared, but not by who...
Definition at line 108 of file HoldsProcIds.hpp.
|
private |
The CPU Ids, first element is owner, other are halos.
Definition at line 105 of file HoldsProcIds.hpp.