SyTen

◆ get_and_renew_autodiff()

STensor::AutodiffRenewReturn syten::STensorImpl::STensorProxy::get_and_renew_autodiff ( )

Returns a struct AutodiffRenewReturn as if by executing.

auto [old_id, old_node] = get_autodiff();
auto old_number = old_node->get_output_number(old_id);
AutodiffRenewReturn r;
r.old_id = old_id;
r.old_node = old_node;
r.old_number = old_number;
r.new_id = new_id;
std::tuple< Autodiff::STensorId, Autodiff::ComputeNodePtr > get_autodiff() const
Returns a tuple of autodifferentiation ID and node.
Definition: stensorproxy.cpp:222
Autodiff::STensorId new_autodiff_id()
Generates a new autodiff ID for the proxy.
Definition: stensorproxy.cpp:237
STensorId new_id()
Generates a new tensor ID larger than 999 to be used by auto-generated tensors.
Definition: ad_computenode.cpp:222

References get_autodiff(), new_autodiff_id(), syten::STensorImpl::Autodiff::new_id(), syten::STensorImpl::STensor::AutodiffRenewReturn::new_id, syten::STensorImpl::STensor::AutodiffRenewReturn::old_id, syten::STensorImpl::STensor::AutodiffRenewReturn::old_node, and syten::STensorImpl::STensor::AutodiffRenewReturn::old_number.

Referenced by parity().

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