Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Add "Floating Point Special Cases" section to RadixSort docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Jun 8, 2021
1 parent d12cb62 commit e4c3bbf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
7 changes: 7 additions & 0 deletions cub/block/block_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ namespace cub {
* (<tt>unsigned char</tt>, \p int, \p double, etc.) as well as CUDA's \p __half
* half-precision floating-point type.
*
* \par Floating-Point Special Cases
*
* - Positive and negative zeros are considered equivalent, and will be treated
* as such in the output.
* - No special handling is implemented for NaN values; these are sorted
* according to their bit representations after any transformations.
*
* \par Bitwise Key Transformations
* Although the direct radix sorting method can only be applied to unsigned
* integral types, BlockRadixSort is able to sort signed and floating-point
Expand Down
7 changes: 7 additions & 0 deletions cub/device/device_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ namespace cub {
* (<tt>unsigned char</tt>, \p int, \p double, etc.) as well as CUDA's \p __half
* half-precision floating-point type.
*
* \par Floating-Point Special Cases
*
* - Positive and negative zeros are considered equivalent, and will be treated
* as such in the output.
* - No special handling is implemented for NaN values; these are sorted
* according to their bit representations after any transformations.
*
* \par Transformations
* Although the direct radix sorting method can only be applied to unsigned
* integral types, DeviceRadixSort is able to sort signed and floating-point
Expand Down
12 changes: 3 additions & 9 deletions cub/device/device_segmented_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,9 @@ namespace cub {
* of the symbolic alphabet, the radix sorting method produces a lexicographic
* ordering of those keys.
*
* \par
* DeviceSegmentedRadixSort can sort all of the built-in C++ numeric primitive types
* (<tt>unsigned char</tt>, \p int, \p double, etc.) as well as CUDA's \p __half
* half-precision floating-point type. Although the direct radix sorting
* method can only be applied to unsigned integral types, DeviceSegmentedRadixSort
* is able to sort signed and floating-point types via simple bit-wise transformations
* that ensure lexicographic key ordering. DeviceSegmentedRadixSort is stable. For
* floating-point types -0.0 and +0.0 are considered equal and appear in the
* result in the same order as they appear in the input.
* \par See Also
* DeviceSegmentedRadixSort shares its implementation with DeviceRadixSort. See
* that algorithm's documentation for more information.
*
* \par Usage Considerations
* \cdp_class{DeviceSegmentedRadixSort}
Expand Down

0 comments on commit e4c3bbf

Please sign in to comment.