23 #ifndef FTL_TENSOR_SUBTRACTION_HPP
24 #define FTL_TENSOR_SUBTRACTION_HPP
38 template <
typename E1,
typename E2,
typename T1,
typename T2>
84 template <
typename E1,
typename E2,
typename T1,
typename T2>
91 if (x.rank() != y.rank() && x.dim_sizes() != y.dim_sizes()) ;
96 #endif // FTL_TENSOR_SUBTRACTION_HPP
Expression class for calculating the subtraction of two tensors.
Definition: tensor_subtraction.hpp:39
typename traits::data_type data_type
Definition: tensor_subtraction.hpp:44
const size_type size() const
Returns the size of the expression.
Definition: tensor_subtraction.hpp:66
data_type operator[](size_type i) const
Adds two elements (one from each Tensor) from the tensor expression data.
Definition: tensor_subtraction.hpp:79
Definition: mapper.hpp:37
typename traits::size_type size_type
Definition: tensor_subtraction.hpp:43
Defines a general tensor expression so that opertions on tensor expressions can be defined the syntax...
Definition: tensor_expression_interface.hpp:49
T1 traits
Definition: tensor_subtraction.hpp:41
const size_type rank() const
Returns the size of the expression.
Definition: tensor_subtraction.hpp:72
TensorSubtraction(TensorExpression< E1, T1 > const &x, TensorExpression< E2, T2 > const &y)
Sets the expressions for subtraction and checks that they have the same ranks and dimension...
Definition: tensor_subtraction.hpp:85
const dim_container & dim_sizes() const
Gets the sizes of the all the dimensions of the expression.
Definition: tensor_subtraction.hpp:60
typename traits::dim_container dim_container
Definition: tensor_subtraction.hpp:42