Logo Search packages:      
Sourcecode: blender version File versions

gim_radixsort.h File Reference

Detailed Description

Francisco Len N▀jera. Based on the work of Michael Herf : "fast floating-point radix sort" Avaliable on http://www.stereopsis.com/radix.html

Definition in file gim_radixsort.h.

#include "gim_memory.h"

Go to the source code of this file.


class  copy_elements_func
 Prototype for copying elements. More...
 Prototype for comparators. More...
class  integer_comparator
 Prototype for comparators. More...
class  less_comparator
 Prototype for comparators. More...
class  memcopy_elements_func
 Prototype for copying elements. More...
class  uint_key_func
 Prototype for getting the integer representation of an object. More...


#define D11_0(x)   (x & 0x7FF)
#define D11_1(x)   (x >> 11 & 0x7FF)
#define D11_2(x)   (x >> 22 )
#define kHist   2048


template<class T>
bool gim_binary_search (const T *_array, GUINT _start_i, GUINT _end_i, const T &_search_key, GUINT &_result_index)
 Failsafe Iterative binary search,Template version.
template<class T, typename KEYCLASS, typename COMP_CLASS>
bool gim_binary_search_ex (const T *_array, GUINT _start_i, GUINT _end_i, GUINT &_result_index, const KEYCLASS &_search_key, COMP_CLASS _comp_macro)
 Failsafe Iterative binary search,.
template<typename T, typename COMP_CLASS>
void gim_down_heap (T *pArr, GUINT k, GUINT n, COMP_CLASS CompareFunc)
 heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
template<typename T, typename COMP_CLASS>
void gim_heap_sort (T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
template<typename T, class GETKEY_CLASS, class COPY_CLASS>
void gim_radix_sort (T *array, GUINT element_count, GETKEY_CLASS get_uintkey_macro, COPY_CLASS copy_elements_macro)
 Sorts array in place. For generic use.
template<typename T, class GETKEY_CLASS>
void gim_radix_sort_array_tokens (T *array, GIM_RSORT_TOKEN *sorted_tokens, GUINT element_count, GETKEY_CLASS uintkey_macro)
 Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN.
void gim_radix_sort_rtokens (GIM_RSORT_TOKEN *array, GIM_RSORT_TOKEN *sorted, GUINT element_count)
 Radix sort for unsigned integer keys.

Generated by  Doxygen 1.6.0   Back to index