22 for (int64_t d = 0; d <= dim; ++d) {
29 for (int64_t d = dim + 1; d < src.
NumDims(); ++d) {
33 auto src_permute = src.
Permute(permute);
34 auto dst_permute = dst.
Permute(permute);
39 #ifdef BUILD_SYCL_MODULE
43 #ifdef BUILD_CUDA_MODULE
44 IndexAddCUDA_(dim, index, src_permute, dst_permute);
void push_back(const T &Elt)
Tensor Permute(const SizeVector &dims) const
Permute (dimension shuffle) the Tensor, returns a view.
void IndexAdd_(int64_t dim, const Tensor &index, const Tensor &src, Tensor &dst)
void IndexAddCPU_(int64_t dim, const Tensor &index, const Tensor &src, Tensor &dst)
void IndexAddSYCL_(int64_t dim, const Tensor &index, const Tensor &src, Tensor &dst)
Generic file read and write utility for python interface.