YetAnotherCoupler 3.5.2
|
#include <stdlib.h>
#include <string.h>
#include "utils_core.h"
#include "quicksort_template.h"
#include "quicksort_template_2.h"
Go to the source code of this file.
Functions | |
void | yac_qsort_index (void *a_, size_t count, size_t size, int(*compare)(void const *, void const *), size_t *idx) |
#define MAX_STACK_SIZE (64) |
Definition at line 164 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE yac_int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE yac_int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE yac_int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE yac_int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE size_t |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE uint64_t |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE size_t |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE size_t |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE size_t |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE int |
Definition at line 10 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_A size_t |
Definition at line 114 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_A yac_int |
Definition at line 114 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_A yac_int |
Definition at line 114 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_A int |
Definition at line 114 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_A int |
Definition at line 114 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_B size_t |
Definition at line 115 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_B yac_int |
Definition at line 115 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_B yac_int |
Definition at line 115 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_B size_t |
Definition at line 115 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_B size_t |
Definition at line 115 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_C double |
Definition at line 116 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_C double |
Definition at line 116 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_C size_t |
Definition at line 116 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_C size_t |
Definition at line 116 of file quicksort.c.
#define YAC_QSORT_ARRAY_TYPE_C yac_int |
Definition at line 116 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE size_t |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE yac_int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE uint64_t |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE size_t |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE size_t |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE size_t |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE yac_int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE void* |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE yac_int |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_INDEX_TYPE double |
Definition at line 11 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_yac_int |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_uint64_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_int |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_size_t_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_uint64_t_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_int_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_size_t_yac_int |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_size_t_int |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_size_t_void_p |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_int_yac_int |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_int_double |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_size_t_size_t_double |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_yac_int_double |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_yac_int_yac_int_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_int_size_t_size_t |
Definition at line 12 of file quicksort.c.
#define YAC_QSORT_NAME yac_quicksort_index_int_size_t_yac_int |
Definition at line 12 of file quicksort.c.
void yac_qsort_index | ( | void * | a_, |
size_t | count, | ||
size_t | size, | ||
int(* | compare )(void const *, void const *), | ||
size_t * | idx ) |
Non-recursive stack version of Quicksort
... from N. Wirth's Pascal Book, 'Algorithms + Data Structures = Programms'. by Alan Miller ( 19 Jul 1995 )
taken from:
http://www.nag.com/nagware/Examples/nur.f90
see also:
[in,out] | a_ | data to be sorted |
[in] | count | length of data |
[in] | size | size of single data element |
[in] | compare | compare routine for data elements |
[out] | idx | old index of sorted returned a |
Definition at line 185 of file quicksort.c.