Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

/ray/src/lib/tl/test-sort.cc File Reference

#include "sort.h"
#include <lib/htime.h>
#include <stdio.h>

Include dependency graph for test-sort.cc:

Include dependency graph

Go to the source code of this file.

Classes

struct  MYOP

Functions

int * GenRandomPerm (size_t size, size_t red)
template<typename T, typename _OP> void X_DumbQuickSort (T *a, size_t nelem, const _OP &op=TLDefaultOperators_PDT< T >())
template<typename T, typename _OP> void X_CleverQuickSort (T *a, size_t nelem, const _OP &op=TLDefaultOperators_PDT< T >())
int _DoSortAndTest (int *perm, size_t permsize, size_t red, void(*sort)(int *, size_t, const MYOP< int > &), const char *name)
int main ()

Variables

char * prg_name = "test-sort"


Function Documentation

int _DoSortAndTest int *  perm,
size_t  permsize,
size_t  red,
void(*  sort)(int *, size_t, const MYOP< int > &),
const char *  name
 

Definition at line 119 of file test-sort.cc.

References MYOP< T >::ass_calls, MYOP< T >::clr_calls, MYOP< T >::cmp_calls, FREE(), MYOP< T >::ini_calls, and HTime::MsecElapsed().

Referenced by main().

int* GenRandomPerm size_t  size,
size_t  red
 

Definition at line 92 of file test-sort.cc.

Referenced by main().

int main  ) 
 

Definition at line 154 of file test-sort.cc.

References _DoSortAndTest(), LMallocUsage::curr_used, FREE(), LMallocUsage::free_calls, GenRandomPerm(), HeapSort(), InsertionSort(), InsertionSortBS(), LMallocGetUsage(), LMallocUsage::malloc_calls, LMallocUsage::max_used, LMallocUsage::max_used_chunks, prg_name, LMallocUsage::realloc_calls, LMallocUsage::used_chunks, X_CleverQuickSort(), and X_DumbQuickSort().

template<typename T, typename _OP>
void X_CleverQuickSort T *  a,
size_t  nelem,
const _OP &  op = TLDefaultOperators_PDT<T>()
 

Definition at line 113 of file test-sort.cc.

References CleverQuickSort().

Referenced by main().

template<typename T, typename _OP>
void X_DumbQuickSort T *  a,
size_t  nelem,
const _OP &  op = TLDefaultOperators_PDT<T>()
 

Definition at line 108 of file test-sort.cc.

References DumbQuickSort().

Referenced by main().


Variable Documentation

char* prg_name = "test-sort"
 

Definition at line 24 of file test-sort.cc.


Generated on Sat Feb 19 22:34:53 2005 for Ray by doxygen 1.3.5