SyTen

◆ diagonal()

Vec< SDef > syten::STensorImpl::diagonal ( STensor const &  in)

Returns the diagonal entries of the rank-2 input tensor.

Remarks
As this function outputs a scalar vector, autodifferentiation information is lost.

References if_constexpr, syten::STensorImpl::STensor::rank(), SYTEN_ASSERT, SYTEN_TENSOR_RANK, and syten::STensorImpl::STensor::visit().

+ Here is the call graph for this function: