diff --git a/doc/manual/development/changelog.rst b/doc/manual/development/changelog.rst index 4539c6e7d..dc12a2076 100644 --- a/doc/manual/development/changelog.rst +++ b/doc/manual/development/changelog.rst @@ -3,12 +3,11 @@ 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -16,6 +15,12 @@ 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -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) ---------------------------------- diff --git a/doc/manual/manual/extensions/capd/peibos_capd.rst b/doc/manual/manual/extensions/capd/peibos_capd.rst index 0dd738611..fb80ca017 100644 --- a/doc/manual/manual/extensions/capd/peibos_capd.rst +++ b/doc/manual/manual/extensions/capd/peibos_capd.rst @@ -5,6 +5,8 @@ PEIBOS-CAPD Main author: `Maël Godard `_ +The content from this page supports multi-threading, see :ref:`here ` for details. + When compiling CODAC with the codac-capd extension (see :ref:`here `), 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`. diff --git a/doc/manual/manual/functions/peibos/peibos.rst b/doc/manual/manual/functions/peibos/peibos.rst index 160a14b20..f2afcf83f 100644 --- a/doc/manual/manual/functions/peibos/peibos.rst +++ b/doc/manual/manual/functions/peibos/peibos.rst @@ -5,6 +5,8 @@ PEIBOS Main author: `Maël Godard `_ +The content from this page supports multi-threading, see :ref:`here ` 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`. diff --git a/doc/manual/manual/tools/index.rst b/doc/manual/manual/tools/index.rst index c774c6c8e..86f6b4682 100644 --- a/doc/manual/manual/tools/index.rst +++ b/doc/manual/manual/tools/index.rst @@ -9,4 +9,5 @@ Tools serialization.rst registration.rst octasym.rst - sampled_traj_npz.rst \ No newline at end of file + sampled_traj_npz.rst + threading.rst \ No newline at end of file diff --git a/doc/manual/manual/tools/threading.rst b/doc/manual/manual/tools/threading.rst new file mode 100644 index 000000000..89ec6b943 --- /dev/null +++ b/doc/manual/manual/tools/threading.rst @@ -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 ` + + - :ref:`PEIBOS for ODE integration ` + +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(...); + \ No newline at end of file diff --git a/examples/11_peibos/main.m b/examples/11_peibos/main.m index be52dbcd8..c5fe7acfc 100644 --- a/examples/11_peibos/main.m +++ b/examples/11_peibos/main.m @@ -4,6 +4,9 @@ [currentDir, ~, ~] = fileparts(currentFilePath); cd(currentDir); +%% +set_nb_threads(max_threads()); + %% % 2D example of the PEIBOS algorithm