|
Expression Templates Library (ETL)
|
Unary operation that clips all values between two scalars. More...
#include <clip.hpp>
Public Types | |
| template<typename V = default_vec> | |
| using | vec_type = typename V::template vec_type< T > |
Public Member Functions | |
| clip_scalar_op (S min, S max) | |
| Builds a new operator. More... | |
| constexpr T | apply (const T &x) const noexcept |
| Apply the unary operator on x. More... | |
| template<typename X , typename Y > | |
| auto | gpu_compute_hint (const X &x, Y &y) const noexcept |
| Compute the result of the operation using the GPU. More... | |
| template<typename X , typename Y > | |
| Y & | gpu_compute (const X &x, Y &y) const noexcept |
| Compute the result of the operation using the GPU. More... | |
Static Public Member Functions | |
| static constexpr int | complexity () |
| Estimate the complexity of operator. More... | |
| static std::string | desc () noexcept |
| Returns a textual representation of the operator. More... | |
Public Attributes | |
| S | min |
| The minimum for clipping. | |
| S | max |
| The maximum for clipping. | |
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. | |
| template<vector_mode_t V> | |
| static constexpr bool | vectorizable = intel_compiler && !is_complex_t<T> |
| Indicates if the expression is vectorizable using the given vector mode. More... | |
| template<typename E > | |
| static constexpr bool | gpu_computable |
| Indicates if the operator can be computed on GPU. More... | |
Unary operation that clips all values between two scalars.
| T | the type of value |
| S | the type of scalar |
| using etl::clip_scalar_op< T, S >::vec_type = typename V::template vec_type<T> |
The vectorization type for V
|
inline |
Builds a new operator.
| min | The minimum for clipping |
| max | The maximum for clipping |
|
inlinenoexcept |
Apply the unary operator on x.
| x | The value on which to apply the operator |
|
inlinestatic |
Estimate the complexity of operator.
|
inlinestaticnoexcept |
Returns a textual representation of the operator.
|
inlinenoexcept |
Compute the result of the operation using the GPU.
| x | The expression of the unary operation |
| y | The expression into which to store the reuslt |
|
inlinenoexcept |
Compute the result of the operation using the GPU.
| x | The expression of the unary operation |
|
static |
Indicates if the operator can be computed on GPU.
|
static |
Indicates if the expression is vectorizable using the given vector mode.
| V | The vector mode |
1.8.13