Update example_device_radix_sort.cu #1608
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updates the
Pair::operator<
in example_device_radix_sort.cu to treat +0.f and -0.f as equivalent.closes Issue 1575
Checklist
I assume adding tests is irrelevant due to this being an example. I did test that my solution produces the desired result.
Something to note is that the how to compile example:
nvcc -arch=sm_80 example_device_radix_sort.cu -I../.. -lcudart -O3
did not work for me when standing in cccl/cub/examples/device.But produced:
In file included from ../../cub/util_allocator.cuh:36, from example_device_radix_sort.cu:45: ../../cub/config.cuh:36:10: fatal error: cuda/__cccl_config: No such file or directory 36 | #include <cuda/__cccl_config> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
I could however run
nvcc -arch=sm_80 examples/device/example_device_radix_sort.cu -Iexamples/ -lcudart
from cccl/cub.