@@ -76,7 +76,7 @@ constexpr auto useBakeKernel = false;
7676constexpr auto usePrecompiledAndBakedKernel = false ;
7777
7878#if defined( ORO_PRECOMPILED )
79- constexpr auto useBitCode = true ; // this flag means we use the bitcode file
79+ constexpr auto useBitCode = true ; // this flag means we use the bitcode file
8080#else
8181constexpr auto useBitCode = false ;
8282#endif
@@ -185,12 +185,11 @@ void RadixSort::compileKernels( const std::string& kernelPath, const std::string
185185 { " OnesweepReorderKey64" , Kernel::SORT_ONESWEEP_REORDER_KEY_64 },
186186 { " OnesweepReorderKeyPair64" , Kernel::SORT_ONESWEEP_REORDER_KEY_PAIR_64 } };
187187
188-
189188 for ( const auto & record : records )
190189 {
191- if constexpr ( usePrecompiledAndBakedKernel )
192- {
193- oroFunctions[record.kernelType ] = m_oroutils.getFunctionFromPrecompiledBinary_asData ( oro_compiled_kernels_h, oro_compiled_kernels_h_size, record.kernelName .c_str () );
190+ if constexpr ( usePrecompiledAndBakedKernel )
191+ {
192+ oroFunctions[record.kernelType ] = m_oroutils.getFunctionFromPrecompiledBinary_asData ( oro_compiled_kernels_h, oro_compiled_kernels_h_size, record.kernelName .c_str () );
194193 }
195194 else if constexpr ( useBakeKernel )
196195 {
@@ -210,15 +209,14 @@ void RadixSort::compileKernels( const std::string& kernelPath, const std::string
210209 printKernelInfo ( record.kernelName , oroFunctions[record.kernelType ] );
211210 }
212211 }
213-
214212}
215213
216214void RadixSort::configure ( const std::string& kernelPath, const std::string& includeDir, oroStream stream ) noexcept
217215{
218216 compileKernels ( kernelPath, includeDir );
219217
220218 constexpr bool enable_copying = false ;
221- constexpr auto key_type_size = sizeof (std::remove_pointer_t <decltype (KeyValueSoA::key)> );
219+ constexpr auto key_type_size = sizeof ( std::remove_pointer_t <decltype ( KeyValueSoA::key )> );
222220
223221 constexpr u64 gpSumBuffer = sizeof ( u32 ) * BIN_SIZE * key_type_size;
224222 m_gpSumBuffer.resizeAsync ( gpSumBuffer, enable_copying /* copy*/ , stream );
@@ -257,14 +255,14 @@ void RadixSort::sort( const KeyValueSoA& src, const KeyValueSoA& dst, uint32_t n
257255
258256 constexpr uint64_t bit_per_iteration = 8ULL ;
259257
260- int nIteration = div_round_up64 ( endBit - startBit, bit_per_iteration);
258+ int nIteration = div_round_up64 ( endBit - startBit, bit_per_iteration );
261259 uint64_t numberOfBlocks = div_round_up64 ( n, RADIX_SORT_BLOCK_SIZE );
262260
263261 m_lookbackBuffer.resetAsync ( stream );
264262 m_gpSumCounter.resetAsync ( stream );
265263 m_gpSumBuffer.resetAsync ( stream );
266264
267- // counter for gHistogram.
265+ // counter for gHistogram.
268266 {
269267 int maxBlocksPerMP = 0 ;
270268 oroError e = oroModuleOccupancyMaxActiveBlocksPerMultiprocessor ( &maxBlocksPerMP, oroFunctions[Kernel::SORT_GHISTOGRAM], GHISTOGRAM_THREADS_PER_BLOCK, 0 );
@@ -298,17 +296,14 @@ void RadixSort::sort( const KeyValueSoA& src, const KeyValueSoA& dst, uint32_t n
298296
299297 if ( s.key == src.key )
300298 {
301- m_oroutils.copyDtoDAsync (dst.key , src.key , n, stream);
299+ m_oroutils.copyDtoDAsync ( dst.key , src.key , n, stream );
302300
303301 if ( keyPair )
304302 {
305- m_oroutils.copyDtoDAsync (dst.value , src.value , n, stream);
303+ m_oroutils.copyDtoDAsync ( dst.value , src.value , n, stream );
306304 }
307305 }
308306}
309307
310- void RadixSort::sort ( u32 * src, u32 * dst, uint32_t n, int startBit, int endBit, oroStream stream ) noexcept
311- {
312- sort ( KeyValueSoA{ src, nullptr }, KeyValueSoA{ dst, nullptr }, n, startBit, endBit, stream );
313- }
308+ void RadixSort::sort ( u32 * src, u32 * dst, uint32_t n, int startBit, int endBit, oroStream stream ) noexcept { sort ( KeyValueSoA{ src, nullptr }, KeyValueSoA{ dst, nullptr }, n, startBit, endBit, stream ); }
314309}; // namespace Oro
0 commit comments