20 #include <tensor/tensor.h>
25 static const n do_trace(
const Tensor<n> &t)
27 n output = number_zero<n>();
28 const index r = t.rows();
29 const index c = t.columns();
30 typename Tensor<n>::const_iterator it = t.begin();
31 for (index j = std::min(r,c); j--; it += (r+1)) {