RavEngine
Loading...
Searching...
No Matches
physx::Cm::RadixSort Class Reference
Inheritance diagram for physx::Cm::RadixSort:
[legend]

Public Member Functions

RadixSort & Sort (const PxU32 *input, PxU32 nb, RadixHint hint=RADIX_SIGNED)
 
RadixSort & Sort (const float *input, PxU32 nb)
 
PX_FORCE_INLINE const PxU32 * 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.
 
PX_FORCE_INLINE PxU32 * GetRecyclable () const
 mIndices2 gets trashed on calling the sort routine, but otherwise you can recycle it the way you want.
 
PX_FORCE_INLINE PxU32 GetNbTotalCalls () const
 Returns the total number of calls to the radix sorter.
 
PX_FORCE_INLINE PxU32 GetNbHits () const
 Returns the number of eraly exits due to temporal coherence.
 
PX_FORCE_INLINE void invalidateRanks ()
 
bool SetBuffers (PxU32 *ranks0, PxU32 *ranks1, PxU32 *histogram1024, PxU32 **links256)
 

Protected Attributes

PxU32 mCurrentSize
 Current size of the indices list.
 
PxU32 * mRanks
 Two lists, swapped each pass.
 
PxU32 * mRanks2
 
PxU32 * mHistogram1024
 
PxU32 ** mLinks256
 
PxU32 mTotalCalls
 Total number of calls to the sort routine.
 
PxU32 mNbHits
 Number of early exits due to coherence.
 
bool mDeleteRanks
 

Member Function Documentation

◆ Sort() [1/2]

RadixSort & RadixSort::Sort ( const float *  input2,
PxU32  nb 
)

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.

Parameters
input2[in] a list of floating-point values to sort
nb[in] number of values to sort, must be < 2^31
Returns
Self-Reference
Warning
only sorts IEEE floating-point values

◆ Sort() [2/2]

RadixSort & RadixSort::Sort ( const PxU32 *  input,
PxU32  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.

Parameters
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
Returns
Self-Reference

The documentation for this class was generated from the following files: