Binary operator for scalar subtraction.
More...
#include <minus.hpp>
|
| template<typename V = default_vec> |
| using | vec_type = typename V::template vec_type< T > |
| |
|
| static constexpr int | complexity () |
| | Estimate the complexity of operator. More...
|
| |
| static constexpr T | apply (const T &lhs, const T &rhs) 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 L , typename R , typename Y > |
| static auto | gpu_compute_hint (const L &lhs, const R &rhs, Y &y) noexcept |
| | Compute the result of the operation using the GPU. More...
|
| |
| template<typename L , typename R , typename Y > |
| static Y & | gpu_compute (const L &lhs, const R &rhs, Y &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 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 = false |
| | Indicates if the description must be printed as function.
|
| |
| template<vector_mode_t V> |
| static constexpr bool | vectorizable = true |
| | 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...
|
| |
template<typename T>
struct etl::minus_binary_op< T >
Binary operator for scalar subtraction.
◆ vec_type
template<typename T >
template<typename V = default_vec>
The vectorization type for V
◆ apply()
Apply the unary operator on lhs and rhs.
- Parameters
-
| lhs | The left hand side value on which to apply the operator |
| rhs | The right hand side value on which to apply the operator |
- Returns
- The result of applying the binary operator on lhs and rhs
◆ complexity()
Estimate the complexity of operator.
- Returns
- An estimation of the complexity of the operator
◆ desc()
Returns a textual representation of the operator.
- Returns
- a string representing the operator
◆ gpu_compute()
template<typename T >
template<typename L , typename R , typename Y >
Compute the result of the operation using the GPU.
- Parameters
-
| lhs | The left hand side value on which to apply the operator |
| rhs | The right hand side value on which to apply the operator |
- Returns
- The result of applying the binary operator on lhs and rhs. The result must be a GPU computed expression.
◆ gpu_compute_hint()
template<typename T >
template<typename L , typename R , typename Y >
Compute the result of the operation using the GPU.
- Parameters
-
| lhs | The left hand side value on which to apply the operator |
| rhs | The right hand side value on which to apply the operator |
- Returns
- The result of applying the binary operator on lhs and rhs. The result must be a GPU computed expression.
◆ load()
template<typename T >
template<typename V = default_vec>
Compute several applications of the operator at a time.
- Parameters
-
| lhs | The left hand side vector |
| rhs | The right hand side vector |
- Template Parameters
-
- Returns
- a vector containing several results of the operator
◆ gpu_computable
template<typename T >
template<typename L , typename R >
Initial value:=
((!is_scalar<L> && !is_scalar<R>)&&((is_single_precision_t<T> && impl::egblas::has_saxpy_3 && impl::egblas::has_saxpby_3)
|| (is_double_precision_t<T> && impl::egblas::has_daxpy_3 && impl::egblas::has_daxpby_3)
|| (is_complex_single_t<T> && impl::egblas::has_caxpy_3 && impl::egblas::has_caxpby_3)
|| (is_complex_double_t<T> && impl::egblas::has_zaxpy_3 && impl::egblas::has_zaxpby_3)))
|| ((is_scalar<L> != is_scalar<R>)&&((is_single_precision_t<T> && impl::egblas::has_scalar_sadd && impl::egblas::has_scalar_smul)
|| (is_double_precision_t<T> && impl::egblas::has_scalar_dadd && impl::egblas::has_scalar_dmul)
|| (is_complex_single_t<T> && impl::egblas::has_scalar_cadd && impl::egblas::has_scalar_cmul)
|| (is_complex_double_t<T> && impl::egblas::has_scalar_zadd && impl::egblas::has_scalar_zmul)))
Indicates if the operator can be computed on GPU.
◆ vectorizable
template<typename T >
template<vector_mode_t V>
Indicates if the expression is vectorizable using the given vector mode.
- Template Parameters
-
The documentation for this struct was generated from the following file: