Unary operation computing the derivate of the RELU operation.
More...
#include <relu_derivative.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 T | apply (const T &x) |
| | Apply the unary operator on x. More...
|
| |
| template<typename V = default_vec> |
| static vec_type< V > | load (const vec_type< V > &x) noexcept |
| | Compute several applications of the operator at a time. More...
|
| |
| template<typename X , typename Y > |
| static auto | gpu_compute_hint (const X &x, Y &y) noexcept |
| | Compute the result of the operation using the GPU. More...
|
| |
| template<typename X , typename Y > |
| static Y & | gpu_compute (const X &x, Y &y) 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.
|
| |
|
static constexpr bool | thread_safe = true |
| | Indicates if the operator is thread safe or not.
|
| |
| template<vector_mode_t V> |
| static constexpr bool | vectorizable = !is_complex_t<T> |
| | Indicates if the expression is vectorizable using the given vector mode. More...
|
| |
|
template<typename E > |
| static constexpr bool | gpu_computable = is_floating_t<T>&& impl::egblas::has_srelu_der_out&& impl::egblas::has_drelu_der_out |
| | Indicates if the operator can be computed on GPU.
|
| |
template<typename T>
struct etl::relu_derivative_op< T >
Unary operation computing the derivate of the RELU operation.
- Template Parameters
-
◆ vec_type
template<typename T >
template<typename V = default_vec>
The vectorization type for V
◆ apply()
Apply the unary operator on x.
- Parameters
-
| x | The value on which to apply the operator |
- Returns
- The result of applying the unary operator on x
◆ 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 X , typename Y >
Compute the result of the operation using the GPU.
- Parameters
-
| x | The expression of the unary operation |
| y | The expression into which to store the reuslt |
◆ gpu_compute_hint()
template<typename T >
template<typename X , typename Y >
Compute the result of the operation using the GPU.
- Parameters
-
| x | The 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 T >
template<typename V = default_vec>
Compute several applications of the operator at a time.
- Parameters
-
| x | The vector on which to operate |
- Template Parameters
-
- Returns
- a vector containing several results of the operator
◆ 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: