TMB Documentation  v1.9.11
Public Attributes | Static Public Attributes | List of all members
radix::radix< T, I > Struct Template Reference

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.
 

Detailed Description

template<class T, class I>
struct radix::radix< T, I >

Simple radix sort implementation.

Beats std::sort for relevant workloads i.e. random integer sequences (hash codes).

Template Parameters
TUnsigned integer value type of vector to be sorted.
IInteger type of the index type.

Definition at line 16 of file radix.hpp.


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