Skip to content

Commit d078b2c

Browse files
author
kevyuu
committed
Rename LSBSorter to RadixLSBSorter
1 parent 7424828 commit d078b2c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

include/nbl/asset/utils/CVertexHashGrid.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ class CVertexHashGrid
101101
static constexpr uint32_t invalidHash = 0xFFFFFFFF;
102102

103103
using sorter_t = std::variant<
104-
core::LSBSorter<KeyAccessor::key_bit_count, uint16_t>,
105-
core::LSBSorter<KeyAccessor::key_bit_count, uint32_t>,
106-
core::LSBSorter<KeyAccessor::key_bit_count, size_t>>;
104+
core::RadixLsbSorter<KeyAccessor::key_bit_count, uint16_t>,
105+
core::RadixLsbSorter<KeyAccessor::key_bit_count, uint32_t>,
106+
core::RadixLsbSorter<KeyAccessor::key_bit_count, size_t>>;
107107
sorter_t m_sorter;
108108

109109
static sorter_t createSorter(size_t vertexCount)
110110
{
111111
if (vertexCount < (0x1ull << 16ull))
112-
return core::LSBSorter<KeyAccessor::key_bit_count, uint16_t>();
112+
return core::RadixLsbSorter<KeyAccessor::key_bit_count, uint16_t>();
113113
if (vertexCount < (0x1ull << 32ull))
114-
return core::LSBSorter<KeyAccessor::key_bit_count, uint32_t>();
115-
return core::LSBSorter<KeyAccessor::key_bit_count, size_t>();
114+
return core::RadixLsbSorter<KeyAccessor::key_bit_count, uint32_t>();
115+
return core::RadixLsbSorter<KeyAccessor::key_bit_count, size_t>();
116116
}
117117

118118
collection_t m_vertices;

include/nbl/core/algorithm/radix_sort.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ constexpr int8_t find_msb(const T& a_variable)
5353
}
5454

5555
template<size_t key_bit_count, typename histogram_t>
56-
struct LSBSorter
56+
struct RadixLsbSorter
5757
{
5858
_NBL_STATIC_INLINE_CONSTEXPR uint16_t histogram_bytesize = 8192u;
5959
_NBL_STATIC_INLINE_CONSTEXPR size_t histogram_size = size_t(histogram_bytesize)/sizeof(histogram_t);
@@ -129,11 +129,11 @@ inline RandomIt radix_sort(RandomIt input, RandomIt scratch, const size_t rangeS
129129
assert(std::abs(std::distance(input,scratch))>=rangeSize);
130130

131131
if (rangeSize<static_cast<decltype(rangeSize)>(0x1ull<<16ull))
132-
return LSBSorter<KeyAccessor::key_bit_count,uint16_t>()(input,scratch,static_cast<uint16_t>(rangeSize),comp);
132+
return RadixLsbSorter<KeyAccessor::key_bit_count,uint16_t>()(input,scratch,static_cast<uint16_t>(rangeSize),comp);
133133
if (rangeSize<static_cast<decltype(rangeSize)>(0x1ull<<32ull))
134-
return LSBSorter<KeyAccessor::key_bit_count,uint32_t>()(input,scratch,static_cast<uint32_t>(rangeSize),comp);
134+
return RadixLsbSorter<KeyAccessor::key_bit_count,uint32_t>()(input,scratch,static_cast<uint32_t>(rangeSize),comp);
135135
else
136-
return LSBSorter<KeyAccessor::key_bit_count,size_t>()(input,scratch,rangeSize,comp);
136+
return RadixLsbSorter<KeyAccessor::key_bit_count,size_t>()(input,scratch,rangeSize,comp);
137137
}
138138

139139
//! Because Radix Sort needs O(2n) space and a number of passes dependant on the key length, the final sorted range can be either in `input` or `scratch`

0 commit comments

Comments
 (0)