15 template <
typename T,
typename E>
26 template <vector_mode_t V>
32 template <
typename L,
typename R>
49 static constexpr T
apply(
const T& x, E value) noexcept {
50 return x == value ? 1.0 : 0.0;
57 static std::string
desc() noexcept {
Binary operator to get 1.0 if x equals to rhs value, 0 otherwise.
Definition: one_if.hpp:16
static constexpr int complexity()
Estimate the complexity of operator.
Definition: one_if.hpp:39
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: one_if.hpp:33
static constexpr bool linear
Indicates if the operator is linear or not.
Definition: one_if.hpp:17
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: one_if.hpp:27
static constexpr bool desc_func
Indicates if the description must be printed as function.
Definition: one_if.hpp:19
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr T apply(const T &x, E value) noexcept
Apply the unary operator on lhs and rhs.
Definition: one_if.hpp:49
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: one_if.hpp:57
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: one_if.hpp:18