ublas icon indicating copy to clipboard operation
ublas copied to clipboard

Transpose for Rank One Tensors

Open amitsingh19975 opened this issue 3 years ago • 1 comments

As of now, the rank one tensor does not allow to be transposed.

auto const n = extents<>{3};
auto a = tensor_dynamic{n, 1.f};
auto c = tensor_dynamic{n};
std::vector<std::size_t> pi{3};
ublas::trans( 1ul, n.data(), pi.data(), c.data(), c.strides().data(),    a.data(), res.strides().data() ); // c = [0,0,0]

amitsingh19975 avatar May 28 '21 11:05 amitsingh19975

same request here. Would also call for handling rank n tensors by transposing per slice.

WilliamTambellini avatar Jul 18 '23 15:07 WilliamTambellini