Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector > Class Template Reference

Prepared right-first executor for one fixed R/A/B/C structure. More...

#include <right_first_rabc.hpp>

Public Types

using contraction_selector_type = ContractionSelector
 
using intermediate_type = ColumnMajorTensor< scalar_type, 2, IntermediateStorage >
 
using plan_type = std::remove_cvref_t< Plan >
 
using scalar_type = typename plan_type::scalar_type
 

Public Member Functions

auto intermediate_count () const noexcept -> std::size_t
 Return the number of retained (B,C) intermediate blocks.
 
template<detail::WritableRabcTensor Output, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C>
requires detail::CompatibleRabcOperands<Output, plan_type, A, B, C>
void operator() (Output &output, A const &a, B const &b, C const &c)
 Execute using the retained schedule and workspace.
 
auto plan () const noexcept -> plan_type const &
 Return the immutable execution-neutral coefficient plan.
 
template<detail::WritableRabcTensor Output, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C>
requires detail::CompatibleRabcOperands<Output, plan_type, A, B, C>
 PreparedRightFirstRabcContraction (contraction_selector_type selector, Output const &output, plan_type plan, A const &a, B const &b, C const &c)
 Compile a fixed execution schedule and allocate its workspace.
 

Detailed Description

template<class IntermediateStorage, RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
class uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >

Prepared right-first executor for one fixed R/A/B/C structure.

Construction binds logical keys to storage ordinals, validates dense extents, derives the unique (B_b,C_c) groups and output execution order, and allocates every intermediate once. Repeated calls reuse that schedule and workspace. The prepared object is tied to the plan and block structures used at construction and is not safe for concurrent execution.

Template Parameters
IntermediateStorageDense storage policy used for retained intermediates.
PlanExecution-neutral logical coefficient plan.
ContractionSelectorDense contraction backend selector.

Member Typedef Documentation

◆ contraction_selector_type

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
using uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::contraction_selector_type = ContractionSelector

◆ intermediate_type

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
using uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::intermediate_type = ColumnMajorTensor<scalar_type, 2, IntermediateStorage>

◆ plan_type

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
using uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::plan_type = std::remove_cvref_t<Plan>

◆ scalar_type

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
using uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::scalar_type = typename plan_type::scalar_type

Constructor & Destructor Documentation

◆ PreparedRightFirstRabcContraction()

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
template<detail::WritableRabcTensor Output, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C>
requires detail::CompatibleRabcOperands<Output, plan_type, A, B, C>
uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::PreparedRightFirstRabcContraction ( contraction_selector_type  selector,
Output const &  output,
plan_type  plan,
A const &  a,
B const &  b,
C const &  c 
)
inline

Compile a fixed execution schedule and allocate its workspace.

Parameters
selectorDense contraction selector retained for every application.
outputPrototype defining output block ordinals and extents.
planExecution-neutral coefficient plan retained by value.
aPrototype left block family.
bPrototype center block family.
cPrototype right block family.

Member Function Documentation

◆ intermediate_count()

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
auto uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::intermediate_count ( ) const -> std::size_t
inlinenoexcept

Return the number of retained (B,C) intermediate blocks.

◆ operator()()

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
template<detail::WritableRabcTensor Output, detail::ReadableRabcTensor A, detail::ReadableRabcTensor B, detail::ReadableRabcTensor C>
requires detail::CompatibleRabcOperands<Output, plan_type, A, B, C>
void uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::operator() ( Output &  output,
A const &  a,
B const &  b,
C const &  c 
)
inline

Execute using the retained schedule and workspace.

Precondition
All operands have the same stored logical-key sequences and dense extents supplied at construction, and output storage does not overlap an input.
Parameters
outputFixed-structure output block family.
aLeft block family matching the prepared prototype.
bCenter block family matching the prepared prototype.
cRight block family matching the prepared prototype.

◆ plan()

template<class IntermediateStorage , RabcPlan Plan, linalg::KernelBackendSelector ContractionSelector>
auto uni20::tensor_network::PreparedRightFirstRabcContraction< IntermediateStorage, Plan, ContractionSelector >::plan ( ) const -> plan_type const&
inlinenoexcept

Return the immutable execution-neutral coefficient plan.


The documentation for this class was generated from the following file: