star-sp

Random number generators and distributions
git clone git://git.meso-star.fr/star-sp.git
Log | Files | Refs | README | LICENSE

commit 43245f9bfc33b3d04b7091c96ace670a234b579a
parent 141afbdba0620909fa209665f520419bf2859815
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 16 Mar 2022 09:49:39 +0100

Merge branch 'release_0.13' into develop

Diffstat:
MREADME.md | 27++++++++++++++++++++++++++-
Mcmake/CMakeLists.txt | 2+-
Msrc/ssp.h | 2+-
Msrc/ssp_ran.c | 2+-
Msrc/ssp_ranst_discrete.c | 2+-
Msrc/ssp_ranst_gaussian.c | 2+-
Msrc/ssp_ranst_piecewise_linear.c | 2+-
Msrc/ssp_rng.c | 2+-
Msrc/ssp_rng_c.h | 2+-
Msrc/ssp_rng_proxy.c | 2+-
Msrc/test_ssp_ran_circle.c | 2+-
Msrc/test_ssp_ran_circle.h | 2+-
Msrc/test_ssp_ran_discrete.c | 2+-
Msrc/test_ssp_ran_discrete.h | 2+-
Msrc/test_ssp_ran_gaussian.c | 2+-
Msrc/test_ssp_ran_gaussian.h | 2+-
Msrc/test_ssp_ran_hemisphere.c | 2+-
Msrc/test_ssp_ran_hemisphere.h | 2+-
Msrc/test_ssp_ran_hg.c | 2+-
Msrc/test_ssp_ran_hg.h | 2+-
Msrc/test_ssp_ran_piecewise_linear.c | 2+-
Msrc/test_ssp_ran_piecewise_linear.h | 2+-
Msrc/test_ssp_ran_sphere.c | 2+-
Msrc/test_ssp_ran_sphere.h | 2+-
Msrc/test_ssp_ran_sphere_cap.c | 2+-
Msrc/test_ssp_ran_sphere_cap.h | 2+-
Msrc/test_ssp_ran_spherical_zone.c | 2+-
Msrc/test_ssp_ran_spherical_zone.h | 2+-
Msrc/test_ssp_ran_tetrahedron.c | 2+-
Msrc/test_ssp_ran_tetrahedron.h | 2+-
Msrc/test_ssp_ran_triangle.c | 2+-
Msrc/test_ssp_ran_triangle.h | 2+-
Msrc/test_ssp_ran_uniform_disk.c | 2+-
Msrc/test_ssp_ran_uniform_disk.h | 2+-
Msrc/test_ssp_rng.c | 2+-
Msrc/test_ssp_rng.h | 2+-
Msrc/test_ssp_rng_proxy.c | 2+-
Msrc/test_ssp_rng_proxy.h | 2+-
Msrc/test_ssp_utils.h | 2+-
39 files changed, 64 insertions(+), 39 deletions(-)

diff --git a/README.md b/README.md @@ -34,6 +34,31 @@ variable to the directory that contains the `boost` include directory. ## Release notes +### Version 0.13 + +#### Index of the RNG proxy sequence + +Add the `sequence_id` variable to the RNG proxy. A sequence is a set of random +numbers consumed by the buckets managed by the RNG proxy. This new variable +saves the index of the current sequence relative to the initial state of the +RNG proxy. It thus identifies the set of random numbers already consumed and +currently reserved by an RNG proxy. This data is provided to allow the caller +to synchronize multiple RNG proxies. + +The new `ssp_rng_proxy_get_sequence_id` function allows the caller to retrieve +the index of the current sequence while the `ssp_rng_proxy_flush_sequences` +function allows to remove random numbers from the current sequence and those +from the next one. + +#### Issues in RNG proxy + + +- Fixes the `ssp_rng_proxy_read` function: cached RNG states were not being + cleaned up when updating the proxy state, resulting in the use of random + numbers generated from the wrong state. +- Fixes critical issues in the caching mechanism of the RNG proxy: a cache size + smaller than the size of an RNG state led to critical bugs. + ### Version 0.12.1 Fix creating a random number proxy generator using the KISS type: this type was @@ -141,7 +166,7 @@ CMake 3.20, version 2 has become obsolete. ## License -Copyright (C) 2015-2021 |Meso|Star> (<contact@meso-star.com>). Star-Sampling is +Copyright (C) 2015-2022 |Meso|Star> (<contact@meso-star.com>). Star-Sampling is free software released under the CeCILLv2.1 license. You are welcome to redistribute it under certain conditions; refer to the COPYING files for details. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) # # This software is a computer program whose purpose is to generate files # used to build the Star-SP library. diff --git a/src/ssp.h b/src/ssp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_ran.c b/src/ssp_ran.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_ranst_discrete.c b/src/ssp_ranst_discrete.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_ranst_gaussian.c b/src/ssp_ranst_gaussian.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_ranst_piecewise_linear.c b/src/ssp_ranst_piecewise_linear.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_rng.c b/src/ssp_rng.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_rng_c.h b/src/ssp_rng_c.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/ssp_rng_proxy.c b/src/ssp_rng_proxy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/test_ssp_ran_circle.c b/src/test_ssp_ran_circle.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_circle.h b/src/test_ssp_ran_circle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_discrete.c b/src/test_ssp_ran_discrete.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/test_ssp_ran_discrete.h b/src/test_ssp_ran_discrete.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_ran_gaussian.c b/src/test_ssp_ran_gaussian.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_ran_gaussian.h b/src/test_ssp_ran_gaussian.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a library whose purpose is to generate [pseudo] random * numbers and random variates. diff --git a/src/test_ssp_ran_hemisphere.c b/src/test_ssp_ran_hemisphere.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_hemisphere.h b/src/test_ssp_ran_hemisphere.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_hg.c b/src/test_ssp_ran_hg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_hg.h b/src/test_ssp_ran_hg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_piecewise_linear.c b/src/test_ssp_ran_piecewise_linear.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_ran_piecewise_linear.h b/src/test_ssp_ran_piecewise_linear.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_ran_sphere.c b/src/test_ssp_ran_sphere.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_sphere.h b/src/test_ssp_ran_sphere.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_sphere_cap.c b/src/test_ssp_ran_sphere_cap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_sphere_cap.h b/src/test_ssp_ran_sphere_cap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_spherical_zone.c b/src/test_ssp_ran_spherical_zone.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_spherical_zone.h b/src/test_ssp_ran_spherical_zone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_tetrahedron.c b/src/test_ssp_ran_tetrahedron.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_tetrahedron.h b/src/test_ssp_ran_tetrahedron.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_triangle.c b/src/test_ssp_ran_triangle.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_triangle.h b/src/test_ssp_ran_triangle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_ssp_ran_uniform_disk.c b/src/test_ssp_ran_uniform_disk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_ran_uniform_disk.h b/src/test_ssp_ran_uniform_disk.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_rng.c b/src/test_ssp_rng.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_rng.h b/src/test_ssp_rng.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_rng_proxy.c b/src/test_ssp_rng_proxy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_rng_proxy.h b/src/test_ssp_rng_proxy.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is a program whose purpose is to test the spp library. * diff --git a/src/test_ssp_utils.h b/src/test_ssp_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015-2022 |Meso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use,