Skip to content

Commit 8a9baf9

Browse files
committed
update documentation
Add a section about design principles and rebuild documentation.
1 parent 6024d85 commit 8a9baf9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+529
-7
lines changed

doc/sphinx/design.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _Design:
2+
3+
Library design principles
4+
=========================
5+
6+
MPL is designed on the basis of the following
7+
8+
Resource management
9+
-------------------
10+
11+
In a typical MPI program, a number of resources, e.g., communicators,
12+
custom data types etc., must be management. Allocation and deallocation
13+
of such resources must be done manually by explicitly calling the
14+
respective allocation and deallocation function. This is error-prone,
15+
may lead to resource leaks and requires a lot of boilerplate code.
16+
17+
Therefore, MPL applies the principle of "resource acquisition is
18+
initialization" (RAII) and wraps all resources in custom class types.
19+
Resources are allocated in a constructor and automatically dealocated
20+
when a resource object goes out of scope by the destructor. In contrast
21+
to MPI handles, all resource classes have a value-semantics. This means,
22+
when a resource object is copies in to another one, then a new resource
23+
is created and the two resource objects manage different independent
24+
resources.
25+
26+
27+
Custom data types
28+
-----------------
29+
30+
Custom data types are one of the most versatile features of MPI. With
31+
custom data types, it is possible to write very well structured
32+
code by hiding details of the complex communication pattern in
33+
well-designed custom data types. Therefore, MPL makes it easy to
34+
create and use custom data types. These are called layouts in MPL.

doc/sphinx/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MPL: A message passing library
66
:maxdepth: 2
77
:caption: Contents:
88

9+
design
910
installation
1011
cmake_integration
1112
data_types

docs/html/_sources/design.rst.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _Design:
2+
3+
Library design principles
4+
=========================
5+
6+
MPL is designed on the basis of the following
7+
8+
Resource management
9+
-------------------
10+
11+
In a typical MPI program, a number of resources, e.g., communicators,
12+
custom data types etc., must be management. Allocation and deallocation
13+
of such resources must be done manually by explicitly calling the
14+
respective allocation and deallocation function. This is error-prone,
15+
may lead to resource leaks and requires a lot of boilerplate code.
16+
17+
Therefore, MPL applies the principle of "resource acquisition is
18+
initialization" (RAII) and wraps all resources in custom class types.
19+
Resources are allocated in a constructor and automatically dealocated
20+
when a resource object goes out of scope by the destructor. In contrast
21+
to MPI handles, all resource classes have a value-semantics. This means,
22+
when a resource object is copies in to another one, then a new resource
23+
is created and the two resource objects manage different independent
24+
resources.
25+
26+
27+
Custom data types
28+
-----------------
29+
30+
Custom data types are one of the most versatile features of MPI. With
31+
custom data types, it is possible to write very well structured
32+
code by hiding details of the complex communication pattern in
33+
well-designed custom data types. Therefore, MPL makes it easy to
34+
create and use custom data types. These are called layouts in MPL.

docs/html/_sources/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MPL: A message passing library
66
:maxdepth: 2
77
:caption: Contents:
88

9+
design
910
installation
1011
cmake_integration
1112
data_types

docs/html/auxiliary.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
205205
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
206206
<ul class="current">
207+
<li class="toctree-l1"><a class="reference internal" href="design.html">Library design principles</a></li>
207208
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
208209
<li class="toctree-l1"><a class="reference internal" href="cmake_integration.html">CMake integration</a></li>
209210
<li class="toctree-l1"><a class="reference internal" href="data_types.html">Supported data types</a></li>

docs/html/cmake_integration.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
205205
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
206206
<ul class="current">
207+
<li class="toctree-l1"><a class="reference internal" href="design.html">Library design principles</a></li>
207208
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
208209
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">CMake integration</a></li>
209210
<li class="toctree-l1"><a class="reference internal" href="data_types.html">Supported data types</a></li>

docs/html/communicator.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
205205
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
206206
<ul class="current">
207+
<li class="toctree-l1"><a class="reference internal" href="design.html">Library design principles</a></li>
207208
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
208209
<li class="toctree-l1"><a class="reference internal" href="cmake_integration.html">CMake integration</a></li>
209210
<li class="toctree-l1"><a class="reference internal" href="data_types.html">Supported data types</a></li>

docs/html/constants.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
205205
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
206206
<ul class="current">
207+
<li class="toctree-l1"><a class="reference internal" href="design.html">Library design principles</a></li>
207208
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
208209
<li class="toctree-l1"><a class="reference internal" href="cmake_integration.html">CMake integration</a></li>
209210
<li class="toctree-l1"><a class="reference internal" href="data_types.html">Supported data types</a></li>

docs/html/data_types.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
205205
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
206206
<ul class="current">
207+
<li class="toctree-l1"><a class="reference internal" href="design.html">Library design principles</a></li>
207208
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
208209
<li class="toctree-l1"><a class="reference internal" href="cmake_integration.html">CMake integration</a></li>
209210
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Supported data types</a></li>

0 commit comments

Comments
 (0)