# What to read
INPUT = ../../include/simgrid/forward.h
-INPUT += ../../include/simgrid/s4u
+INPUT += ../../include/simgrid/plugins/
+INPUT += ../../include/simgrid/s4u/
INPUT += ../../include/simgrid/msg.h
INPUT += ../../include/simgrid/actor.h
INPUT += ../../src/s4u/s4u_Actor.cpp
INPUT += ../../include/simgrid/engine.h
INPUT += ../../include/simgrid/exec.h
INPUT += ../../include/simgrid/host.h
+INPUT += ../../src/s4u/s4u_Host.cpp
#INPUT += ../../include/simgrid/instr.h
INPUT += ../../include/simgrid/link.h
INPUT += ../../include/simgrid/mailbox.h
DOXYGEN \
SG_BEGIN_DECL= \
SG_END_DECL= \
+ SIMGRID_REGISTER_PLUGIN(id,desc,init)= \
XBT_PUBLIC= \
XBT_EXPORT_NO_IMPORT= \
XBT_IMPORT_NO_EXPORT= \
XBT_PRIVATE= \
XBT_ATTRIB_NORETURN= \
XBT_ATTRIB_UNUSED= \
- XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s,c,l)= \
- XBT_ATTRIB_DEPRECATED_v329(m)= \
- XBT_ATTRIB_DEPRECATED_v330(m)= \
- XBT_ATTRIB_DEPRECATED_v331(m)= \
- XBT_ATTRIB_DEPRECATED_v332(m)=
+ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \
+ XBT_ATTRIB_DEPRECATED_v329(mesg)= \
+ XBT_ATTRIB_DEPRECATED_v330(mesg)= \
+ XBT_ATTRIB_DEPRECATED_v331(mesg)= \
+ XBT_ATTRIB_DEPRECATED_v332(mesg)=
.. _pf_tag_zoneRoute:
<zoneRoute>
-------
+-----------
The purpose of this entity is to define a route between two zones.
Recall that all zones form a tree, so to connect two sibling zones,
*/
class XBT_PUBLIC ConditionVariable {
private:
+#ifndef DOXYGEN
friend kernel::activity::ConditionVariableImpl;
friend void kernel::activity::intrusive_ptr_release(kernel::activity::ConditionVariableImpl* cond);
+#endif
kernel::activity::ConditionVariableImpl* const pimpl_;
*/
class XBT_PUBLIC Disk : public xbt::Extendable<Disk> {
+#ifndef DOXYGEN
friend Engine;
friend Io;
friend kernel::resource::DiskImpl;
+#endif
explicit Disk(kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl) {}
virtual ~Disk() = default;
* This is a singleton containing all the main functions of the simulation.
*/
class XBT_PUBLIC Engine {
+#ifndef DOXYGEN
friend simgrid::kernel::EngineImpl;
+#endif
public:
/** Constructor, taking only the name of your main function */
/**
* @brief Add a model to engine list
*
- * @param model Pointer to model
- * @param list List of dependencies for this model (optional)
+ * @param model Pointer to model
+ * @param dependencies List of dependencies for this model (optional)
*/
void add_model(std::shared_ptr<simgrid::kernel::resource::Model> model,
const std::vector<kernel::resource::Model*>& dependencies = {});
* @endrst
*/
class XBT_PUBLIC Exec : public Activity_T<Exec> {
+#ifndef DOXYGEN
friend kernel::activity::ExecImpl;
+#endif
+
bool parallel_ = false;
protected:
/*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
static ssize_t wait_any_for(const std::vector<ExecPtr>& execs, double timeout);
+#ifndef DOXYGEN
XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for parameter")
static int wait_any(std::vector<ExecPtr>* execs) { return static_cast<int>(wait_any_for(*execs, -1)); }
XBT_ATTRIB_DEPRECATED_v332("Please use a plain vector for first parameter")
static int wait_any_for(std::vector<ExecPtr>* execs, double timeout) { return static_cast<int>(wait_any_for(*execs, timeout)); }
+#endif
/** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
* parallel executions. */
ExecPtr set_bound(double bound);
ExecPtr set_priority(double priority);
+#ifndef DOXYGEN
XBT_ATTRIB_DEPRECATED_v329("Please use exec_init(...)->wait_for(timeout)") ExecPtr set_timeout(double timeout);
+#endif
Host* get_host() const;
unsigned int get_host_number() const;
* The amount of flops per second available for computing depends on several things:
* - The current pstate determines the maximal peak computing speed (use @ref get_pstate_speed() to retrieve the
* computing speed you would get at another pstate)
- * - If you declared an external load (with @ref simgrid::surf::Cpu::set_speed_profile()), you must multiply the
+ * - If you declared an external load (with @ref set_speed_profile()), you must multiply the
* result of get_speed() by get_available_speed() to retrieve what a new computation would get.
*
* The remaining speed is then shared between the executions located on this host.
double get_speed() const;
/** @brief Get the available speed ratio, between 0 and 1.
*
- * This accounts for external load (see @ref simgrid::surf::Cpu::set_speed_profile()).
+ * This accounts for external load (see @ref set_speed_profile()).
*/
double get_available_speed() const;
#ifndef DOXYGEN
XBT_ATTRIB_DEPRECATED_v331("Please use Comm::sendto()") void sendto(Host* dest, double byte_amount);
-
XBT_ATTRIB_DEPRECATED_v331("Please use Comm::sendto_async()") CommPtr sendto_async(Host* dest, double byte_amount);
-
XBT_ATTRIB_DEPRECATED_v330("Please use Host::sendto()") void send_to(Host* dest, double byte_amount);
#endif
*/
class XBT_PUBLIC Io : public Activity_T<Io> {
+#ifndef DOXYGEN
friend kernel::activity::IoImpl;
+#endif
protected:
explicit Io(kernel::activity::IoImplPtr pimpl);
* @endrst
*/
class XBT_PUBLIC Link : public xbt::Extendable<Link> {
+#ifndef DOXYGEN
friend kernel::resource::LinkImpl;
+#endif
// Links are created from the NetZone, and destroyed by their private implementation when the simulation ends
explicit Link(kernel::resource::LinkImpl* pimpl) : pimpl_(pimpl) {}
/** @brief Mailboxes: Network rendez-vous points. */
class XBT_PUBLIC Mailbox {
+#ifndef DOXYGEN
friend Comm;
friend smpi::Request;
friend kernel::activity::MailboxImpl;
+#endif
kernel::activity::MailboxImpl* const pimpl_;
/** Creates (but don't start) a data reception onto that mailbox */
CommPtr get_init();
/** Creates and start an async data reception to that mailbox */
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get_async<>()") CommPtr get_async(void** data);
template <typename T> CommPtr get_async(T** data);
/** Blocking data reception */
template <typename T> T* get();
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get();
template <typename T> std::unique_ptr<T> get_unique() { return std::unique_ptr<T>(get<T>()); }
/** Blocking data reception with timeout */
template <typename T> T* get(double timeout);
- XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get(double timeout);
template <typename T> std::unique_ptr<T> get_unique(double timeout) { return std::unique_ptr<T>(get<T>(timeout)); }
+
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get_async<>()") CommPtr get_async(void** data);
+ XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get();
+ XBT_ATTRIB_DEPRECATED_v331("Please use typed template Mailbox::get<>()") void* get(double timeout);
+#endif
};
template <typename T> CommPtr Mailbox::get_async(T** data)
return res;
}
+#ifndef DOXYGEN
inline CommPtr Mailbox::get_async(void** data) // XBT_ATTRIB_DEPRECATED_v331
{
return get_async<void>(data);
{
return get<void>(timeout);
}
-
+#endif
} // namespace s4u
} // namespace simgrid
* @endrst
*/
class XBT_PUBLIC Mutex {
+#ifndef DOXYGEN
friend ConditionVariable;
friend kernel::activity::MutexImpl;
friend void kernel::activity::intrusive_ptr_release(kernel::activity::MutexImpl* mutex);
+#endif
kernel::activity::MutexImpl* const pimpl_;
/* refcounting */
* s4u::Engine).
*/
class XBT_PUBLIC NetZone {
+#ifndef DOXYGEN
+ friend kernel::routing::NetZoneImpl;
+#endif
+
kernel::routing::NetZoneImpl* const pimpl_;
protected:
- friend kernel::routing::NetZoneImpl;
-
explicit NetZone(kernel::routing::NetZoneImpl* impl) : pimpl_(impl) {}
public:
*
* @param src Source netzone's netpoint
* @param dst Destination netzone' netpoint
- * @param src_gw Netpoint of the gateway in the source netzone
- * @param dst_gw Netpoint of the gateway in the destination netzone
+ * @param gw_src Netpoint of the gateway in the source netzone
+ * @param gw_dst Netpoint of the gateway in the destination netzone
* @param link_list List of links used in this communication
* @param symmetrical Bi-directional communication
*/
void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
kernel::routing::NetPoint* gw_dst, const std::vector<Link*>& link_list, bool symmetrical = true);
+#ifndef DOXYGEN
XBT_ATTRIB_DEPRECATED_v332("Please use add_route() method which uses s4u::Link instead of LinkImpl") void add_route(
kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
kernel::routing::NetPoint* gw_dst, const std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
+#endif
void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
std::vector<kernel::resource::LinkImpl*>& link_list, bool symmetrical);
* @brief Create a host
*
* @param name Host name
- * @param speed_per_state Vector of CPU's speeds
+ * @param speed_per_pstate Vector of CPU's speeds
*/
s4u::Host* create_host(const std::string& name, const std::vector<double>& speed_per_pstate);
s4u::Host* create_host(const std::string& name, double speed);
*
*/
class XBT_PUBLIC Semaphore {
+#ifndef DOXYGEN
friend kernel::activity::SemaphoreImpl;
friend void kernel::activity::intrusive_ptr_release(kernel::activity::SemaphoreImpl* sem);
+#endif
kernel::activity::SemaphoreImpl* const pimpl_;
* @ingroup plugin_filesystem
*
* @param size of the file to write
+ * @param write_inside
* @return the number of bytes successfully write or -1 if an error occurred
*/
sg_size_t File::write(sg_size_t size, bool write_inside)
* @details A VM represent a virtual machine
*/
class XBT_PUBLIC VirtualMachineImpl : public surf::HostImpl, public simgrid::xbt::Extendable<VirtualMachineImpl> {
+#ifndef DOXYGEN
friend simgrid::s4u::VirtualMachine;
+#endif
public:
/** @brief Callbacks fired after VM creation. Signature: `void(VirtualMachineImpl&)` */
return this;
}
+#ifndef DOXYGEN
Host* Host::set_netpoint(kernel::routing::NetPoint* netpoint)
{
pimpl_netpoint_ = netpoint;
Engine::get_instance()->netpoint_unregister(pimpl_netpoint_);
delete pimpl_cpu_;
}
+#endif
/** @brief Fire the required callbacks and destroy the object
*
return pimpl_netpoint_->get_englobing_zone()->get_iface();
}
+#ifndef DOXYGEN
void Host::sendto(Host* dest, double byte_amount) // deprecated 331
{
Comm::sendto_async(this, dest, byte_amount)->wait();
{
Comm::sendto(this, dest, byte_amount);
}
+#endif
/** Get the properties assigned to a host */
const std::unordered_map<std::string, std::string>* Host::get_properties() const
return sg_host_get_speed(host);
}
-/** @brief Return the speed of the processor (in flop/s) at a given pstate. See also @ref plugin_energy.
+/** @brief Return the speed of the processor (in flop/s) at a given pstate. See also @ref plugin_host_energy.
*
* @param host host to test
* @param pstate_index pstate to test
/** @brief Returns the number of power states for a host.
*
- * See also @ref plugin_energy.
+ * See also @ref plugin_host_energy.
*/
int sg_host_get_nb_pstates(const_sg_host_t host)
{
/** @brief Gets the pstate at which that host currently runs.
*
- * See also @ref plugin_energy.
+ * See also @ref plugin_host_energy.
*/
int sg_host_get_pstate(const_sg_host_t host)
{
}
/** @brief Sets the pstate at which that host should run.
*
- * See also @ref plugin_energy.
+ * See also @ref plugin_host_energy.
*/
void sg_host_set_pstate(sg_host_t host, int pstate)
{
*
* @brief Start the host if it is off
*
- * See also #sg_host_is_on() to test the current state of the host and @ref plugin_energy
+ * See also #sg_host_is_on() to test the current state of the host and @ref plugin_host_energy
* for more info on DVFS.
*/
void sg_host_turn_on(sg_host_t host)
*
* @brief Stop the host if it is on
*
- * See also #MSG_host_is_on() to test the current state of the host and @ref plugin_energy
+ * See also #MSG_host_is_on() to test the current state of the host and @ref plugin_host_energy
* for more info on DVFS.
*/
void sg_host_turn_off(sg_host_t host)
/** @ingroup m_host_management
* @brief Determine if a host is up and running.
*
- * See also #sg_host_turn_on() and #sg_host_turn_off() to switch the host ON and OFF and @ref plugin_energy for more
- * info on DVFS.
+ * See also #sg_host_turn_on() and #sg_host_turn_off() to switch the host ON and OFF and @ref plugin_host_energy for
+ * more info on DVFS.
*
* @param host host to test
* @return Returns true if the host is up and running, and false if it's currently down