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_sequal) || (all_double_precision<L, R> && impl::egblas::has_dequal)
36 || (all_complex_single_precision<L, R> && impl::egblas::has_cequal)
37 || (all_complex_double_precision<L, R> && impl::egblas::has_zequal);
53 static constexpr
bool apply(
const T& lhs,
const T& rhs) noexcept {
64 template <
typename X,
typename Y,
typename YY>
69 auto t3 = force_temporary_gpu_dim_only_t<bool>(t1);
71 constexpr
size_t inca = gpu_inc<decltype(x)>;
72 constexpr
size_t incb = gpu_inc<decltype(y)>;
74 impl::egblas::equal(
etl::size(yy), t1.gpu_memory(), inca, t2.gpu_memory(), incb, t3.gpu_memory(), 1);
85 template <
typename X,
typename Y,
typename YY>
86 static YY&
gpu_compute(
const X& x,
const Y& y, YY& yy) noexcept {
90 constexpr
size_t inca = gpu_inc<decltype(x)>;
91 constexpr
size_t incb = gpu_inc<decltype(y)>;
93 impl::egblas::equal(
etl::size(yy), t1.gpu_memory(), inca, t2.gpu_memory(), incb, yy.gpu_memory(), 1);
105 static std::string
desc() noexcept {
static YY & gpu_compute(const X &x, const Y &y, YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: equal.hpp:86
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: equal.hpp:29
static constexpr bool apply(const T &lhs, const T &rhs) noexcept
Apply the unary operator on lhs and rhs.
Definition: equal.hpp:53
static auto gpu_compute_hint(const X &x, const Y &y, const YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: equal.hpp:65
EGBLAS wrappers for the equal operation.
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: equal.hpp:20
Binary operator for element wise equality.
Definition: equal.hpp:18
static constexpr bool linear
Indicates if the operator is linear or not.
Definition: equal.hpp:19
static constexpr int complexity()
Estimate the complexity of operator.
Definition: equal.hpp:43
constexpr size_t size(const E &expr) noexcept
Returns the size of the given ETL expression.
Definition: helpers.hpp:108
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: equal.hpp:105
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: equal.hpp:35
static constexpr bool desc_func
Indicates if the description must be printed as function.
Definition: equal.hpp:21