17 template <
typename LT,
typename RT>
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_smin3) || (all_double_precision<L, R> && impl::egblas::has_dmin3)
36 || (all_complex_single_precision<L, R> && impl::egblas::has_cmin3)
37 || (all_complex_double_precision<L, R> && impl::egblas::has_zmin3);
50 template <
typename V = default_vec>
59 static constexpr LT
apply(
const LT& x,
const RT& value) noexcept {
74 template <
typename V = default_vec>
76 return V::min(lhs, rhs);
86 template <
typename X,
typename Y,
typename YY>
91 constexpr
size_t inca = gpu_inc<decltype(x)>;
92 constexpr
size_t incb = gpu_inc<decltype(y)>;
97 impl::egblas::min(
etl::size(yy), alpha, t1.gpu_memory(), inca, t2.gpu_memory(), incb, t3.gpu_memory(), 1);
108 template <
typename X,
typename Y,
typename YY>
113 constexpr
size_t inca = gpu_inc<decltype(x)>;
114 constexpr
size_t incb = gpu_inc<decltype(y)>;
117 impl::egblas::min(
etl::size(yy), alpha, t1.gpu_memory(), inca, t2.gpu_memory(), incb, yy.gpu_memory(), 1);
129 static std::string
desc() noexcept {
EGBLAS wrappers for the min operation.
static constexpr int complexity()
Estimate the complexity of operator.
Definition: min.hpp:43
typename V::template vec_type< LT > vec_type
Definition: min.hpp:51
static YY & gpu_compute(const X &x, const Y &y, YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: min.hpp:109
static constexpr LT apply(const LT &x, const RT &value) noexcept
Apply the unary operator on lhs and rhs.
Definition: min.hpp:59
static constexpr bool desc_func
Indicates if the description must be printed as function.
Definition: min.hpp:21
static auto gpu_compute_hint(const X &x, const Y &y, YY &yy) noexcept
Compute the result of the operation using the GPU.
Definition: min.hpp:87
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: min.hpp:35
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: min.hpp:29
decltype(auto) force_temporary_gpu_dim_only(E &&expr)
Force a temporary out of the expression, without copying its content.
Definition: temporary.hpp:223
constexpr size_t size(const E &expr) noexcept
Returns the size of the given ETL expression.
Definition: helpers.hpp:108
Binary operator for scalar minimum.
Definition: min.hpp:18
static constexpr bool linear
Indicates if the operator is linear or not.
Definition: min.hpp:19
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: min.hpp:20
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: min.hpp:129
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 vec_type< V > load(const vec_type< V > &lhs, const vec_type< V > &rhs) noexcept
Compute several applications of the operator at a time.
Definition: min.hpp:75