Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Functions
block_tensor_contract.hpp File Reference

Defines local pairwise BlockTensor contraction. More...

#include <uni20/async/debug_scheduler.hpp>
#include <uni20/linalg/async.hpp>
#include <uni20/linalg/elementwise_functions.hpp>
#include <uni20/linalg/ops/contract.hpp>
#include <uni20/symmetry/block_tensor_concepts.hpp>
#include <uni20/symmetry/block_tensor_mapped_view.hpp>
#include <uni20/tensor/transform.hpp>
#include <algorithm>
#include <array>
#include <concepts>
#include <cstddef>
#include <memory>
#include <ranges>
#include <span>
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for block_tensor_contract.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  uni20
 

Functions

template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto uni20::contract (LeftTensor const &left, RightTensor const &right)
 Contract one adjacent BlockTensor factor pair into an owning result.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, typename std::remove_cvref_t<LeftTensor>::storage_policy>, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto uni20::contract (LeftTensor const &left, RightTensor const &right)
 Schedule independent dense-block matrix products for an adjacent contraction.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void uni20::contract (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Overwrite a fixed BlockTensor with one adjacent pairwise contraction.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void uni20::contract (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Schedule an adjacent pairwise contraction into fixed async BlockTensor storage.
 
template<std::size_t ContractedCount, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor, ContractedCount>
auto uni20::contract_adjacent (LeftTensor const &left, RightTensor const &right)
 Contract an adjacent group of BlockTensor boundary factors.
 
template<std::size_t ContractedCount, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor, ContractedCount>
void uni20::contract_adjacent (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Overwrite a fixed BlockTensor with an adjacent group contraction.
 

Detailed Description

Defines local pairwise BlockTensor contraction.