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

Commit

Permalink
Merge pull request #325 from NVIDIA/fix-unreachable-warning
Browse files Browse the repository at this point in the history
Avoid warnings about unreachable code
  • Loading branch information
alliepiper authored Jul 22, 2021
2 parents eeb1a99 + 72ac249 commit 253e2a6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cub/block/radix_rank_sort_operations.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ struct BaseDigitExtractor

static __device__ __forceinline__ UnsignedBits ProcessFloatMinusZero(UnsignedBits key)
{
if (!FLOAT_KEY) return key;

UnsignedBits TWIDDLED_MINUS_ZERO_BITS =
TraitsT::TwiddleIn(UnsignedBits(1) << UnsignedBits(8 * sizeof(UnsignedBits) - 1));
UnsignedBits TWIDDLED_ZERO_BITS = TraitsT::TwiddleIn(0);
return key == TWIDDLED_MINUS_ZERO_BITS ? TWIDDLED_ZERO_BITS : key;
if (!FLOAT_KEY) {
return key;
} else {
UnsignedBits TWIDDLED_MINUS_ZERO_BITS =
TraitsT::TwiddleIn(UnsignedBits(1) << UnsignedBits(8 * sizeof(UnsignedBits) - 1));
UnsignedBits TWIDDLED_ZERO_BITS = TraitsT::TwiddleIn(0);
return key == TWIDDLED_MINUS_ZERO_BITS ? TWIDDLED_ZERO_BITS : key;
}
}
};

Expand Down

0 comments on commit 253e2a6

Please sign in to comment.