From 79c329092b9b181b5b61bd449f1097d2a9ede468 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 19 Jul 2024 12:49:26 +0200 Subject: [PATCH 1/2] Comment about sampling rounding errors (#556) --- include/ddc/periodic_sampling.hpp | 6 ++++++ include/ddc/uniform_point_sampling.hpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/include/ddc/periodic_sampling.hpp b/include/ddc/periodic_sampling.hpp index b0882a3be..4ceac3161 100644 --- a/include/ddc/periodic_sampling.hpp +++ b/include/ddc/periodic_sampling.hpp @@ -135,6 +135,8 @@ class PeriodicSampling : detail::PeriodicSamplingBase /** Construct a Impl and associated discrete_domain_type from a segment * \f$[a, b] \subset [a, +\infty[\f$ and a number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain @@ -159,6 +161,8 @@ class PeriodicSampling : detail::PeriodicSamplingBase /** Construct a periodic `DiscreteDomain` from a segment \f$[a, b] \subset [a, +\infty[\f$ and a * number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain @@ -209,6 +213,8 @@ class PeriodicSampling : detail::PeriodicSamplingBase /** Construct a periodic `DiscreteDomain` from a segment \f$[a, b] \subset [a, +\infty[\f$ and a * number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain diff --git a/include/ddc/uniform_point_sampling.hpp b/include/ddc/uniform_point_sampling.hpp index 9cef40504..7eeae2673 100644 --- a/include/ddc/uniform_point_sampling.hpp +++ b/include/ddc/uniform_point_sampling.hpp @@ -116,6 +116,8 @@ class UniformPointSampling : detail::UniformPointSamplingBase /** Construct a Impl and associated discrete_domain_type from a segment * \f$[a, b] \subset [a, +\infty[\f$ and a number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain @@ -135,6 +137,8 @@ class UniformPointSampling : detail::UniformPointSamplingBase /** Construct a uniform `DiscreteDomain` from a segment \f$[a, b] \subset [a, +\infty[\f$ and a * number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain @@ -180,6 +184,8 @@ class UniformPointSampling : detail::UniformPointSamplingBase /** Construct a uniform `DiscreteDomain` from a segment \f$[a, b] \subset [a, +\infty[\f$ and a * number of points `n`. + * Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. + * One should expect usual floating point rounding errors. * * @param a coordinate of the first point of the domain * @param b coordinate of the last point of the domain From 24e28f0f50564b997598682d90584417bf39a99a Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 19 Jul 2024 12:49:49 +0200 Subject: [PATCH 2/2] Remove deprecated type traits (#555) --- include/ddc/non_uniform_point_sampling.hpp | 9 --------- include/ddc/uniform_point_sampling.hpp | 8 -------- 2 files changed, 17 deletions(-) diff --git a/include/ddc/non_uniform_point_sampling.hpp b/include/ddc/non_uniform_point_sampling.hpp index 7a97d6708..73f8a2d11 100644 --- a/include/ddc/non_uniform_point_sampling.hpp +++ b/include/ddc/non_uniform_point_sampling.hpp @@ -209,15 +209,6 @@ struct is_non_uniform_point_sampling template constexpr bool is_non_uniform_point_sampling_v = is_non_uniform_point_sampling::value; -template -using is_non_uniform_sampling [[deprecated("Use is_non_uniform_point_sampling instead")]] -= is_non_uniform_point_sampling; - -template -[[deprecated( - "Use is_non_uniform_point_sampling_v instead")]] constexpr bool is_non_uniform_sampling_v - = is_non_uniform_point_sampling_v; - template < class DDimImpl, std::enable_if_t< diff --git a/include/ddc/uniform_point_sampling.hpp b/include/ddc/uniform_point_sampling.hpp index 7eeae2673..73a692d19 100644 --- a/include/ddc/uniform_point_sampling.hpp +++ b/include/ddc/uniform_point_sampling.hpp @@ -217,14 +217,6 @@ struct is_uniform_point_sampling : public std::is_base_of constexpr bool is_uniform_point_sampling_v = is_uniform_point_sampling::value; -template -using is_uniform_sampling [[deprecated("Use is_uniform_point_sampling instead")]] -= is_uniform_point_sampling; - -template -[[deprecated("Use is_uniform_point_sampling_v instead")]] constexpr bool is_uniform_sampling_v - = is_uniform_point_sampling_v; - template < class DDimImpl, std::enable_if_t<