Skip to content

Commit

Permalink
[Doc] Fix docstring of aten::Sort (dmlc#2579)
Browse files Browse the repository at this point in the history
A small patch to dmlc#2391.
  • Loading branch information
jermainewang authored Jan 27, 2021
1 parent 2576647 commit 9fc5eed
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions include/dgl/aten/array_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,12 @@ IdArray NonZero(NDArray array);
* is always in int64.
*
* \param array Input array.
* \param num_bits The number of bits used by the range of values in the array,
* or 0 to use all bits of the type. This is currently only used when sort
* arrays on the GPU.
* \param num_bits The number of bits used in key comparison. The bits are
* right aligned. For example, setting `num_bits` to 8 means using bits from
* `sizeof(IdType) * 8 - num_bits` (inclusive) to `sizeof(IdType) * 8`
* (exclusive). Setting it to a small value could speed up the sorting if the
* underlying sorting algorithm is radix sort (e.g., on GPU). Setting it to
* value of zero, uses full number of bits of the type (sizeof(IdType)*8).
* On CPU, it currently has no effect.
* \param num_bits The number of bits used in key comparison. For example, if the data type
* of the input array is int32_t and `num_bits = 8`, it only uses bits in index
* range [0, 8) for sorting. Setting it to a small value could
* speed up the sorting if the underlying sorting algorithm is radix sort (e.g., on GPU).
* Setting it to zero (default value) means using all the bits for comparison.
* On CPU, it currently has no effect.
* \return A pair of arrays: sorted values and sorted index to the original position.
*/
std::pair<IdArray, IdArray> Sort(IdArray array, int num_bits = 0);
Expand Down

0 comments on commit 9fc5eed

Please sign in to comment.