Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the activations gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/celu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `celu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/elish.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `elish`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,11 @@ namespace grotto
namespace gadgets
{
struct elish
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) elish
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<elish>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/elu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `elu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/gelu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `gelu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct gelu
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) gelu
{
template <typename T>
T operator()(T x)
@ -42,6 +46,8 @@ struct gadget_hints<gelu>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/hardelish.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `hardelish`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/hardshrink.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `hardshrink`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,9 +20,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double hardshrink_default_lambda = 0.5;
template <double const & lambda = hardshrink_default_lambda>
struct hardshrink
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_hardshrink_lut) hardshrink
{
template <typename T>
T operator()(T x)
@ -45,6 +49,8 @@ struct gadget_hints<hardshrink<lambda>>
static constexpr std::array<double, degree+1> canonical_polys[] = { {0,1}, {0}, {0,1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/hardsigmoid.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `hardsigmoid`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct hardsigmoid
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_hardsigmoid_lut) hardsigmoid
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<hardsigmoid>
static constexpr std::array<double, degree+1> canonical_polys[] = { {0}, {0.5,1/6.0}, {1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/hardswish.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `hardswish`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct hardswish
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_hardswish_lut) hardswish
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<hardswish>
static constexpr std::array<double, degree+1> canonical_polys[] = { {0}, {0,0.5,1/6.0}, {0,1,0} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/hardtanh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `hardtanh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct hardtanh
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_hardtanh_lut) hardtanh
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<hardtanh>
static constexpr std::array<double, degree+1> canonical_polys[] = { {-1}, {0,1}, {1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/leakyrelu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `leakyrelu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,10 +20,14 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double leakyrelu_default_negative_slope = 0.01;
static constexpr double leakyrelu_zero_negative_slope = 0.0;
template <double const & negative_slope = leakyrelu_default_negative_slope>
struct leakyrelu
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_leaky_relu_lut) leakyrelu
{
template <typename T>
T operator()(T x)
@ -46,6 +50,8 @@ struct gadget_hints<leakyrelu<negative_slope>>
inline static constexpr std::array<double, degree+1> canonical_polys[] = { {0,negative_slope}, {0,1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/lecun_tanh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `lecun_tanh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/logsigmoid.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `logsigmoid`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,11 @@ namespace grotto
namespace gadgets
{
struct logsigmoid
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) logsigmoid
{
template <typename T>
T operator()(T x) { return std::log(sigmoid{}(x)); }
@ -40,6 +44,8 @@ struct gadget_hints<logsigmoid>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/mish.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `mish`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,11 @@ namespace grotto
namespace gadgets
{
struct mish
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) mish
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<mish>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/one_minus_relu.hpp
/// @file grotto/gadgets/activations/one_minus_sigmoid.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `one_minus_sigmoid`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,10 @@ namespace grotto
namespace gadgets
{
struct one_minus_sigmoid
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) one_minus_sigmoid
{
template <typename T>
T operator()(T x)
@ -43,6 +46,8 @@ struct gadget_hints<one_minus_sigmoid>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/relu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `relu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,10 @@ namespace grotto
namespace gadgets
{
using relu = leakyrelu<leakyrelu_zero_negative_slope>;
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
using relu HEDLEY_DEPRECATED_FOR(2026, grotto::make_relu_lut) = leakyrelu<leakyrelu_zero_negative_slope>;
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/relu6.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `relu6`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,9 +20,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double relu6_default_clip = 6;
template <double const & clip = 6>
struct relu6
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_relu6_lut) relu6
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<relu6<clip>>
static constexpr std::array<double, degree+1> canonical_polys[] = { 0, {0,1}, clip };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/selu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `selu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/serf.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `serf`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,7 +21,11 @@ namespace grotto
namespace gadgets
{
struct serf
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) serf
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<serf>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/sigmoid.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `sigmoid`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct sigmoid
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) sigmoid
{
template <typename T>
T operator()(T x) { return 1/(1+std::exp(-x)); }
@ -39,6 +43,8 @@ struct gadget_hints<sigmoid>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/silu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `silu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct silu
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) silu
{
template <typename T>
T operator()(T x) { return x*sigmoid{}(x); }
@ -39,6 +43,8 @@ struct gadget_hints<silu>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/smoothstep.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `smoothstep`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,9 +20,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double smoothstep_default_gamma = 1;
template <double const & gamma = smoothstep_default_gamma>
struct smoothstep
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) smoothstep
{
template <typename T>
T operator()(T x)
@ -46,6 +50,8 @@ struct gadget_hints<smoothstep<gamma>>
static constexpr std::array<double, degree+1> canonical_polys[] = { 0, {-2/(gamma*gamma*gamma),0,3/(2*gamma),0.5}, 1 };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/softminus.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `softminus`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -21,9 +21,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double softminus_default_beta = 1;
template <double const & beta = softminus_default_beta>
struct softminus
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) softminus
{
template <typename T>
T operator()(T x)
@ -45,6 +49,8 @@ struct gadget_hints<softminus<beta>>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/softplus.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `softplus`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,9 +20,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double softplus_default_beta = 1;
template <double const & beta = softplus_default_beta>
struct softplus
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) softplus
{
template <typename T>
T operator()(T x)
@ -45,6 +49,8 @@ struct gadget_hints<softplus<beta>>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/softshrink.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `softshrink`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,9 +20,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
static constexpr double softshrink_default_lambda = 0.5;
template <double const & lambda = softshrink_default_lambda>
struct softshrink
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_softshrink_lut) softshrink
{
template <typename T>
T operator()(T x)
@ -46,6 +50,8 @@ struct gadget_hints<softshrink<lambda>>
static constexpr std::array<double, degree+1> canonical_polys[] = { {lambda,1}, {0}, {-lambda,1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/softsign.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `softsign`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/squared_relu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `squared_relu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct squared_relu
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_squared_relu_lut) squared_relu
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<squared_relu>
static constexpr std::array<double, degree+1> canonical_polys[] = { {0}, {0,0,1} };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/starrelu.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `starrelu`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/tanhexp.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `tanhexp`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct tanhexp
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) tanhexp
{
template <typename T>
T operator()(T x) { return x*std::tanh(std::exp(x)); }
@ -39,6 +43,8 @@ struct gadget_hints<tanhexp>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/activations/tanhshrink.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `tanhshrink`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/binary.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the binary gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/binary/bt.hpp
/// @file grotto/gadgets/binary/bit.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `bit`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct countl_zero
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) countl_zero
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<countl_zero>
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/binary/prefix.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `prefix`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/binary/sg.hpp
/// @file grotto/gadgets/binary/sgn.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `sgn`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct sgn
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) sgn
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<sgn>
static constexpr std::array<double, degree+1> canonical_polys[] = { -1, 0, 1 };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/decimal.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the decimal gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/decimal/dec_ceil.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `dec_ceil`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/decimal/dec_floor.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `dec_floor`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/decimal/dec_width.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `dec_width`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/decimal/has_single_digit.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `has_single_digit`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the elementary gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/abs.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `abs`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct abs
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_abs_lut) abs
{
template <typename T>
T operator()(T x) { return std::abs(static_cast<double>(x)); }
@ -39,6 +43,8 @@ struct gadget_hints<abs>
static constexpr std::array<double, degree+1> canonical_polys[] = { { -1, 0 }, { 1, 0 } };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/approx.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `approx`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/boxcar.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `boxcar`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elemwntary/clip.hpp
/// @file grotto/gadgets/elementary/clip.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `clip`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -19,9 +19,13 @@ namespace grotto
namespace gadgets
{
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
template <double const & lower,
double const & upper>
struct clip
struct HEDLEY_DEPRECATED_FOR(2026, grotto::make_clip_lut) clip
{
static_assert(lower <= upper);
template <typename T>
@ -43,6 +47,8 @@ struct gadget_hints<clip<lower, upper>>
static constexpr std::array<double, degree+1> canonical_polys[] = { { lower, 0 }, { 0, 1 }, { upper, 0 } };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/eq.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `eq`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/geq.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `geq`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/gt.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `gt`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/identity.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `identity`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/leqw.hpp
/// @file grotto/gadgets/elementary/leq.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `leq`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/lt.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `lt`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/negative.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `negative`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double lt_target_zero = 0;
using negative = lt<lt_target_zero>;
using negative HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = lt<lt_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/neq.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `neq`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/nonnegative.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `nonnegative`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double geq_target_zero = 0;
using nonnegative = geq<geq_target_zero>;
using nonnegative HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = geq<geq_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/nonpositive.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `nonpositive`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double leq_target_zero = 0;
using nonpositive = leq<leq_target_zero>;
using nonpositive HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = leq<leq_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/nonzero.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `nonzero`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double neq_target_zero = 0;
using nonzero = neq<neq_target_zero>;
using nonzero HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = neq<neq_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/pmone.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `pmone`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/positive.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `positive`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double gt_target_zero = 0;
using positive = gt<gt_target_zero>;
using positive HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = gt<gt_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/rect.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `rect`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/step.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `step`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/ternary.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ternary`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/elementary/zero.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `zero`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -17,7 +17,7 @@ namespace gadgets
{
static constexpr double eq_target_zero = 0;
using zero = eq<eq_target_zero>;
using zero HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) = eq<eq_target_zero>;
} // namespace gadgets

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/exponential.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Deprecated cleartext `exp` / `exp2` / `exp10`. Use `eval_reduced`. Includes the exponential gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct exp
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) exp
{
template <typename T>
T operator()(T x) { return std::min(std::exp(static_cast<double>(x)), std::numeric_limits<T>::max()); }
@ -39,6 +43,8 @@ struct gadget_hints<exp>
static constexpr std::array<double, degree+1> * canonical_polys = nullptr;
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct exp10
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) exp10
{
template <typename T>
T operator()(T x) { return std::min(std::pow(10, static_cast<double>(x)), std::numeric_limits<T>::max()); }
@ -39,6 +43,8 @@ struct gadget_hints<exp10>
static constexpr std::array<double, degree+1> * hint_canonical_polys = nullptr;
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct exp2
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) exp2
{
template <typename T>
T operator()(T x) { return std::min(std::exp2(static_cast<double>(x)), std::numeric_limits<T>::max()); }
@ -39,6 +43,8 @@ struct gadget_hints<exp2>
static constexpr std::array<double, degree+1> * canonical_polys = nullptr;
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the hyperbolic gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/acosh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `acosh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/acoth.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `acoth`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/acsch.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `acsch`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/asech.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `asech`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/asinh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `asinh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/atanh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `atanh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/cosh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `cosh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct cosh
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) cosh
{
template <typename T>
T operator()(T x) { return std::min(std::cosh(static_cast<double>(x)), std::numeric_limits<T>::max()); }
@ -39,6 +43,8 @@ struct gadget_hints<cosh>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/coth.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `coth`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct coth
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) coth
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<coth>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/csch.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `csch`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct csch
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) csch
{
template <typename T>
T operator()(T x)
@ -44,6 +48,8 @@ struct gadget_hints<csch>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/sech.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `sech`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct sech
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) sech
{
template <typename T>
T operator()(T x) { return 1/std::cosh(static_cast<double>(x)); }
@ -39,6 +43,8 @@ struct gadget_hints<sech>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/sinh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `sinh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct sinh
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) sinh
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<sinh>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/hyperbolic/tanh.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `tanh`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct tanh
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) tanh
{
template <typename T>
T operator()(T x) { return std::tanh(static_cast<double>(x)); }
@ -39,6 +43,8 @@ struct gadget_hints<tanh>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the logarithm gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,7 @@
/// @file grotto/gadgets/logarithm/ilog10.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ilog10`.
/// @details The previous body of this header defined a second `ilog256`.
/// Integer log10 is `exact_constant::ilog10`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,29 +21,34 @@ namespace grotto
namespace gadgets
{
struct ilog256
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) ilog10
{
template <typename T>
T operator()(T x)
{
if (x <= 0) return 0; // TODO
return std::ceil(std::log2(static_cast(x))/8);
if (x <= 0) return 0;
return std::floor(std::log10(static_cast<double>(x)));
}
};
template <>
struct gadget_hints<ilog256>
struct gadget_hints<ilog10>
{
static constexpr double min = std::exp2(-63);
static constexpr double max = std::numeric_limits<double>::max();
static constexpr double hint_poles[] = { };
static constexpr double hint_interesting_points[] = { 0 };
static constexpr double poles[] = { 0 };
static constexpr double interesting_points[] = { 0 };
static constexpr unsigned degree = 0;
static constexpr bool has_canonical_representation = false;
static constexpr double canonical_bounds[] = { };
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/ilog16.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ilog16`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/ilog256.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ilog256`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/ilogb.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ilogb`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct ilogb
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::exact_constant) ilogb
{
template <typename T>
T operator()(T x)
@ -300,6 +304,8 @@ struct gadget_hints<grotto::gadgets::ilogb>
};
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/lg.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `lg`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct lg
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) lg
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<lg>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/ln.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `ln`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct ln
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) ln
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<ln>
static constexpr std::array<double, degree+1> canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/log10.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `log10`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct log10
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_reduced) log10
{
template <typename T>
T operator()(T x)
@ -43,6 +47,8 @@ struct gadget_hints<log10>
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/logn.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `logn`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/logarithm/logstar.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `logstar`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the misc gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/entropy.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `entropy`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/erf.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `erf`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,7 +20,11 @@ namespace grotto
namespace gadgets
{
struct erf
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) erf
{
template <typename T>
T operator()(T x) { std::erf(static_cast<double>(x)); }
@ -39,6 +43,8 @@ struct gadget_hints<erf>
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/erfc.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `erfc`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -20,14 +20,18 @@ namespace grotto
namespace gadgets
{
struct erf
HEDLEY_DIAGNOSTIC_PUSH
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
struct HEDLEY_DEPRECATED_FOR(2026, grotto::eval_window) erfc
{
template <typename T>
T operator()(T x) { std::erfc(static_cast<double>(x)); }
T operator()(T x) { return std::erfc(static_cast<double>(x)); }
};
template <>
struct gadget_hints<erf>
struct gadget_hints<erfc>
{
static constexpr double min = std::numeric_limits<double>::min();
static constexpr double max = std::numeric_limits<double>::max();
@ -39,6 +43,8 @@ struct gadget_hints<erf>
static constexpr std::array<double, degree+1> hint_canonical_polys[] = { };
};
HEDLEY_DIAGNOSTIC_POP
} // namespace gadgets
} // namespace grotto

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/expint.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `expint`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/gamma.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `gamma`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/i0.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `i0`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/lgamma.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `lgamma`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/reimann_zeta.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `reimann_zeta`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/misc/sinc.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Cleartext reference for `sinc`.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

View file

@ -1,6 +1,6 @@
/// @file grotto/gadgets/powers.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief
/// @brief Includes the powers gadget references.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.

Some files were not shown because too many files have changed in this diff Show more