From cce8958981304075061d4e1c59df5ee1f6b93d92 Mon Sep 17 00:00:00 2001 From: godardma Date: Tue, 21 Apr 2026 09:47:38 +0200 Subject: [PATCH 1/3] [doc] updated changelog --- doc/manual/development/changelog.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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) ---------------------------------- From 8795cf13da3f45c355a642339229b5f29c400674 Mon Sep 17 00:00:00 2001 From: godardma Date: Tue, 21 Apr 2026 11:22:47 +0200 Subject: [PATCH 2/3] [doc] early doc for threads --- doc/manual/manual/tools/index.rst | 3 +- doc/manual/manual/tools/threading.rst | 41 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 doc/manual/manual/tools/threading.rst 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..3aebbe0ae --- /dev/null +++ b/doc/manual/manual/tools/threading.rst @@ -0,0 +1,41 @@ +.. _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:: + + .. group-tab:: Python + + set_nb_threads(max_threads()) # using as many threads as possible + PEIBOS(...) + .. group-tab:: C++ + + set_nb_threads(max_threads()); // using as many threads as possible + PEIBOS(...); + .. code-tab:: matlab + + TODO \ No newline at end of file From 312cd79ad486cfdf03ec0befdae92f24bae6e1e2 Mon Sep 17 00:00:00 2001 From: godardma Date: Tue, 21 Apr 2026 12:34:22 +0200 Subject: [PATCH 3/3] [doc] doc for multi-thread --- doc/manual/manual/extensions/capd/peibos_capd.rst | 2 ++ doc/manual/manual/functions/peibos/peibos.rst | 2 ++ doc/manual/manual/tools/threading.rst | 13 +++++++++---- examples/11_peibos/main.m | 3 +++ 4 files changed, 16 insertions(+), 4 deletions(-) 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/threading.rst b/doc/manual/manual/tools/threading.rst index 3aebbe0ae..89ec6b943 100644 --- a/doc/manual/manual/tools/threading.rst +++ b/doc/manual/manual/tools/threading.rst @@ -27,15 +27,20 @@ In addition, the function ``max_threads`` provides the maximum number of threads 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:: - - .. group-tab:: Python + + .. code-tab:: py set_nb_threads(max_threads()) # using as many threads as possible PEIBOS(...) - .. group-tab:: C++ + + + .. code-tab:: c++ set_nb_threads(max_threads()); // using as many threads as possible PEIBOS(...); + .. code-tab:: matlab - TODO \ No newline at end of file + 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