![]() |
YAC 3.7.0
Yet Another Coupler
|
#include "yac_config.h"
#include <stdlib.h>
#include "ppm/ppm_xfuncs.h"
#include "ppm/core.h"
#include "yac_types.h"
#include "yac_assert.h"
Go to the source code of this file.
Data Structures | |
struct | yac_name_type_pair |
Macros | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | YAC_OMP_PARALLEL |
#define | YAC_OMP_FOR |
Functions | |
static void | yac_remove_duplicates_int (int *array, size_t *n) |
char const * | yac_name_type_pair_get_name (struct yac_name_type_pair const *pairs, size_t count, int type) |
int | yac_name_type_pair_get_type (struct yac_name_type_pair const *pairs, size_t count, char const *name) |
void | yac_qsort_index (void *a, size_t count, size_t size, int(*compare)(void const *, void const *), size_t *idx) |
#define MAX | ( | a, | |
b ) ((a) > (b) ? (a) : (b)) |
Definition at line 66 of file utils_common.h.
#define MIN | ( | a, | |
b ) ((a) < (b) ? (a) : (b)) |
Definition at line 70 of file utils_common.h.
#define YAC_OMP_FOR |
Definition at line 83 of file utils_common.h.
#define YAC_OMP_PARALLEL |
Definition at line 82 of file utils_common.h.
char const * yac_name_type_pair_get_name | ( | struct yac_name_type_pair const * | pairs, |
size_t | count, | ||
int | type ) |
int yac_name_type_pair_get_type | ( | struct yac_name_type_pair const * | pairs, |
size_t | count, | ||
char const * | name ) |
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.
|
inlinestatic |
remove duplicated entries from a list of integers
[in,out] | array | array containing a sorted (ascending) list of integers |
[in,out] | n | number of entries in array |
Definition at line 25 of file utils_common.h.