28 template <vector_mode_t V>
35 static constexpr
bool gpu_computable = (is_complex_single_t<T> && impl::egblas::has_cimag) || (is_complex_double_t<T> && impl::egblas::has_zimag);
61 template <
typename X,
typename Y>
65 auto t2 = etl::force_temporary_gpu_dim_only_t<typename T::value_type>(t1);
68 impl::egblas::imag(
etl::size(y), alpha, t1.gpu_memory(), 1, t2.gpu_memory(), 1);
79 template <
typename X,
typename Y>
85 impl::egblas::imag(
etl::size(y), alpha, t1.gpu_memory(), 1, y.gpu_memory(), 1);
97 static std::string
desc() noexcept {
EGBLAS wrappers for the imag operation.
value_t< sub_type > value_type
The value contained in the expression.
Definition: dyn_matrix_view.hpp:31
static constexpr bool linear
Indicates if the operator is linear.
Definition: imag.hpp:20
static auto gpu_compute_hint(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: imag.hpp:62
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: imag.hpp:29
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: imag.hpp:35
Root namespace for the ETL library.
Definition: adapter.hpp:15
T get_imag(const std::complex< T > &c)
Returns the imaginary part of the given complex number.
Definition: complex.hpp:515
Unary operation extracting the imag part of a complex number.
Definition: imag.hpp:19
static Y & gpu_compute(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: imag.hpp:80
constexpr size_t size(const E &expr) noexcept
Returns the size of the given ETL expression.
Definition: helpers.hpp:108
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: imag.hpp:21
static constexpr int complexity()
Estimate the complexity of operator.
Definition: imag.hpp:41
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 T::value_type apply(const T &x) noexcept
Apply the unary operator on x.
Definition: imag.hpp:50
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: imag.hpp:97