2026-09-24 14:08:32 -06:00
|
|
|
/// @file grotto/gadgets/activations/relu.hpp
|
|
|
|
|
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
|
2026-09-24 23:18:10 -06:00
|
|
|
/// @brief Cleartext reference for `relu`.
|
2026-09-24 14:08:32 -06:00
|
|
|
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
|
|
|
|
|
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
|
2026-09-24 23:27:47 -06:00
|
|
|
/// see [LICENSE.md](@ref license) for details.
|
2026-09-24 14:08:32 -06:00
|
|
|
|
|
|
|
|
#ifndef LIBDPF_INCLUDE_GROTTO_GADGETS_ACTIVATIONS_RELU_HPP__
|
|
|
|
|
#define LIBDPF_INCLUDE_GROTTO_GADGETS_ACTIVATIONS_RELU_HPP__
|
|
|
|
|
|
|
|
|
|
#include <cmath>
|
|
|
|
|
#include <array>
|
|
|
|
|
#include <limits>
|
|
|
|
|
|
|
|
|
|
#include "leakyrelu.hpp"
|
|
|
|
|
#include "grotto/gadget_hints.hpp"
|
|
|
|
|
|
|
|
|
|
namespace grotto
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
namespace gadgets
|
|
|
|
|
{
|
|
|
|
|
|
2026-09-24 23:18:10 -06:00
|
|
|
HEDLEY_DIAGNOSTIC_PUSH
|
|
|
|
|
HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED
|
2026-09-28 05:59:19 -06:00
|
|
|
/// @brief Alias of another cleartext functor, under the name `relu`.
|
|
|
|
|
/// @see grotto::make_relu_lut
|
|
|
|
|
/// \complexity Same as the functor it aliases: one straight-line `operator()`. `Θ(1)`.
|
2026-09-24 23:18:10 -06:00
|
|
|
using relu HEDLEY_DEPRECATED_FOR(2026, grotto::make_relu_lut) = leakyrelu<leakyrelu_zero_negative_slope>;
|
|
|
|
|
HEDLEY_DIAGNOSTIC_POP
|
2026-09-24 14:08:32 -06:00
|
|
|
|
|
|
|
|
} // namespace gadgets
|
|
|
|
|
|
|
|
|
|
} // namespace grotto
|
|
|
|
|
|
|
|
|
|
#endif // LIBDPF_INCLUDE_GROTTO_GADGETS_ACTIVATIONS_RELU_HPP__
|