Tatooine
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims > Struct Template Reference

#include <tensor_slice.h>

Inheritance diagram for tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >:
[legend]
Collaboration diagram for tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >:
[legend]

Public Types

using tensor_type = Tensor
 
using this_type = tensor_slice< Tensor, ValueType, FixedDim, Dims... >
 
using parent_type = base_tensor< this_type, ValueType, Dims... >
 
using value_type = ValueType
 
- Public Types inherited from tatooine::base_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... >, ValueType, Dims... >
using value_type = ValueType
 
using tensor_type = tensor_slice< Tensor, ValueType, FixedDim, Dims... >
 
using this_type = base_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... >, ValueType, Dims... >
 
using parent_type = crtp< tensor_slice< Tensor, ValueType, FixedDim, Dims... > >
 
using multidim_size_t = static_multidim_size< x_fastest, Dims... >
 
using const_indexed_type = einstein_notation::indexed_static_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... > const &, Is... >
 
using indexed_type = einstein_notation::indexed_static_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... > &, Is... >
 
- Public Types inherited from tatooine::crtp< Derived >
using derived_type = Derived
 

Public Member Functions

constexpr tensor_slice (Tensor *tensor, std::size_t fixed_index)
 
constexpr auto at (integral auto const ... is) const -> decltype(auto)
 
constexpr auto at (integral auto const ... is) -> decltype(auto)
 
template<static_tensor Other>
requires (same_dimensions<this_type, Other>()) && (convertible_to<tatooine::value_type<Other>, value_type>)
auto constexpr operator= (Other &&other) -> base_tensor &
 
- Public Member Functions inherited from tatooine::base_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... >, ValueType, Dims... >
constexpr base_tensor ()=default
 
constexpr base_tensor (Other &&other)
 
auto constexpr operator= (Other &&other) -> base_tensor &
 
auto constexpr assign (Other &&other) -> void
 
auto constexpr at (Is const ...)
 
auto constexpr at (Is const ...) const
 
auto constexpr at (integral auto const ... is) const -> decltype(auto) requires(sizeof...(is)==rank())
 
auto constexpr at (integral auto const ... is) -> decltype(auto) requires(sizeof...(is)==rank())
 
auto constexpr at (integral_range auto const &is) -> decltype(auto)
 
auto constexpr at (integral_range auto const &is) const -> decltype(auto)
 
auto constexpr operator() (Is const ... is) const
 
auto constexpr operator() (Is const ... is)
 
auto constexpr operator() (integral auto const ... is) const -> decltype(auto) requires(sizeof...(is)==rank())
 
auto constexpr operator() (integral auto const ... is) -> decltype(auto) requires(sizeof...(is)==rank())
 
auto constexpr slice (std::size_t fixed_index, std::index_sequence< Is... >) -> decltype(auto)
 
auto constexpr slice (std::size_t fixed_index) -> decltype(auto)
 
auto constexpr slice (std::size_t fixed_index, std::index_sequence< Is... >) const
 
auto constexpr slice (std::size_t fixed_index) const
 
auto operator+= (base_tensor< OtherTensor, OtherValueType, Dims... > const &other) -> auto &
 
auto operator+= (convertible_to< ValueType > auto const &other) -> auto &
 
auto operator-= (base_tensor< OtherTensor, OtherValueType, Dims... > const &other) -> auto &
 
auto operator-= (convertible_to< ValueType > auto const &other) -> auto &
 
auto operator*= (convertible_to< ValueType > auto const &other) -> auto &
 
auto operator/= (convertible_to< ValueType > auto const &other) -> auto &
 
auto isnan () const
 
auto isinf () const
 
- Public Member Functions inherited from tatooine::crtp< Derived >
constexpr auto as_derived () -> derived_type &
 returns casted as_derived data More...
 
constexpr auto as_derived () const -> derived_type const &
 returns casted as_derived data More...
 

Static Public Member Functions

static auto constexpr num_components ()
 
static auto constexpr rank ()
 
- Static Public Member Functions inherited from tatooine::base_tensor< tensor_slice< Tensor, ValueType, FixedDim, Dims... >, ValueType, Dims... >
static auto constexpr rank ()
 
static auto constexpr num_components ()
 
static auto constexpr dimensions ()
 
static auto constexpr dimension (std::size_t const i)
 
static auto constexpr is_static () -> bool
 
static auto constexpr is_tensor () -> bool
 
static auto constexpr indices ()
 
static auto constexpr for_indices (invocable< decltype(Dims)... > auto &&f)
 
static auto constexpr array_index (integral auto const ... is)
 

Private Attributes

Tensorm_tensor
 
std::size_t m_fixed_index
 

Member Typedef Documentation

◆ parent_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
using tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::parent_type = base_tensor<this_type, ValueType, Dims...>

◆ tensor_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
using tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::tensor_type = Tensor

◆ this_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
using tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::this_type = tensor_slice<Tensor, ValueType, FixedDim, Dims...>

◆ value_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
using tatooine::base_tensor< Tensor, ValueType, Dims >::value_type = ValueType

Constructor & Destructor Documentation

◆ tensor_slice()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
constexpr tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::tensor_slice ( Tensor tensor,
std::size_t  fixed_index 
)
inlineconstexpr

Member Function Documentation

◆ at() [1/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
constexpr auto tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::at ( integral auto const ...  is) -> decltype(auto)
inlineconstexpr

◆ at() [2/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
constexpr auto tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::at ( integral auto const ...  is) const -> decltype(auto)
inlineconstexpr

◆ num_components()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
static auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::num_components ( )
inlinestaticconstexpr

◆ operator=()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
template<static_tensor Other>
requires (same_dimensions<this_type, Other>()) && (convertible_to<tatooine::value_type<Other>, value_type>)
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::operator= ( Other &&  other) -> base_tensor&
inlineconstexpr

◆ rank()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
static auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::rank ( )
inlinestaticconstexpr

Member Data Documentation

◆ m_fixed_index

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
std::size_t tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::m_fixed_index
private

◆ m_tensor

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t FixedDim, std::size_t... Dims>
Tensor* tatooine::tensor_slice< Tensor, ValueType, FixedDim, Dims >::m_tensor
private

The documentation for this struct was generated from the following files: