|
Expression Templates Library (ETL)
|
View that shows a slice of an expression. More...
#include <memory_slice_view.hpp>
Public Types | |
| using | sub_type = T |
| The sub type. | |
| using | value_type = value_t< sub_type > |
| The value contained in the expression. | |
| using | memory_type = value_type * |
| The memory acess type. | |
| using | const_memory_type = const value_type * |
| The const memory access type. | |
| using | return_type = return_helper< sub_type, decltype(std::declval< sub_type >()[0])> |
| The type returned by the view. | |
| using | const_return_type = const_return_helper< sub_type, decltype(std::declval< sub_type >()[0])> |
| The const type return by the view. | |
| template<typename V = default_vec> | |
| using | vec_type = typename V::template vec_type< value_type > |
| The vectorization type for V. | |
Public Member Functions | |
| memory_slice_view (sub_type sub, size_t first, size_t last) | |
| Construct a new memory_slice_view over the given sub expression. More... | |
| const_return_type | operator[] (size_t j) const |
| Returns the element at the given index. More... | |
| return_type | operator[] (size_t j) |
| Returns the element at the given index. More... | |
| value_type | read_flat (size_t j) const noexcept |
| Returns the value at the given index This function never has side effects. More... | |
| template<typename V = default_vec> | |
| auto | load (size_t x) const noexcept |
| Load several elements of the expression at once. More... | |
| template<typename V = default_vec> | |
| auto | loadu (size_t x) const noexcept |
| Load several elements of the expression at once. More... | |
| template<typename V = default_vec> | |
| void | store (vec_type< V > in, size_t i) noexcept |
| Store several elements in the matrix at once. More... | |
| template<typename V = default_vec> | |
| void | storeu (vec_type< V > in, size_t i) noexcept |
| Store several elements in the matrix at once. More... | |
| template<typename V = default_vec> | |
| void | stream (vec_type< V > in, size_t i) noexcept |
| Store several elements in the matrix at once, using non-temporal store. More... | |
| template<typename E > | |
| bool | alias (const E &rhs) const noexcept |
| Test if this expression aliases with the given expression. More... | |
| memory_type | memory_start () noexcept |
| Returns a pointer to the first element in memory. More... | |
| const_memory_type | memory_start () const noexcept |
| Returns a pointer to the first element in memory. More... | |
| memory_type | memory_end () noexcept |
| Returns a pointer to the past-the-end element in memory. More... | |
| const_memory_type | memory_end () const noexcept |
| Returns a pointer to the past-the-end element in memory. More... | |
| template<typename L > | |
| void | assign_to (L &&lhs) const |
| Assign to the given left-hand-side expression. More... | |
| template<typename L > | |
| void | assign_add_to (L &&lhs) const |
| Add to the given left-hand-side expression. More... | |
| template<typename L > | |
| void | assign_sub_to (L &&lhs) const |
| Sub from the given left-hand-side expression. More... | |
| template<typename L > | |
| void | assign_mul_to (L &&lhs) const |
| Multiply the given left-hand-side expression. More... | |
| template<typename L > | |
| void | assign_div_to (L &&lhs) const |
| Divide the given left-hand-side expression. More... | |
| template<typename L > | |
| void | assign_mod_to (L &&lhs) const |
| Modulo the given left-hand-side expression. More... | |
| void | visit (detail::evaluator_visitor &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. | |
Friends | |
| struct | etl_traits< memory_slice_view > |
View that shows a slice of an expression.
| T | The type of expression on which the view is made |
|
inline |
Construct a new memory_slice_view over the given sub expression.
| sub | The sub expression |
| first | The first index |
| last | The last index |
|
inlinenoexcept |
Test if this expression aliases with the given expression.
| rhs | The other expression to test |
|
inline |
Add to the given left-hand-side expression.
| lhs | The expression to which assign |
|
inline |
Divide the given left-hand-side expression.
| lhs | The expression to which assign |
|
inline |
Modulo the given left-hand-side expression.
| lhs | The expression to which assign |
|
inline |
Multiply the given left-hand-side expression.
| lhs | The expression to which assign |
|
inline |
Sub from the given left-hand-side expression.
| lhs | The expression to which assign |
|
inline |
Assign to the given left-hand-side expression.
| lhs | The expression to which assign |
|
inlinenoexcept |
Load several elements of the expression at once.
| x | The position at which to start. |
| V | The vectorization mode to use |
|
inlinenoexcept |
Load several elements of the expression at once.
| x | The position at which to start. |
| V | The vectorization mode to use |
|
inlinenoexcept |
Returns a pointer to the past-the-end element in memory.
|
inlinenoexcept |
Returns a pointer to the past-the-end element in memory.
|
inlinenoexcept |
Returns a pointer to the first element in memory.
|
inlinenoexcept |
Returns a pointer to the first element in memory.
|
inline |
Returns the element at the given index.
| j | The index |
|
inline |
Returns the element at the given index.
| j | The index |
|
inlinenoexcept |
Returns the value at the given index This function never has side effects.
| j | The index |
|
inlinenoexcept |
Store several elements in the matrix at once.
| in | The several elements to store |
| i | The position at which to start. This will be aligned from the beginning (multiple of the vector size). |
| V | The vectorization mode to use |
|
inlinenoexcept |
Store several elements in the matrix at once.
| in | The several elements to store |
| i | The position at which to start. This will be aligned from the beginning (multiple of the vector size). |
| V | The vectorization mode to use |
|
inlinenoexcept |
Store several elements in the matrix at once, using non-temporal store.
| in | The several elements to store |
| i | The position at which to start. This will be aligned from the beginning (multiple of the vector size). |
| V | The vectorization mode to use |
|
inline |
Apply the given visitor to this expression and its descendants.
| visitor | The visitor to apply |
1.8.13