23 #ifndef FTL_TENSOR_EXPRESSIONS_STATIC_CPU_HPP
24 #define FTL_TENSOR_EXPRESSIONS_STATIC_CPU_HPP
36 template <
typename Expression,
typename DT,
size_t SF,
size_t... SR>
52 Expression*
expression() {
return static_cast<Expression*
>(
this); }
58 const Expression*
expression()
const {
return static_cast<const Expression*
>(
this); }
64 operator Expression&() {
return static_cast<Expression&
>(*this); }
70 operator Expression
const&()
const {
return static_cast<const Expression&
>(*this); }
106 #endif // FTL_TENSOR_EXPRESSIONS_STATIC_CPU_HPP
typename traits::data_type data_type
Definition: tensor_expression_static_cpu.hpp:42
Expression * expression()
Gets a pointer to the expression.
Definition: tensor_expression_static_cpu.hpp:52
data_type & operator[](size_type i)
Gets and element from the Tensor expression data.
Definition: tensor_expression_static_cpu.hpp:95
constexpr const dim_container & dim_sizes() const
Gets the sizes of the all the dimensions of the expression.
Definition: tensor_expression_static_cpu.hpp:88
const Expression * expression() const
Gets a const pointer to the expression.
Definition: tensor_expression_static_cpu.hpp:58
Definition: mapper.hpp:37
Defines a general tensor expression so that opertions on tensor expressions can be defined the syntax...
Definition: tensor_expression_interface.hpp:49
typename traits::size_type size_type
Definition: tensor_expression_static_cpu.hpp:41
typename traits::container_type container_type
Definition: tensor_expression_static_cpu.hpp:43
constexpr size_type size() const
Returns the size of the expression.
Definition: tensor_expression_static_cpu.hpp:76
const data_type & operator[](size_type i) const
Gets and element from the Tensor expression data.
Definition: tensor_expression_static_cpu.hpp:102
typename traits::dim_container dim_container
Definition: tensor_expression_static_cpu.hpp:45
typename traits::data_container data_container
Definition: tensor_expression_static_cpu.hpp:44
constexpr size_type rank() const
Returns the rank of the expression.
Definition: tensor_expression_static_cpu.hpp:82
Traits class which specifies parameters for a tensor, such as what type of container it uses and what...
Definition: tensor_traits.hpp:48