20 template <
typename G,
typename T,
typename E>
31 template <vector_mode_t V>
37 template <
typename L,
typename R>
64 std::normal_distribution<double> normal_distribution(0.0, 1.0);
65 auto noise = std::bind(normal_distribution, rand_engine);
67 if (x == 0.0 || x == value) {
78 static std::string
desc() noexcept {
79 return "ranged_noise";
89 template <
typename T,
typename E>
100 template <vector_mode_t V>
106 template <
typename L,
typename R>
115 static T
apply(
const T& x, E value) {
117 static std::normal_distribution<double> normal_distribution(0.0, 1.0);
118 static auto noise = std::bind(normal_distribution, rand_engine);
120 if (x == 0.0 || x == value) {
131 static std::string
desc() noexcept {
132 return "ranged_noise";
static constexpr bool desc_func
Indicates if the description must be printed as function.
Definition: ranged_noise.hpp:24
Binary operator for ranged noise generation.
Definition: ranged_noise.hpp:90
ranged_noise_binary_g_op(G &rand_engine)
Construct a new ranged_noise_binary_g_op.
Definition: ranged_noise.hpp:53
static constexpr bool linear
Indicates if the operator is linear or not.
Definition: ranged_noise.hpp:22
G & rand_engine
The random engine.
Definition: ranged_noise.hpp:48
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: ranged_noise.hpp:38
static constexpr int complexity()
Estimate the complexity of operator.
Definition: ranged_noise.hpp:44
static T apply(const T &x, E value)
Apply the unary operator on lhs and rhs.
Definition: ranged_noise.hpp:115
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: ranged_noise.hpp:32
T apply(const T &x, E value)
Apply the unary operator on lhs and rhs.
Definition: ranged_noise.hpp:63
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: ranged_noise.hpp:78
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: ranged_noise.hpp:131
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: ranged_noise.hpp:23
Binary operator for ranged noise generation.
Definition: ranged_noise.hpp:21
std::mt19937_64 random_engine
The random engine used by the library.
Definition: random.hpp:22