Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions doc/manual/development/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@
Changelog
=========

Pull Request from godardma (17/04/26)
-------------------------------------
Version 2.0.2
*************


Commit 52b81c8 ([cmake] warning for Doxygen version)
----------------------------------------------------
Commit ca1f6f4
--------------

set_axes change for Figure2D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since this PR, a bounding box can be passed to the set_axes method to specify the ranges of the x and y axes.
The old method with ``axis(id,Interval)`` still works

Version 2.0.0
*************

Commit 52b81c8 ([cmake] warning for Doxygen version)
----------------------------------------------------

Python binding build requirement
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -24,6 +29,8 @@ If this version is not available, the API documentation will not be generated,
which may cause issues when building the Python binding from source.
This has no impact on the C++ build nor on downloading/installing the Python packages.

Pre-Release
***********

Pull Request from godardma (15/10)
----------------------------------
Expand Down
2 changes: 2 additions & 0 deletions doc/manual/manual/extensions/capd/peibos_capd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PEIBOS-CAPD

Main author: `Maël Godard <https://godardma.github.io>`_

The content from this page supports multi-threading, see :ref:`here <sec-tools-threading>` for details.

When compiling CODAC with the codac-capd extension (see :ref:`here <subsec-extensions-capd-capd-install>`), the CAPD version of the PEIBOS library is also compiled.

Let us consider an initial set :math:`\mathbb{X}_0 \subset \mathbb{R}^n` with its boundary :math:`\partial \mathbb{X}_0`.
Expand Down
2 changes: 2 additions & 0 deletions doc/manual/manual/functions/peibos/peibos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PEIBOS

Main author: `Maël Godard <https://godardma.github.io>`_

The content from this page supports multi-threading, see :ref:`here <sec-tools-threading>` for details.

The PEIBOS tool provides a way to compute the Parallelepipedic Enclosure of the Image of the BOundary of a Set.

Let us consider an initial set :math:`\mathbb{X}_0 \subset \mathbb{R}^n` with its boundary :math:`\partial \mathbb{X}_0`.
Expand Down
3 changes: 2 additions & 1 deletion doc/manual/manual/tools/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Tools
serialization.rst
registration.rst
octasym.rst
sampled_traj_npz.rst
sampled_traj_npz.rst
threading.rst
46 changes: 46 additions & 0 deletions doc/manual/manual/tools/threading.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. _sec-tools-threading:

Multi-threading
===============

In Codac, some functions can be runned in parallel for faster computation. To do so, the library relies on CPU multi-threading.

Supported functions
-------------------

An exhaustive list of the functions that can parallelized in Codac is :

- PEIBOS

- :ref:`PEIBOS for analytic functions <sec-functions-peibos>`

- :ref:`PEIBOS for ODE integration <sec-extensions-capd-peibos>`

How it works
------------

By default, Codac uses only one thread for its computations.
A getter ``nb_threads`` and a setter ``set_nb_threads`` are available to get and change the number of threads.

In addition, the function ``max_threads`` provides the maximum number of threads usable on the machine.

To use a given number of threads in a function, the setter just needs to be called before running the desired function. An example is provided below

.. tabs::

.. code-tab:: py

set_nb_threads(max_threads()) # using as many threads as possible
PEIBOS(...)


.. code-tab:: c++

set_nb_threads(max_threads()); // using as many threads as possible
PEIBOS(...);

.. code-tab:: matlab

set_nb_threads(max_threads()); % using as many threads as possible
PEIBOS(...);

3 changes: 3 additions & 0 deletions examples/11_peibos/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[currentDir, ~, ~] = fileparts(currentFilePath);
cd(currentDir);

%%
set_nb_threads(max_threads());

%%
% 2D example of the PEIBOS algorithm

Expand Down