unsigned int id_; // node id - 160 bits
RoutingTable table; // node routing table
public:
- simgrid::s4u::CommPtr receive_comm;
+ simgrid::s4u::CommPtr receive_comm = nullptr;
void* received_msg = nullptr;
unsigned int find_node_success = 0; // Number of find_node which have succeeded.
unsigned int find_node_failed = 0; // Number of find_node which have failed.
- explicit Node(unsigned int node_id) : id_(node_id), table(node_id), receive_comm(nullptr) {}
+ explicit Node(unsigned int node_id) : id_(node_id), table(node_id) {}
Node(const Node&) = delete;
Node& operator=(const Node&) = delete;
unsigned int getId() { return id_; }
Container& operator=(const Container&) = delete;
private:
- int last_id_;
+ int last_id_ = 0;
int is_lowest_ = 0;
public:
private:
/* vars to compute the Floyd algorithm. */
- int* predecessor_table_;
- double* cost_table_;
- RouteCreationArgs** link_table_;
+ int* predecessor_table_ = nullptr;
+ double* cost_table_ = nullptr;
+ RouteCreationArgs** link_table_ = nullptr;
};
} // namespace routing
} // namespace kernel
template <class T> class ReplayAction {
protected:
const std::string name;
- const aid_t my_proc_id;
+ const aid_t my_proc_id = s4u::this_actor::get_pid();
T args;
public:
- explicit ReplayAction(const std::string& name) : name(name), my_proc_id(s4u::this_actor::get_pid()) {}
+ explicit ReplayAction(const std::string& name) : name(name) {}
virtual ~ReplayAction() = default;
void execute(xbt::ReplayAction& action)
template<class T, class U>
class Extension {
static const std::size_t INVALID_ID = std::numeric_limits<std::size_t>::max();
- std::size_t id_;
+ std::size_t id_ = INVALID_ID;
friend class Extendable<T>;
explicit constexpr Extension(std::size_t id) : id_(id) {}
public:
- explicit constexpr Extension() : id_(INVALID_ID) {}
+ explicit constexpr Extension() {}
std::size_t id() const { return id_; }
bool valid() const { return id_ != INVALID_ID; }
};
FloydZone::FloydZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel)
: RoutedZone(father, name, netmodel)
{
- predecessor_table_ = nullptr;
- cost_table_ = nullptr;
- link_table_ = nullptr;
}
FloydZone::~FloydZone()
/** Debug information about a given function or scope within a function */
class Frame {
public:
- Frame();
+ Frame() = default;
/** Kind of scope (DW_TAG_subprogram, DW_TAG_inlined_subroutine, etc.) */
int tag = DW_TAG_invalid;
std::string name;
/** Range of instruction addresses for which this scope is valid */
- simgrid::xbt::Range<std::uint64_t> range;
+ simgrid::xbt::Range<std::uint64_t> range = {0, 0};
simgrid::dwarf::LocationList frame_base_location;
void* frame_base(unw_cursor_t& unw_cursor) const;
void remove_variable(char* name);
};
-
-inline Frame::Frame()
-{
- this->tag = 0;
- this->range = {0, 0};
- this->id = 0;
- this->abstract_origin_id = 0;
- this->object_info = nullptr;
-}
-
} // namespace mc
} // namespace simgrid
content_.reset(parse_content(content_str));
}
-FileSystemStorageExt::FileSystemStorageExt(simgrid::s4u::Storage* ptr)
+FileSystemStorageExt::FileSystemStorageExt(simgrid::s4u::Storage* ptr) : size_(ptr->get_impl()->size_)
{
content_.reset(parse_content(ptr->get_impl()->content_name_));
- size_ = ptr->get_impl()->size_;
}
std::map<std::string, sg_size_t>* FileSystemDiskExt::parse_content(const std::string& filename)
, last_reset_(surf_get_clock())
, current_speed_(host_->get_speed())
, current_flops_(host_->get_load())
- , theor_max_flops_(0)
{
}
~HostLoad() = default;
VirtualMachineImpl::VirtualMachineImpl(simgrid::s4u::VirtualMachine* piface, simgrid::s4u::Host* host_PM,
int core_amount, size_t ramsize)
- : HostImpl(piface), physical_host_(host_PM), core_amount_(core_amount), user_bound_(std::numeric_limits<double>::max()), ramsize_(ramsize)
+ : HostImpl(piface), physical_host_(host_PM), core_amount_(core_amount), ramsize_(ramsize)
{
/* Register this VM to the list of all VMs */
allVms_.push_back(piface);
private:
s4u::Host* physical_host_;
int core_amount_;
- double user_bound_;
+ double user_bound_ = std::numeric_limits<double>::max();
size_t ramsize_ = 0;
s4u::VirtualMachine::state vm_state_ = s4u::VirtualMachine::state::CREATED;
};
class Comm : public F2C, public Keyval{
friend Topo;
MPI_Group group_;
- SMPI_Topo_type topoType_;
+ SMPI_Topo_type topoType_ = MPI_INVALID_TOPO;
MPI_Topology topo_; // to be replaced by an union
- int refcount_;
+ int refcount_ = 1;
MPI_Comm leaders_comm_; // inter-node communicator
MPI_Comm intra_comm_; // intra-node communicator . For MPI_COMM_WORLD this can't be used, as var is global.
// use an intracomm stored in the process data instead
- int* leaders_map_; // who is the leader of each process
- int is_uniform_;
- int* non_uniform_map_; // set if smp nodes have a different number of processes allocated
- int is_blocked_; // are ranks allocated on the same smp node contiguous ?
+ int* leaders_map_ = nullptr; // who is the leader of each process
+ int is_uniform_ = 1;
+ int* non_uniform_map_ = nullptr; // set if smp nodes have a different number of processes allocated
+ int is_blocked_ = 0; // are ranks allocated on the same smp node contiguous ?
int is_smp_comm_; // set to 0 in case this is already an intra-comm or a leader-comm to avoid recursion
std::list<MPI_Win> rma_wins_; // attached windows for synchronization.
std::string name_;
MPI_Info info_;
int id_;
- MPI_Errhandler errhandler_;
+ MPI_Errhandler errhandler_ = MPI_ERRORS_ARE_FATAL;
public:
static std::unordered_map<int, smpi_key_elem> keyvals_;
Comm::Comm(MPI_Group group, MPI_Topology topo, int smp, int in_id) : group_(group), topo_(topo),is_smp_comm_(smp), id_(in_id)
{
- refcount_ = 1;
- topoType_ = MPI_INVALID_TOPO;
intra_comm_ = MPI_COMM_NULL;
leaders_comm_ = MPI_COMM_NULL;
- is_uniform_ = 1;
- non_uniform_map_ = nullptr;
- leaders_map_ = nullptr;
- is_blocked_ = 0;
info_ = MPI_INFO_NULL;
- errhandler_ = MPI_ERRORS_ARE_FATAL;
errhandler_->ref();
//First creation of comm is done before SIMIX_run, so only do comms for others
if(in_id==MPI_UNDEFINED && smp==0 && this->rank()!=MPI_UNDEFINED ){
class XBT_PRIVATE ActiveComm {
public:
- IBNode* destination;
- NetworkAction* action;
- double init_rate;
- ActiveComm() : destination(nullptr), action(nullptr), init_rate(-1){};
+ IBNode* destination = nullptr;
+ NetworkAction* action = nullptr;
+ double init_rate = -1;
+ ActiveComm() = default;
virtual ~ActiveComm() = default;
};
// store the number of comms received from each node
std::map<IBNode*, int> ActiveCommsDown;
// number of comms the node is receiving
- int nbActiveCommsDown;
- explicit IBNode(int id) : id(id), nbActiveCommsDown(0){};
+ int nbActiveCommsDown = 0;
+ explicit IBNode(int id) : id(id){};
virtual ~IBNode() = default;
};