|
TMB Documentation
v1.9.11
|
Simple radix sort implementation. More...
#include <radix.hpp>
Public Attributes | |
| const std::vector< T > & | x |
| Reference to the input vector. | |
| std::vector< I > | x_order |
Output: order(x) permutation. | |
| std::vector< T > | x_sort |
Output: sort(x) | |
Static Public Attributes | |
| static const int | mask = num_keys - 1 |
| Mask to extract keys - E.g 0xFF by default. | |
| static const int | num_keys = (1 << radix_width) |
| Number of unique keys used per radix pass. | |
| static const int | radix_width = 8 |
| Radix width in bits. | |
| static const int | total_width = sizeof(T) * 8 |
| Total width in bits. | |
Simple radix sort implementation.
Beats std::sort for relevant workloads i.e. random integer sequences (hash codes).
| T | Unsigned integer value type of vector to be sorted. |
| I | Integer type of the index type. |