OpenLexocad  27.1
entt::radix_sort< Bit, N > Struct Template Reference

Function object for performing LSD radix sort. More...

#include <entt.hpp>

Public Member Functions

template<typename It , typename Getter = identity>
void operator() (It first, It last, Getter getter=Getter{}) const
 Sorts the elements in a range. More...
 

Detailed Description

template<std::size_t Bit, std::size_t N>
struct entt::radix_sort< Bit, N >

Function object for performing LSD radix sort.

Template Parameters
BitNumber of bits processed per pass.
NMaximum number of bits to sort.

Member Function Documentation

◆ operator()()

template<std::size_t Bit, std::size_t N>
template<typename It , typename Getter = identity>
void entt::radix_sort< Bit, N >::operator() ( It  first,
It  last,
Getter  getter = Getter{} 
) const
inline

Sorts the elements in a range.

Sorts the elements in a range using the given getter to access the actual data to be sorted.

This implementation is inspired by the online book Physically Based Rendering.

Template Parameters
ItType of random access iterator.
GetterType of getter function object.
Parameters
firstAn iterator to the first element of the range to sort.
lastAn iterator past the last element of the range to sort.
getterA valid getter function object.

The documentation for this struct was generated from the following file: