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 #424 from senior-zero/fix-main/github/radix_sort_test
Browse files Browse the repository at this point in the history
Fix segfault in device radix sort tests
  • Loading branch information
alliepiper authored Jan 20, 2022
2 parents 82be33c + c923dc9 commit d5d009a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions test/test_device_radix_sort.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,19 @@ void TestSegments(
}

// Test single segment
if (num_items < 128 * 1000 || pre_sorted) {
// Right now we assign a single thread block to each segment, so lets keep it to under 128K items per segment
TestSegmentIterators(h_keys, num_items, 1, pre_sorted, h_segment_offsets, d_segment_offsets);
if (num_items > 0)
{
if (num_items < 128 * 1000 || pre_sorted)
{
// Right now we assign a single thread block to each segment, so lets
// keep it to under 128K items per segment
TestSegmentIterators(h_keys,
num_items,
1,
pre_sorted,
h_segment_offsets,
d_segment_offsets);
}
}

if (h_segment_offsets) delete[] h_segment_offsets;
Expand Down

0 comments on commit d5d009a

Please sign in to comment.