Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add missing symbols to the refguide
[simgrid.git] / docs / source / app_s4u.rst
index 9c8aef7..43afc8e 100644 (file)
@@ -56,7 +56,10 @@ synchronization mechanisms** such as |API_s4u_Barrier|_, |API_s4u_Semaphore|_,
 Each actor is located on a simulated |API_s4u_Host|_. Each host is located
 itself in a |API_s4u_NetZone|_, that knows the networking path between one
 resource to another. Each NetZone is included in another one, forming
-a tree of NetZones which root zone contains the whole platform.
+a tree of NetZones which root zone contains the whole platform. The
+actors can also be located on a |API_s4U_VirtualMachine|_ that may
+restrict the activities it contains to a limited amount of cores.
+Virtual machines can also be migrated between hosts.
 
 The :ref:`simgrid::s4u::this_actor <API_s4u_this_actor>` namespace
 provides many helper functions to simplify the code of actors.
@@ -116,8 +119,7 @@ provides many helper functions to simplify the code of actors.
 .. |API_s4u_Storages| replace:: **Storages**
 .. _API_s4u_Storages: #s4u-storage
 
-.. |API_s4u_VirtualMachines| replace:: **VirtualMachines**
-.. _API_s4u_VirtualMachines: #s4u-virtualmachine
+.. |API_s4u_VirtualMachine| replace:: **VirtualMachines**
 
 .. |API_s4u_Host| replace:: **Host**
 
@@ -298,7 +300,7 @@ balancing for free if more than one actor pulls from the mailbox:
 the first actor that can deal with the request will handle it.
 
 =========================================
-How put() and get() Requests are Matched?
+How are put() and get() requests matched?
 =========================================
 
 The matching algorithm simple: first come, first serve. When a new
@@ -315,7 +317,7 @@ Declaring a Receiving Actor
 
 The last twist is that by default in the simulator, the data starts
 to be exchanged only when both the sender and the receiver are
-declared (it waits until both :cpp:func:`put() <simgrid::s4u::Mailbox::put()>`
+announced (it waits until both :cpp:func:`put() <simgrid::s4u::Mailbox::put()>`
 and :cpp:func:`get() <simgrid::s4u::Mailbox::get()>` are posted). 
 In TCP, since you establish connexions beforehand, the data starts to
 flow as soon as the sender posts it, even if the receiver did not post
@@ -341,14 +343,13 @@ Memory Management
 
 For sake of simplicity, we use `RAII
 <https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization>`_
-everywhere in S4U. This is an idiom where resources are automatically
+for many classes in S4U. This is an idiom where resources are automatically
 managed through the context. Provided that you never manipulate
 objects of type Foo directly but always FooPtr references (which are
 defined as `boost::intrusive_ptr
 <http://www.boost.org/doc/libs/1_61_0/libs/smart_ptr/intrusive_ptr.html>`_
 <Foo>), you will never have to explicitely release the resource that
 you use nor to free the memory of unused objects.
-
 Here is a little example:
 
 .. code-block:: cpp
@@ -363,8 +364,13 @@ Here is a little example:
   
    } // The mutex gets automatically freed because the only existing reference gets out of scope
 
-API Reference
-*************
+Note that Mailboxes, Hosts and Links are not handled thought smart
+pointers (yet?). This means that it is currently impossible to destroy a
+mailbox or a link. You can still destroy an host (but probably
+shouldn't), using :cpp:func:`simgrid::s4u::Host::destroy`.
+
+C++ API Reference
+*****************
 
 .. _API_s4u_this_actor:
 
@@ -392,6 +398,8 @@ s4u::Actor
 
 .. doxygentypedef:: ActorPtr
 
+.. doxygentypedef:: aid_t
+
 .. doxygenclass:: simgrid::s4u::Actor
    :members:
    :protected-members:
@@ -460,6 +468,32 @@ s4u::Exec
    :protected-members:
    :undoc-members:
 
+.. _API_s4u_ExecSeq:
+
+============
+s4u::ExecSeq
+============
+
+.. doxygentypedef:: ExecSeqPtr
+
+.. doxygenclass:: simgrid::s4u::ExecSeq
+   :members:
+   :protected-members:
+   :undoc-members:
+
+.. _API_s4u_ExecPar:
+
+============
+s4u::ExecPar
+============
+
+.. doxygentypedef:: ExecParPtr
+
+.. doxygenclass:: simgrid::s4u::ExecPar
+   :members:
+   :protected-members:
+   :undoc-members:
+
 .. _API_s4u_Host:
 
 =========
@@ -503,8 +537,6 @@ s4u::Mailbox
 
 Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
 
-.. doxygentypedef:: MailboxPtr
-
 .. doxygenclass:: simgrid::s4u::Mailbox
    :members:
    :protected-members:
@@ -569,3 +601,58 @@ s4u::VirtualMachine
    :protected-members:
    :undoc-members:
 
+
+Python API Reference
+********************
+
+The Python API is generated with pybind11. It closely mimicks the C++
+API, to which you should refer for more information.
+
+==========
+this_actor
+==========
+
+.. automodule:: simgrid.this_actor
+   :members:
+
+===========
+Class Actor
+===========
+
+.. autoclass:: simgrid.Actor
+   :members:
+
+==========
+Class Comm
+==========
+
+.. autoclass:: simgrid.Comm
+   :members:
+
+============
+Class Engine
+============
+
+.. autoclass:: simgrid.Engine
+   :members:
+
+==========
+Class Exec
+==========
+
+.. autoclass:: simgrid.Exec
+   :members:
+
+==========
+Class Host
+==========
+
+.. autoclass:: simgrid.Host
+   :members:
+
+=============
+Class Mailbox
+=============
+
+.. autoclass:: simgrid.Mailbox
+   :members: