23 #ifndef FTL_TENSOR_EXPRESSIONS_DYNAMIC_CPU_HPP
24 #define FTL_TENSOR_EXPRESSIONS_DYNAMIC_CPU_HPP
31 template <
typename Expression,
typename Dtype>
47 Expression*
expression() {
return static_cast<Expression*
>(
this); }
53 const Expression*
expression()
const {
return static_cast<const Expression*
>(
this); }
59 operator Expression&() {
return static_cast<Expression&
>(*this); }
65 operator Expression
const&()
const {
return static_cast<const Expression&
>(*this); }
101 #endif // FTL_TENSOR_EXPRESSIONS_DYNAMIC_CPU_HPP
typename traits::dim_container dim_container
Definition: tensor_expression_dynamic_cpu.hpp:40
Expression * expression()
Gets a pointer to the expression.
Definition: tensor_expression_dynamic_cpu.hpp:47
data_type & operator[](size_type i)
Gets and element from the Tensor expression data.
Definition: tensor_expression_dynamic_cpu.hpp:90
typename traits::size_type size_type
Definition: tensor_expression_dynamic_cpu.hpp:36
size_type size() const
Returns the size of the expression.
Definition: tensor_expression_dynamic_cpu.hpp:71
const Expression * expression() const
Gets a const pointer to the expression.
Definition: tensor_expression_dynamic_cpu.hpp:53
const data_type & operator[](size_type i) const
Gets and element from the Tensor expression data.
Definition: tensor_expression_dynamic_cpu.hpp:97
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
size_type rank() const
Returns the rank of the expression.
Definition: tensor_expression_dynamic_cpu.hpp:77
typename traits::container_type container_type
Definition: tensor_expression_dynamic_cpu.hpp:38
typename traits::data_type data_type
Definition: tensor_expression_dynamic_cpu.hpp:37
typename traits::data_container data_container
Definition: tensor_expression_dynamic_cpu.hpp:39
const dim_container & dim_sizes() const
Gets the sizes of the all the dimensions of the expression.
Definition: tensor_expression_dynamic_cpu.hpp:83
Traits class which specifies parameters for a tensor, such as what type of container it uses and what...
Definition: tensor_traits.hpp:48