SyTen

◆ set_autodiff_node() [2/2]

void syten::STensorImpl::STensor::set_autodiff_node ( std::string &&  opname_,
Vec< Pair< Autodiff::ComputeNodePtr, Size > > &&  input_nodes_,
Vec< Autodiff::STensorId > &&  output_ids,
Autodiff::AdjointEvaluator &&  func_,
Vec< STensor > &&  output_shapes_,
Vec< AsyncCached< STensor > > &&  cached_tensors_ = {} 
)

Constructs a new ComputeNode from the supplied arguments and sets this tensors shared pointer to point at the newly-constructed node.

Checks that the supplied vector of output ids contains the current tensor ID.

References ad_compute_node, ad_id, syten::STensorImpl::Autodiff::create(), syten::hasMember(), std::move(), and SYTEN_ASSERT_MSG.

Referenced by syten::STensorImpl::add_dummy_leg(), syten::STensorImpl::Autodiff::create_product_differentiable(), enable_autodiff(), syten::STensorImpl::exp(), syten::STensorImpl::flip_in_product(), syten::STensorImpl::flip_on_tensor(), syten::STensorImpl::imag(), syten::STensorImpl::invert_diagonal(), syten::STensorImpl::log(), syten::STensorImpl::log2(), syten::STensorImpl::normSqd(), syten::STensorImpl::STensorProxy::operator STensor(), syten::STensorImpl::operator*=(), syten::STensorImpl::operator+=(), syten::STensorImpl::operator/=(), syten::STensorImpl::prod(), syten::STensorImpl::project(), syten::STensorImpl::real(), syten::STensorImpl::remove_dummy_leg(), syten::STensorImpl::sqrt(), syten::STensorImpl::svd(), and syten::STensorImpl::trace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: