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

Binary operator for scalar minimum. More...

#include <min.hpp>

Public Types

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

Static Public Member Functions

static constexpr int complexity ()
 Estimate the complexity of operator. More...
 
static constexpr LT apply (const LT &x, const RT &value) noexcept
 Apply the unary operator on lhs and rhs. More...
 
template<typename V = default_vec>
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. More...
 
template<typename X , typename Y , typename YY >
static auto gpu_compute_hint (const X &x, 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, 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...
 

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 = !is_complex_t<LT>
 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 LT, typename RT>
struct etl::min_binary_op< LT, RT >

Binary operator for scalar minimum.

Member Typedef Documentation

◆ vec_type

template<typename LT , typename RT >
template<typename V = default_vec>
using etl::min_binary_op< LT, RT >::vec_type = typename V::template vec_type<LT>

The vectorization type for V

Member Function Documentation

◆ apply()

template<typename LT , typename RT >
static constexpr LT etl::min_binary_op< LT, RT >::apply ( const LT &  x,
const RT &  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 LT , typename RT >
static constexpr int etl::min_binary_op< LT, RT >::complexity ( )
inlinestatic

Estimate the complexity of operator.

Returns
An estimation of the complexity of the operator

◆ desc()

template<typename LT , typename RT >
static std::string etl::min_binary_op< LT, RT >::desc ( )
inlinestaticnoexcept

Returns a textual representation of the operator.

Returns
a string representing the operator

◆ gpu_compute()

template<typename LT , typename RT >
template<typename X , typename Y , typename YY >
static YY& etl::min_binary_op< LT, RT >::gpu_compute ( const X &  x,
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 LT , typename RT >
template<typename X , typename Y , typename YY >
static auto etl::min_binary_op< LT, RT >::gpu_compute_hint ( const X &  x,
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.

◆ load()

template<typename LT , typename RT >
template<typename V = default_vec>
static vec_type<V> etl::min_binary_op< LT, RT >::load ( const vec_type< V > &  lhs,
const vec_type< V > &  rhs 
)
inlinestaticnoexcept

Compute several applications of the operator at a time.

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

Member Data Documentation

◆ gpu_computable

template<typename LT , typename RT >
template<typename L , typename R >
constexpr bool etl::min_binary_op< LT, RT >::gpu_computable
static
Initial value:
= (all_single_precision<L, R> && impl::egblas::has_smin3) || (all_double_precision<L, R> && impl::egblas::has_dmin3)
|| (all_complex_single_precision<L, R> && impl::egblas::has_cmin3)
|| (all_complex_double_precision<L, R> && impl::egblas::has_zmin3)

Indicates if the operator can be computed on GPU.

◆ vectorizable

template<typename LT , typename RT >
template<vector_mode_t V>
constexpr bool etl::min_binary_op< LT, RT >::vectorizable = !is_complex_t<LT>
static

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: