|
constexpr | Mapping (Mapping< D > const &)=default |
|
constexpr | Mapping (Mapping< D > &&)=default |
|
constexpr Mapping< D > & | operator= (Mapping< D > const &)=default |
|
constexpr Mapping< D > & | operator= (Mapping< D > &&)=default |
|
constexpr Traits::elem_t & | operator() (size_t i, size_t j) |
| Provides read and write access to tensor elements. More...
|
|
constexpr Traits::elem_t | operator() (size_t i, size_t j) const |
| Provides read only access to tensor elements. More...
|
|
constexpr Traits::elem_t & | operator() (size_t i) |
| Provides read and write access to tensor elements. More...
|
|
constexpr Traits::elem_t | operator() (size_t i) const |
| Provides read only access to tensor elements. More...
|
|
constexpr Traits::elem_t & | operator[] (size_t i) |
| Provides read and write access to tensor elements. More...
|
|
constexpr Traits::elem_t | operator[] (size_t i) const |
| Provides read only access to tensor elements. More...
|
|
template<typename T , std::enable_if_t< is_detected< assign_expr, typename Traits::elem_t, T >::value, size_t > = 0> |
constexpr D & | operator= (std::initializer_list< T > const &list) |
| Copy an initializer list's elements into the tensor's elements. More...
|
|
template<class C , std::enable_if_t< conjunction< have_same_dimensions< D, C >, is_detected< assign_expr, typename Traits::elem_t, traits_elem_t< C >> >::value, size_t > = 0> |
constexpr D & | operator= (Stream< C > const &s) |
| Copy another tensor's elements into this tenosr's elements. More...
|
|
constexpr | Stream (Stream< D > const &)=default |
|
constexpr | Stream (Stream< D > &&)=default |
|
constexpr Stream< D > & | operator= (Stream< D > const &)=default |
|
constexpr Stream< D > & | operator= (Stream< D > &&)=default |
|
constexpr size_t | rows () const |
|
constexpr size_t | cols () const |
|
constexpr size_t | size () const |
|
constexpr Traits::elem_t | operator() (size_t i, size_t j) const |
| Provides read only access to tensor elements. More...
|
|
constexpr Traits::elem_t | operator() (size_t i) const |
| Provides read only access to tensor elements. More...
|
|
constexpr Traits::elem_t | operator[] (size_t i) const |
| Provides read only access to tensor elements. More...
|
|
constexpr Traits::eval_t | eval () const |
| Forces evaluation of this stream to a value backed type. More...
|
|
template<class D>
class lin::internal::Mapping< D >
Tensor interface providing read and write access to elements.
- Template Parameters
-
This is the second of the three main entry points on the lin inheritance tree after internal::Stream.
Here, read and write element access is provided and the most frequently used assignment operators are defined.
The main purpose is to provide an interface that supporst block references.
- See also
- internal::Stream
-
internal::Base
template<class D>
template<typename T , std::enable_if_t< is_detected< assign_expr, typename Traits::elem_t, T >::value, size_t > = 0>
Copy an initializer list's elements into the tensor's elements.
- Parameters
-
- Returns
- Reference to the derived object.
The elements in the initializer need to be specified in row major order.
If the length of the initializer list doesn't match the current size of the tensor, a lin assertion error will be triggered.
template<class D>
template<class C , std::enable_if_t< conjunction< have_same_dimensions< D, C >, is_detected< assign_expr, typename Traits::elem_t, traits_elem_t< C >> >::value, size_t > = 0>
Copy another tensor's elements into this tenosr's elements.
- Parameters
-
- Returns
- Reference to the derived object.
This function is only enable if both tensor have the same compile time dimensions and the other element's type can be assinged to this tensor's element type.
If the dimensions of the tensor don't match at runtime, a lin assertion error will be triggered.
- See also
- internal::have_same_dimensions