|
Expression Templates Library (ETL)
|
Unary operation sampling with a Bernoulli distribution. More...
#include <bernoulli.hpp>
Public Member Functions | |
| bernoulli_unary_g_op (G &rand_engine) | |
| Construct a new bernoulli_unary_g_op. | |
| T | apply (const T &x) const |
| 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 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. | |
| static constexpr bool | thread_safe = false |
| Indicates if the operator is thread safe or not. | |
| template<vector_mode_t V> | |
| static constexpr bool | vectorizable = false |
| 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 sampling with a Bernoulli distribution.
| T | The type of value |
|
inline |
Apply the unary operator on x.
| x | The value on which to apply the 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