echo "List of missing references:"
for f in $( (grep '<name>' build/xml/msg_8h.xml; \
grep '<name>' build/xml/namespacesimgrid_1_1s4u.xml; \
+ grep '<name>' build/xml/actor_8h.xml ; \
+ grep '<name>' build/xml/barrier_8h.xml ; \
+ grep '<name>' build/xml/cond_8h.xml ; \
+ grep '<name>' build/xml/engine_8h.xml ; \
+ grep '<name>' build/xml/host_8h.xml ; \
+ grep '<name>' build/xml/link_8h.xml ; \
+ grep '<name>' build/xml/mailbox_8h.xml ; \
+ grep '<name>' build/xml/msg_8h.xml ; \
+ grep '<name>' build/xml/mutex_8h.xml ; \
+ grep '<name>' build/xml/semaphore_8h.xml ; \
+ grep '<name>' build/xml/vm_8h.xml ; \
+ grep '<name>' build/xml/zone_8h.xml ; \
grep '<innerclass refid=' build/xml/namespacesimgrid_1_1s4u.xml ; \
) | sed 's/<[^>]*>//g' | sort )
do
intrusive_ptr_release
intrusive_ptr_add_ref
get_filtered_netzones_recursive
-simgrid::s4u::Storage
\ No newline at end of file
+simgrid::s4u::Storage
+simgrid::s4u::Activity_T
INPUT = ../../include/simgrid/forward.h
INPUT += ../../include/simgrid/s4u
INPUT += ../../include/simgrid/msg.h
+INPUT += ../../include/simgrid/actor.h
+INPUT += ../../include/simgrid/barrier.h
+INPUT += ../../include/simgrid/cond.h
+INPUT += ../../include/simgrid/engine.h
+INPUT += ../../include/simgrid/host.h
+#INPUT += ../../include/simgrid/instr.h
+INPUT += ../../include/simgrid/link.h
+INPUT += ../../include/simgrid/mailbox.h
+INPUT += ../../include/simgrid/mutex.h
+INPUT += ../../include/simgrid/semaphore.h
+INPUT += ../../include/simgrid/vm.h
+INPUT += ../../include/simgrid/zone.h
INPUT += ../../src/msg/
INPUT += ../../src/plugins/
RECURSIVE = YES
PREDEFINED += \
__cplusplus \
DOXYGEN \
+ SG_BEGIN_DECL= \
+ SG_END_DECL= \
XBT_PUBLIC= \
XBT_EXPORT_NO_IMPORT= \
XBT_IMPORT_NO_EXPORT= \
:protected-members:
:undoc-members:
+C API Reference
+***************
+
+==============
+Main functions
+==============
+
+.. doxygenfunction:: simgrid_init
+.. doxygenfunction:: simgrid_get_clock
+.. doxygenfunction:: simgrid_load_deployment
+.. doxygenfunction:: simgrid_load_platform
+.. doxygenfunction:: simgrid_register_default
+.. doxygenfunction:: simgrid_register_function
+.. doxygenfunction:: simgrid_run
+
+==================
+Condition Variable
+==================
+
+See also the :ref:`C++ API <API_s4u_ConditionVariable>`.
+
+.. doxygenfunction:: sg_cond_init
+.. doxygenfunction:: sg_cond_notify_all
+.. doxygenfunction:: sg_cond_notify_one
+.. doxygenfunction:: sg_cond_wait
+.. doxygenfunction:: sg_cond_wait_for
Python API Reference
********************
-The Python API is generated with pybind11. It closely mimicks the C++
+The Python API is automatically generated with pybind11. It closely mimicks the C++
API, to which you should refer for more information.
==========
-.. _platform:
-
.. raw:: html
<object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
<br/>
<br/>
+.. _platform:
+
Describing your Simulated Platform
##################################
#include <simgrid/forward.h>
-/* C interface */
-SG_BEGIN_DECL
+SG_BEGIN_DECL /* C interface */
+/** Initialize the SimGrid engine, taking the command line parameters of your main function. */
XBT_PUBLIC void simgrid_init(int* argc, char** argv);
+
+/** Creates a new platform, including hosts, links, and the routing table.
+ *
+ * \rst
+ * See also: :ref:`platform`.
+ * \endrst
+ */
XBT_PUBLIC void simgrid_load_platform(const char* filename);
+/** Load a deployment file and launch the actors that it contains
+ *
+ * \rst
+ * See also: :ref:`deploy`.
+ * \endrst
+ */
XBT_PUBLIC void simgrid_load_deployment(const char* filename);
+/** Run the simulation after initialization */
XBT_PUBLIC void simgrid_run();
+/** Registers the main function of an actor that will be launched from the deployment file */
XBT_PUBLIC void simgrid_register_function(const char* name, int (*code)(int, char**));
+/** Registers a function as the default main function of actors
+ *
+ * It will be used as fallback when the function requested from the deployment file was not registered.
+ * It is used for trace-based simulations (see examples/s4u/replay-comms and similar).
+ */
XBT_PUBLIC void simgrid_register_default(int (*code)(int, char**));
+/** Retrieve the simulation time (in seconds) */
XBT_PUBLIC double simgrid_get_clock();
+/** @brief Allow other libraries to react to the --help flag, too
+ *
+ * When finding --help on the command line, simgrid usually stops right after displaying its help message.
+ * If you are writing a library using simgrid, you may want to display your own help message before everything stops.
+ * If so, just call this function before having simgrid parsing the command line, and you will be given the control
+ * even if the user is asking for help.
+ */
XBT_PUBLIC void sg_config_continue_after_help();
+
SG_END_DECL
#endif /* INCLUDE_SIMGRID_ENGINE_H_ */
/** Finalize the default engine and all its dependencies */
static void shutdown();
- /** @brief Run the simulation */
+ /** @brief Run the simulation after initialization */
void run();
/** @brief Retrieve the simulation time (in seconds) */
/** @brief Retrieve the engine singleton */
static s4u::Engine* get_instance();
- /** @brief Load a platform file describing the environment
- *
- * The environment is either a XML file following the simgrid.dtd formalism, or a lua file.
- * Some examples can be found in the directory examples/platforms.
- */
void load_platform(const std::string& platf);
- /** Registers the main function of an actor that will be launched from the deployment file */
void register_function(const std::string& name, int (*code)(int, char**));
- /** Registers the main function of an actor that will be launched from the deployment file */
void register_function(const std::string& name, void (*code)(std::vector<std::string>));
-
- /** Registers a function as the default main function of actors
- *
- * It will be used as fallback when the function requested from the deployment file was not registered.
- * It is used for trace-based simulations (see examples/s4u/replay-comms and similar).
- */
void register_default(int (*code)(int, char**));
template <class F> void register_actor(const std::string& name)
});
}
- /** @brief Load a deployment file and launch the actors that it contains */
void load_deployment(const std::string& deploy);
protected:
}
/**
- * @brief A platform loader.
+ * Creates a new platform, including hosts, links, and the routing table.
*
- * Creates a new platform, including hosts, links, and the routing_table.
- * @param platf a filename of the XML description of a platform. This file follows this DTD :
- *
- * @include src/surf/xml/simgrid.dtd
- *
- * Here is a small example of such a platform
- *
- * @include examples/platforms/small_platform.xml
+ * \rst
+ * See also: :ref:`platform`.
+ * \endrst
*/
void Engine::load_platform(const std::string& platf)
{
XBT_DEBUG("PARSE TIME: %g", (end - start));
}
+/** Registers the main function of an actor that will be launched from the deployment file */
void Engine::register_function(const std::string& name, int (*code)(int, char**))
{
SIMIX_function_register(name, code);
}
+/** Registers the main function of an actor that will be launched from the deployment file */
void Engine::register_function(const std::string& name, void (*code)(std::vector<std::string>))
{
SIMIX_function_register(name, code);
}
+/** Registers a function as the default main function of actors
+ *
+ * It will be used as fallback when the function requested from the deployment file was not registered.
+ * It is used for trace-based simulations (see examples/s4u/replay-comms and similar).
+ */
void Engine::register_default(int (*code)(int, char**))
{
SIMIX_function_register_default(code);
}
+/** Load a deployment file and launch the actors that it contains
+ *
+ * \rst
+ * See also: :ref:`deploy`.
+ * \endrst
+ */
void Engine::load_deployment(const std::string& deploy)
{
SIMIX_launch_application(deploy);
}
-/** @brief Returns the amount of hosts in the platform */
+/** Returns the amount of hosts in the platform */
size_t Engine::get_host_count()
{
return pimpl->hosts_.size();