1 #pragma once 2 #include <ATen/core/TensorBase.h> 3 #include <cstdint> 4 5 namespace at { 6 namespace native { 7 8 // Stable-sort self into values, and set indices to the 9 // inverse-permutation from values back to self. 10 // Output tensors must be pre-allocated and contiguous. 11 void launch_stable_sort_kernel( 12 const TensorBase& self, 13 int64_t dim, 14 bool descending, 15 const TensorBase& values, 16 const TensorBase& indices); 17 18 } // namespace native 19 } // namespace at 20