28 template <vector_mode_t V>
34 template <
typename L,
typename R>
35 static constexpr
bool gpu_computable = (all_single_precision<L, R> && impl::egblas::has_snot_equal)
36 || (all_double_precision<L, R> && impl::egblas::has_dnot_equal)
37 || (all_complex_single_precision<L, R> && impl::egblas::has_cnot_equal)
38 || (all_complex_double_precision<L, R> && impl::egblas::has_znot_equal);
54 static constexpr
bool apply(
const T& lhs,
const T& rhs) noexcept {
65 template <
typename X,
typename Y,
typename YY>
70 constexpr
size_t inca = gpu_inc<decltype(x)>;
71 constexpr
size_t incb = gpu_inc<decltype(y)>;
73 auto t3 = force_temporary_gpu_dim_only_t<bool>(t1);
75 impl::egblas::not_equal(
etl::size(yy), t1.gpu_memory(), inca, t2.gpu_memory(), incb, t3.gpu_memory(), 1);
86 template <
typename X,
typename Y,
typename YY>
87 static YY&
gpu_compute(
const X& x,
const Y& y, YY& yy) noexcept {
91 constexpr
size_t inca = gpu_inc<decltype(x)>;
92 constexpr
size_t incb = gpu_inc<decltype(y)>;
94 impl::egblas::not_equal(
etl::size(yy), t1.gpu_memory(), inca, t2.gpu_memory(), incb, yy.gpu_memory(), 1);
106 static std::string
desc() noexcept {
Binary operator for element wise inequality.
Definition: not_equal.hpp:18
static constexpr bool linear
Indicates if the operator is linear or not.
Definition: not_equal.hpp:19
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: not_equal.hpp:29
EGBLAS wrappers for the not_equal operation.
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: not_equal.hpp:20
static auto gpu_compute_hint(const X &x, const Y &y, YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: not_equal.hpp:66
static constexpr int complexity()
Estimate the complexity of operator.
Definition: not_equal.hpp:44
Root namespace for the ETL library.
Definition: adapter.hpp:15
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: not_equal.hpp:106
static constexpr bool apply(const T &lhs, const T &rhs) noexcept
Apply the unary operator on lhs and rhs.
Definition: not_equal.hpp:54
static YY & gpu_compute(const X &x, const Y &y, YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: not_equal.hpp:87
constexpr size_t size(const E &expr) noexcept
Returns the size of the given ETL expression.
Definition: helpers.hpp:108
static constexpr bool desc_func
Indicates if the description must be printed as function.
Definition: not_equal.hpp:21
decltype(auto) smart_gpu_compute_hint(E &expr, Y &y)
Compute the expression into a representation that is GPU up to date.
Definition: helpers.hpp:368
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: not_equal.hpp:35