SyTen

◆ output_nodes

std::map<ComputeNodeWPtr, std::set<Size>, std::owner_less<ComputeNodeWPtr> > syten::STensorImpl::Autodiff::ComputeNode::output_nodes
private

Once a backward sweep is starting, this map will collect compute nodes which obtained as input one of the outputs of this compute node.

Those compute nodes will be stored alongside a set of indices into their input_nodes vector.

This data structure is cleaned up of expired nodes on every call to get_output_adjoint(). It can likely also be improved a lot, the std::set<> is there mostly for my convenience, but an allocation-free class should also work.

Referenced by get_output_adjoint().