|
Expression Templates Library (ETL)
|
Transformer to implement one if max sub on 2D matrix. More...
#include <flip_transformers.hpp>
Public Types | |
| using | sub_type = T |
| The type on which the expression works. | |
| using | value_type = value_t< T > |
| The type of valuie. | |
Public Member Functions | |
| one_if_max_sub_transformer (sub_type expr) | |
| Construct a new transformer around the given expression. More... | |
| value_type | operator[] (size_t i) const |
| Returns the value at the given index. More... | |
| value_type | read_flat (size_t i) const |
| Returns the value at the given index This function never has side effects. More... | |
| value_type | operator() (size_t i, size_t j) const |
| Access to the value at the given (i, j) position. More... | |
| template<typename E > | |
| bool | alias (const E &rhs) const noexcept |
| Test if this expression aliases with the given expression. More... | |
| template<typename Y > | |
| auto | gpu_compute_hint (Y &y) const noexcept |
| Compute the result of the operation using the GPU. More... | |
| template<typename Y > | |
| Y & | gpu_compute (Y &y) const noexcept |
| Compute the result of the operation using the GPU. More... | |
| template<typename V > | |
| void | visit (V &&visitor) const |
| Apply the given visitor to this expression and its descendants. More... | |
| void | ensure_cpu_up_to_date () const |
| Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value). | |
| void | ensure_gpu_up_to_date () const |
| Copy back from the GPU to the expression memory if necessary. | |
Public Attributes | |
| friend | etl_traits< one_if_max_sub_transformer > |
Static Public Attributes | |
| static constexpr bool | gpu_computable = impl::egblas::has_sone_if_max_sub && all_row_major<T> && all_floating<T> |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const one_if_max_sub_transformer &transformer) |
| Display the transformer on the given stream. More... | |
Transformer to implement one if max sub on 2D matrix.
| T | The type on which the transformer is applied |
|
inlineexplicit |
Construct a new transformer around the given expression.
| expr | The sub expression |
|
inlinenoexcept |
Test if this expression aliases with the given expression.
| rhs | The other expression to test |
|
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 |
|
inline |
Access to the value at the given (i, j) position.
| i | The first index |
| j | The second index |
|
inline |
Returns the value at the given index.
| i | The index |
|
inline |
Returns the value at the given index This function never has side effects.
| i | The index |
|
inline |
Apply the given visitor to this expression and its descendants.
| visitor | The visitor to apply |
|
friend |
Display the transformer on the given stream.
| os | The output stream |
| transformer | The transformer to print |
1.8.13