Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <IceRevisitedRadix.h>
Public Member Functions | |
RadixSort () | |
~RadixSort () | |
RadixSort & | Sort (const udword *input, udword nb, RadixHint hint=RADIX_SIGNED) |
RadixSort & | Sort (const float *input, udword nb) |
inline_ const udword * | GetRanks () const |
Access to results. mRanks is a list of indices in sorted order, i.e. in the order you may further process your data. More... | |
inline_ udword * | GetRecyclable () const |
mIndices2 gets trashed on calling the sort routine, but otherwise you can recycle it the way you want. More... | |
udword | GetUsedRam () const |
inline_ udword | GetNbTotalCalls () const |
Returns the total number of calls to the radix sorter. More... | |
inline_ udword | GetNbHits () const |
Returns the number of eraly exits due to temporal coherence. More... | |
Revisited Radix Sort. This is my new radix routine:
History:
Definition at line 26 of file IceRevisitedRadix.h.
RadixSort::RadixSort | ( | ) |
RadixSort::~RadixSort | ( | ) |
Returns the number of eraly exits due to temporal coherence.
Definition at line 47 of file IceRevisitedRadix.h.
Returns the total number of calls to the radix sorter.
Definition at line 45 of file IceRevisitedRadix.h.
Access to results. mRanks is a list of indices in sorted order, i.e. in the order you may further process your data.
Definition at line 37 of file IceRevisitedRadix.h.
Referenced by Opcode::SweepAndPrune::Init().
mIndices2 gets trashed on calling the sort routine, but otherwise you can recycle it the way you want.
Definition at line 40 of file IceRevisitedRadix.h.
udword RadixSort::GetUsedRam | ( | ) | const |
Gets the ram used.
Definition at line 514 of file IceRevisitedRadix.cpp.
RadixSort & RadixSort::Sort | ( | const udword * | input, |
udword | nb, | ||
RadixHint | hint = RADIX_SIGNED |
||
) |
Main sort routine. This one is for integer values. After the call, mRanks contains a list of indices in sorted order, i.e. in the order you may process your data.
input | [in] a list of integer values to sort |
nb | [in] number of values to sort, must be < 2^31 |
hint | [in] RADIX_SIGNED to handle negative values, RADIX_UNSIGNED if you know your input buffer only contains positive values |
Definition at line 239 of file IceRevisitedRadix.cpp.
Referenced by Opcode::SweepAndPrune::Init().
Main sort routine. This one is for floating-point values. After the call, mRanks contains a list of indices in sorted order, i.e. in the order you may process your data.
input | [in] a list of floating-point values to sort |
nb | [in] number of values to sort, must be < 2^31 |
Definition at line 352 of file IceRevisitedRadix.cpp.