Implementation of products/contractions of dense tensors. More...
#include "inc/util/envvars.h"#include "inc/dense/dense.h"#include "inc/dense/dense_iter.h"#include "inc/dense/dense_prod_helper.h"#include "inc/dense/dense_prod_special.h"#include "inc/dense/dense_prod_base.h"#include "inc/dense/dense_transpose.h"#include "inc/dense/dense_conj.h"#include "inc/dense/dense_prod_tmp_transpose_storage.h"
Include dependency graph for dense_prod.h:
This graph shows which files directly or indirectly include this file:Namespaces | |
| namespace | syten |
| Syten namespace. | |
| namespace | syten::DenseProduct |
| Contains helper functions related to the product of two dense tensors, see syten::prodD() for the main entry point. | |
Functions | |
| template<Rank rank, typename Scalar , typename RetType = typename ScalarBase<Scalar>::type> | |
| DenseTensor< rank, RetType > | syten::elem_abs (DenseTensor< rank, Scalar > const &a) |
| Returns a dense tensor of the real base type with each element equal to the absolute value of that element in a: \( r_{ij} =
|a_{ij}| \). More... | |
| template<Rank summed, Rank frank, Rank srank, typename Scalar > | |
| DenseTensor< frank+srank - 2 *summed, Scalar > | syten::DenseProduct::impl (DenseTensor< frank, Scalar > const &a, DenseTensor< srank, Scalar > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, bool conjugate=false, TemporaryTransposeStorage< Scalar, frank, srank > *tts=nullptr) |
| Dense tensor-tensor contraction, default implementation. More... | |
| template<> | |
| DenseTensor< 1, HighPrec > | syten::DenseProduct::impl< 1 > (DenseTensor< 1, HighPrec > const &a, DenseTensor< 2, HighPrec > const &b, std::array< int, 1 > const &c_a, std::array< int, 2 > const &c_b, bool conjugate, TemporaryTransposeStorage< HighPrec, 1, 2 > *) |
| Specialisation for a matrix-vector product of HighPrec scalars. More... | |
| template<> | |
| DenseTensor< 1, double > | syten::DenseProduct::impl< 1 > (DenseTensor< 2, double > const &a, DenseTensor< 1, double > const &b, std::array< int, 2 > const &c_a, std::array< int, 1 > const &c_b, bool conjugate, TemporaryTransposeStorage< double, 2, 1 > *) |
| Specialisation for a matrix-vector product of doubles. More... | |
| template<> | |
| DenseTensor< 1, float > | syten::DenseProduct::impl< 1 > (DenseTensor< 2, float > const &a, DenseTensor< 1, float > const &b, std::array< int, 2 > const &c_a, std::array< int, 1 > const &c_b, bool conjugate, TemporaryTransposeStorage< float, 2, 1 > *) |
| Specialisation for a matrix-vector product of floats. More... | |
| template<> | |
| DenseTensor< 2, HighPrec > | syten::DenseProduct::impl< 1 > (DenseTensor< 2, HighPrec > const &a, DenseTensor< 2, HighPrec > const &b, std::array< int, 2 > const &c_a, std::array< int, 2 > const &c_b, bool conjugate, TemporaryTransposeStorage< HighPrec, 2, 2 > *) |
| Specialisation for a matrix-matrix product of HighPrec scalars. More... | |
| template<> | |
| DenseTensor< 1, std::complex< double > > | syten::DenseProduct::impl< 1 > (DenseTensor< 2, std::complex< double > > const &a, DenseTensor< 1, std::complex< double > > const &b, std::array< int, 2 > const &c_a, std::array< int, 1 > const &c_b, bool conjugate, TemporaryTransposeStorage< std::complex< double >, 2, 1 > *) |
| Specialisation for a matrix-vector product of complex doubles. More... | |
| template<> | |
| DenseTensor< 1, std::complex< float > > | syten::DenseProduct::impl< 1 > (DenseTensor< 2, std::complex< float > > const &a, DenseTensor< 1, std::complex< float > > const &b, std::array< int, 2 > const &c_a, std::array< int, 1 > const &c_b, bool conjugate, TemporaryTransposeStorage< std::complex< float >, 2, 1 > *) |
| Specialisation for a matrix-vector product of complex floats. More... | |
| template<Rank summed, Rank frank, typename Scalar > | |
| std::enable_if< frank==summed, Scalar >::type | syten::prodD (DenseTensor< frank, Scalar > const &a, DenseTensor< frank, Scalar > const &b, bool conjugate=true) |
| Scalar product of two dense tensors. More... | |
| template<Rank summed, Rank frank, Rank srank, typename Scalar , std::enable_if_t<(int(frank)+int(srank) - 2 *int(summed) > 0), int > = 0> | |
| DenseTensor< frank+srank - 2 *summed, Scalar > | syten::prodD (DenseTensor< frank, Scalar > const &a, DenseTensor< srank, Scalar > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, bool conjugate=false, EliminateZeros const ezeros=EliminateZeros::No, DenseProduct::TemporaryTransposeStorage< Scalar, frank, srank > *tts=nullptr) |
| Product/Contraction of two dense tensors. More... | |
| template<Rank r, typename Scalar > | |
| Scalar | syten::prodD (DenseTensor< r, Scalar > const &a, DenseTensor< r, Scalar > const &b, std::array< int, r > const &c_a, std::array< int, r > const &c_b, bool conjugate=false) |
| Reordering scalar product of two dense tensors. More... | |
Implementation of products/contractions of dense tensors.