#include <IceRevisitedRadix.h>
Public Member Functions | |
udword | GetNbHits () const |
Returns the number of eraly exits due to temporal coherence. More... | |
udword | GetNbTotalCalls () const |
Returns the total number of calls to the radix sorter. More... | |
const udword * | GetRanks () const |
Access to results. mRanks is a list of indices in sorted order,. More... | |
udword * | GetRecyclable () const |
mIndices2 gets trashed on calling the sort routine, but More... | |
udword | GetUsedRam () const |
RadixSort () | |
udword * | RelinquishRanks () |
RadixSort & | Sort (const udword *input, udword nb, RadixHint hint=RADIX_SIGNED) |
RadixSort & | Sort (const float *input, udword nb) |
~RadixSort () | |
Private Member Functions | |
void | CheckResize (udword nb) |
bool | Resize (udword nb) |
Private Attributes | |
udword | mCurrentSize |
Current size of the indices list. More... | |
udword | mNbHits |
Number of early exits due to coherence. More... | |
udword * | mRanks |
Two lists, swapped each pass. More... | |
udword * | mRanks2 |
udword | mTotalCalls |
Total number of calls to the sort routine. More... | |
Revisited Radix Sort. This is my new radix routine:
History:
Definition at line 28 of file IceRevisitedRadix.h.
RadixSort::RadixSort | ( | ) |
Constructor.
Definition at line 188 of file IceRevisitedRadix.cc.
References INVALIDATE_RANKS.
Referenced by GetUsedRam().
RadixSort::~RadixSort | ( | ) |
Destructor.
Definition at line 203 of file IceRevisitedRadix.cc.
References DELETEARRAY, mRanks, and mRanks2.
|
inlineprivate |
Definition at line 248 of file IceRevisitedRadix.cc.
References CURRENT_SIZE, INVALIDATE_RANKS, mCurrentSize, and Resize().
Referenced by Sort().
|
inline |
Returns the number of eraly exits due to temporal coherence.
Definition at line 54 of file IceRevisitedRadix.h.
References mNbHits.
|
inline |
Returns the total number of calls to the radix sorter.
Definition at line 52 of file IceRevisitedRadix.h.
References mTotalCalls.
|
inline |
Access to results. mRanks is a list of indices in sorted order,.
Definition at line 39 of file IceRevisitedRadix.h.
References mRanks.
Referenced by mkfit::MkBuilder::import_seeds().
|
inline |
mIndices2 gets trashed on calling the sort routine, but
Definition at line 47 of file IceRevisitedRadix.h.
References mRanks2.
udword RadixSort::GetUsedRam | ( | ) | const |
Gets the ram used.
Definition at line 539 of file IceRevisitedRadix.cc.
References CURRENT_SIZE, and RadixSort().
udword * RadixSort::RelinquishRanks | ( | ) |
Detach mRanks. After this the caller is responsible for freeing this array via delete [] operator.
Definition at line 219 of file IceRevisitedRadix.cc.
References DELETEARRAY, mCurrentSize, mRanks, and mRanks2.
Referenced by mkfit::LayerOfHits::endRegistrationOfHits(), and mkfit::LayerOfHits::suckInHits().
|
private |
Resizes the inner lists.
nb | [in] new size (number of dwords) |
Definition at line 234 of file IceRevisitedRadix.cc.
References CHECKALLOC, DELETEARRAY, mRanks, and mRanks2.
Referenced by CheckResize().
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 271 of file IceRevisitedRadix.cc.
References CHECK_PASS_VALIDITY, CheckResize(), CREATE_HISTOGRAMS, mps_fire::i, gpuClustering::id, INVALID_RANKS, dqmiolumiharvest::j, mRanks, mRanks2, mTotalCalls, RADIX_SIGNED, RADIX_UNSIGNED, and VALIDATE_RANKS.
Referenced by mkfit::LayerOfHits::endRegistrationOfHits(), mkfit::MkBuilder::import_seeds(), and mkfit::LayerOfHits::suckInHits().
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 384 of file IceRevisitedRadix.cc.
References CHECK_PASS_VALIDITY, CheckResize(), CREATE_HISTOGRAMS, mps_fire::i, gpuClustering::id, input, INVALID_RANKS, dqmiolumiharvest::j, mRanks, mRanks2, mTotalCalls, and VALIDATE_RANKS.
|
private |
Current size of the indices list.
Definition at line 61 of file IceRevisitedRadix.h.
Referenced by CheckResize(), and RelinquishRanks().
|
private |
Number of early exits due to coherence.
Definition at line 66 of file IceRevisitedRadix.h.
Referenced by GetNbHits().
|
private |
Two lists, swapped each pass.
Definition at line 62 of file IceRevisitedRadix.h.
Referenced by GetRanks(), RelinquishRanks(), Resize(), Sort(), and ~RadixSort().
|
private |
Definition at line 63 of file IceRevisitedRadix.h.
Referenced by GetRecyclable(), RelinquishRanks(), Resize(), Sort(), and ~RadixSort().
|
private |
Total number of calls to the sort routine.
Definition at line 65 of file IceRevisitedRadix.h.
Referenced by GetNbTotalCalls(), and Sort().