Expression Templates Library (ETL)
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
etl::pow_binary_op< T, E > Struct Template Reference

Binary operator for scalar power. More...

#include <pow.hpp>

Public Types

template<typename V = default_vec>
using vec_type = typename V::template vec_type< T >
 

Public Member Functions

return V::exp (t2)
 

Static Public Member Functions

static constexpr int complexity ()
 Estimate the complexity of operator. More...
 
static constexpr T apply (const T &x, E value) noexcept
 Apply the unary operator on lhs and rhs. More...
 
template<typename V = default_vec>
static ETL_STRONG_INLINE (vec_type< V >) load(const vec_type< V > &x
 Compute several applications of the operator at a time. More...
 
template<typename X , typename Y , typename YY >
static auto gpu_compute_hint ([[maybe_unused]] const X &x, [[maybe_unused]] const Y &y, YY &yy) noexcept
 Compute the result of the operation using the GPU. More...
 
template<typename X , typename Y , typename YY >
static YY & gpu_compute (const X &x, [[maybe_unused]] const Y &y, YY &yy) noexcept
 Compute the result of the operation using the GPU. More...
 
static std::string desc () noexcept
 Returns a textual representation of the operator. More...
 

Public Attributes

static const vec_type< V > &y noexcept
 
auto t2 = V::mul(y, t1)
 

Static Public Attributes

static constexpr bool linear = true
 Indicates if the operator is linear or not.
 
static constexpr bool thread_safe = true
 Indicates if the operator is thread safe or not.
 
static constexpr bool desc_func = true
 Indicates if the description must be printed as function.
 
template<vector_mode_t V>
static constexpr bool vectorizable
 Indicates if the expression is vectorizable using the given vector mode. More...
 
template<typename L , typename R >
static constexpr bool gpu_computable
 Indicates if the operator can be computed on GPU. More...
 

Detailed Description

template<typename T, typename E>
struct etl::pow_binary_op< T, E >

Binary operator for scalar power.

Member Typedef Documentation

◆ vec_type

template<typename T , typename E >
template<typename V = default_vec>
using etl::pow_binary_op< T, E >::vec_type = typename V::template vec_type<T>

The vectorization type for V

Member Function Documentation

◆ apply()

template<typename T , typename E >
static constexpr T etl::pow_binary_op< T, E >::apply ( const T &  x,
value 
)
inlinestaticnoexcept

Apply the unary operator on lhs and rhs.

Parameters
xThe left hand side value on which to apply the operator
valueThe right hand side value on which to apply the operator
Returns
The result of applying the binary operator on lhs and rhs

◆ complexity()

template<typename T , typename E >
static constexpr int etl::pow_binary_op< T, E >::complexity ( )
inlinestatic

Estimate the complexity of operator.

Returns
An estimation of the complexity of the operator

◆ desc()

template<typename T , typename E >
static std::string etl::pow_binary_op< T, E >::desc ( )
inlinestaticnoexcept

Returns a textual representation of the operator.

Returns
a string representing the operator

◆ ETL_STRONG_INLINE()

template<typename T , typename E >
template<typename V = default_vec>
static etl::pow_binary_op< T, E >::ETL_STRONG_INLINE ( vec_type< V >  ) const &
static

Compute several applications of the operator at a time.

Parameters
xThe left hand side vector
yThe right hand side vector
Template Parameters
VThe vectorization mode
Returns
a vector containing several results of the operator

◆ gpu_compute()

template<typename T , typename E >
template<typename X , typename Y , typename YY >
static YY& etl::pow_binary_op< T, E >::gpu_compute ( const X &  x,
[[maybe_unused] ] const Y &  y,
YY &  yy 
)
inlinestaticnoexcept

Compute the result of the operation using the GPU.

Parameters
xThe expression of the unary operation
yThe expression into which to store the reuslt

◆ gpu_compute_hint()

template<typename T , typename E >
template<typename X , typename Y , typename YY >
static auto etl::pow_binary_op< T, E >::gpu_compute_hint ( [[maybe_unused] ] const X &  x,
[[maybe_unused] ] const Y &  y,
YY &  yy 
)
inlinestaticnoexcept

Compute the result of the operation using the GPU.

Parameters
xThe expression of the unary operation
Returns
The result of applying the unary operator on x. The result must be a GPU computed expression.

Member Data Documentation

◆ gpu_computable

template<typename T , typename E >
template<typename L , typename R >
constexpr bool etl::pow_binary_op< T, E >::gpu_computable
static
Initial value:
= (is_single_precision_t<T> && impl::egblas::has_spow_yx) || (is_double_precision_t<T> && impl::egblas::has_dpow_yx)
|| (is_complex_single_t<T> && impl::egblas::has_cpow_yx) || (is_complex_double_t<T> && impl::egblas::has_zpow_yx)

Indicates if the operator can be computed on GPU.

◆ noexcept

template<typename T , typename E >
const vec_type<V>& y etl::pow_binary_op< T, E >::noexcept
Initial value:
{
auto t1 = V::log(x)

◆ vectorizable

template<typename T , typename E >
template<vector_mode_t V>
constexpr bool etl::pow_binary_op< T, E >::vectorizable
static
Initial value:
=
(V == vector_mode_t::SSE3 && is_single_precision_t<T>) || (V == vector_mode_t::AVX && is_single_precision_t<T>) || (intel_compiler && !is_complex_t<T>)

Indicates if the expression is vectorizable using the given vector mode.

Template Parameters
VThe vector mode

The documentation for this struct was generated from the following file: