28 template <vector_mode_t V>
36 static constexpr
bool gpu_computable = (is_single_precision_t<T> && impl::egblas::has_slog10) || (is_double_precision_t<T> && impl::egblas::has_dlog10)
37 || (is_complex_single_t<T> && impl::egblas::has_clog10) || (is_complex_double_t<T> && impl::egblas::has_zlog10);
50 template <
typename V = default_vec>
58 static constexpr T
apply(
const T& x) {
68 template <
typename V = default_vec>
80 template <
typename X,
typename Y>
87 impl::egblas::log10(
etl::size(y), alpha, t1.gpu_memory(), 1, t2.gpu_memory(), 1);
98 template <
typename X,
typename Y>
103 impl::egblas::log10(
etl::size(y), alpha, t1.gpu_memory(), 1, y.gpu_memory(), 1);
115 static std::string
desc() noexcept {
123 template <
typename TT>
127 static constexpr
bool linear =
true;
128 static constexpr
bool thread_safe =
true;
135 template <vector_mode_t V>
136 static constexpr
bool vectorizable =
false;
141 template <
typename E>
142 static constexpr
bool gpu_computable = (is_single_precision_t<T> && impl::egblas::has_slog10) || (is_double_precision_t<T> && impl::egblas::has_dlog10)
143 || (is_complex_single_t<T> && impl::egblas::has_clog10) || (is_complex_double_t<T> && impl::egblas::has_zlog10);
169 template <
typename X,
typename Y>
176 impl::egblas::log10(
etl::size(y), alpha, t1.gpu_memory(), 1, t2.gpu_memory(), 1);
187 template <
typename X,
typename Y>
192 impl::egblas::log10(
etl::size(y), alpha, t1.gpu_memory(), 1, y.gpu_memory(), 1);
204 static std::string
desc() noexcept {
EGBLAS wrappers for the log operation.
Complex number implementation.
Definition: complex.hpp:31
static constexpr T apply(const T &x)
Apply the unary operator on x.
Definition: log10.hpp:58
decltype(auto) select_smart_gpu_compute(X &x, Y &y)
Compute the expression into a representation that is GPU up to date and possibly store this represent...
Definition: helpers.hpp:434
typename V::template vec_type< T > vec_type
Definition: log10.hpp:51
SSE3 is the max vectorization available.
static auto gpu_compute_hint(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: log10.hpp:170
static constexpr T apply(const T &x)
Apply the unary operator on x.
Definition: log10.hpp:158
constexpr bool intel_compiler
Indicates if the projectis compiled with intel compiler.
Definition: config.hpp:225
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr bool gpu_computable
Indicates if the operator can be computed on GPU.
Definition: log10.hpp:36
static Y & gpu_compute(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: log10.hpp:99
static constexpr bool thread_safe
Indicates if the operator is thread safe or not.
Definition: log10.hpp:21
auto log10(E &&value) -> detail::unary_helper< E, log10_unary_op >
Apply logarithm (base 10) on each value of the given expression.
Definition: function_expression_builder.hpp:84
static constexpr bool vectorizable
Indicates if the expression is vectorizable using the given vector mode.
Definition: log10.hpp:29
static auto gpu_compute_hint(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: log10.hpp:81
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: log10.hpp:204
static constexpr bool linear
Indicates if the operator is linear.
Definition: log10.hpp:20
static constexpr int complexity()
Estimate the complexity of operator.
Definition: log10.hpp:43
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
AVX is the max vectorization available.
Unary operation taking the logarithmic value (base 10)
Definition: log10.hpp:19
static std::string desc() noexcept
Returns a textual representation of the operator.
Definition: log10.hpp:115
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 int complexity()
Estimate the complexity of operator.
Definition: log10.hpp:149
auto log(E &&value) -> detail::unary_helper< E, log_unary_op >
Apply logarithm (base e) on each value of the given expression.
Definition: function_expression_builder.hpp:64
static Y & gpu_compute(const X &x, Y &y) noexcept
Compute the result of the operation using the GPU.
Definition: log10.hpp:188
static vec_type< V > load(const vec_type< V > &x) noexcept
Compute several applications of the operator at a time.
Definition: log10.hpp:69