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

#include <base_tensor.h>

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

Public Types

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

Public Member Functions

constexpr base_tensor ()=default
 
template<static_tensor Other>
requires (same_dimensions<this_type, Other>()) && (convertible_to<tatooine::value_type<Other>, value_type>)
constexpr base_tensor (Other &&other)
 
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 &
 
template<static_tensor Other>
requires (same_dimensions<this_type, Other>()) && (convertible_to<tatooine::value_type<Other>, value_type>)
auto constexpr assign (Other &&other) -> void
 
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr at (Is const ...)
 
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr at (Is const ...) const
 
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr operator() (Is const ... is) const
 
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr operator() (Is const ... is)
 
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() (integral auto const ... is) const -> decltype(auto) requires(sizeof...(is)==rank())
 
auto constexpr operator() (integral auto const ... is) -> decltype(auto) requires(sizeof...(is)==rank())
 
template<std::size_t FixedDim, std::size_t... Is>
auto constexpr slice (std::size_t fixed_index, std::index_sequence< Is... >) -> decltype(auto)
 
template<std::size_t FixedDim>
auto constexpr slice (std::size_t fixed_index) -> decltype(auto)
 
template<std::size_t FixedDim, std::size_t... Is>
auto constexpr slice (std::size_t fixed_index, std::index_sequence< Is... >) const
 
template<std::size_t FixedDim>
auto constexpr slice (std::size_t fixed_index) const
 
template<typename OtherTensor , typename OtherValueType >
auto operator+= (base_tensor< OtherTensor, OtherValueType, Dims... > const &other) -> auto &
 
auto operator+= (convertible_to< ValueType > auto const &other) -> auto &
 
template<typename OtherTensor , typename OtherValueType >
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< Tensor >
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 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 Member Functions

template<std::size_t... Seq>
auto constexpr at (integral_range auto const &is, std::index_sequence< Seq... >) -> decltype(auto)
 
template<std::size_t... Seq>
auto constexpr at (integral_range auto const &is, std::index_sequence< Seq... >) const -> decltype(auto)
 

Member Typedef Documentation

◆ const_indexed_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
using tatooine::base_tensor< Tensor, ValueType, Dims >::const_indexed_type = einstein_notation::indexed_static_tensor<Tensor const&, Is...>

◆ indexed_type

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
using tatooine::base_tensor< Tensor, ValueType, Dims >::indexed_type = einstein_notation::indexed_static_tensor<Tensor&, Is...>

◆ multidim_size_t

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
using tatooine::base_tensor< Tensor, ValueType, Dims >::multidim_size_t = static_multidim_size<x_fastest, Dims...>

◆ parent_type

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

◆ tensor_type

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

◆ this_type

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

◆ value_type

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

Constructor & Destructor Documentation

◆ base_tensor() [1/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::base_tensor ( )
constexprdefault

◆ base_tensor() [2/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<static_tensor Other>
requires (same_dimensions<this_type, Other>()) && (convertible_to<tatooine::value_type<Other>, value_type>)
constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::base_tensor ( Other &&  other)
inlineexplicitconstexpr

Member Function Documentation

◆ array_index()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
static auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::array_index ( integral auto const ...  is)
inlinestaticconstexpr

◆ assign()

template<typename Tensor , arithmetic_or_complex ValueType, 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 >::assign ( Other &&  other) -> void
inlineconstexpr

◆ at() [1/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( integral auto const ...  is) -> decltype(auto) requires(sizeof...(is) == rank())
inlineconstexpr

◆ at() [2/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( integral auto const ...  is) const -> decltype(auto) requires(sizeof...(is) == rank())
inlineconstexpr

◆ at() [3/8]

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

◆ at() [4/8]

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

◆ at() [5/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t... Seq>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( integral_range auto const &  is,
std::index_sequence< Seq... >   
) -> decltype(auto)
inlineconstexprprivate

◆ at() [6/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t... Seq>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( integral_range auto const &  is,
std::index_sequence< Seq... >   
) const -> decltype(auto)
inlineconstexprprivate

◆ at() [7/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( Is  const ...)
inlineconstexpr

◆ at() [8/8]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::at ( Is  const ...) const
inlineconstexpr

◆ dimension()

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

◆ dimensions()

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

◆ for_indices()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
static auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::for_indices ( invocable< decltype(Dims)... > auto &&  f)
inlinestaticconstexpr

◆ indices()

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

◆ is_static()

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

◆ is_tensor()

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

◆ isinf()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::isinf ( ) const
inline

◆ isnan()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::isnan ( ) const
inline

◆ num_components()

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

◆ operator()() [1/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::operator() ( integral auto const ...  is) -> decltype(auto) requires(sizeof...(is) == rank())
inlineconstexpr

◆ operator()() [2/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::operator() ( integral auto const ...  is) const -> decltype(auto) requires(sizeof...(is) == rank())
inlineconstexpr

◆ operator()() [3/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::operator() ( Is const ...  is)
inlineconstexpr

◆ operator()() [4/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<einstein_notation::index... Is>
requires (sizeof...(Is) == rank())
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::operator() ( Is const ...  is) const
inlineconstexpr

◆ operator*=()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator*= ( convertible_to< ValueType > auto const &  other) -> auto&
inline

◆ operator+=() [1/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<typename OtherTensor , typename OtherValueType >
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator+= ( base_tensor< OtherTensor, OtherValueType, Dims... > const &  other) -> auto&
inline

◆ operator+=() [2/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator+= ( convertible_to< ValueType > auto const &  other) -> auto&
inline

◆ operator-=() [1/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<typename OtherTensor , typename OtherValueType >
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator-= ( base_tensor< OtherTensor, OtherValueType, Dims... > const &  other) -> auto&
inline

◆ operator-=() [2/2]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator-= ( convertible_to< ValueType > auto const &  other) -> auto&
inline

◆ operator/=()

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
auto tatooine::base_tensor< Tensor, ValueType, Dims >::operator/= ( convertible_to< ValueType > auto const &  other) -> auto&
inline

◆ operator=()

template<typename Tensor , arithmetic_or_complex ValueType, 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... Dims>
static auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::rank ( )
inlinestaticconstexpr

◆ slice() [1/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t FixedDim>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::slice ( std::size_t  fixed_index) -> decltype(auto)
inlineconstexpr

◆ slice() [2/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t FixedDim>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::slice ( std::size_t  fixed_index) const
inlineconstexpr

◆ slice() [3/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t FixedDim, std::size_t... Is>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::slice ( std::size_t  fixed_index,
std::index_sequence< Is... >   
) -> decltype(auto)
inlineconstexpr

◆ slice() [4/4]

template<typename Tensor , arithmetic_or_complex ValueType, std::size_t... Dims>
template<std::size_t FixedDim, std::size_t... Is>
auto constexpr tatooine::base_tensor< Tensor, ValueType, Dims >::slice ( std::size_t  fixed_index,
std::index_sequence< Is... >   
) const
inlineconstexpr

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