YetAnotherCoupler 3.3.0
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
utils_common.h File Reference
#include "yac_config.h"
#include <stdlib.h>
#include "ppm/ppm_xfuncs.h"
#include "ppm/core.h"
#include "yac_types.h"
#include "yac_assert.h"
Include dependency graph for utils_common.h:
This graph shows which files directly or indirectly include this file:

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)
 

Macro Definition Documentation

◆ MAX

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

◆ MIN

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

◆ YAC_OMP_FOR

#define YAC_OMP_FOR

Definition at line 78 of file utils_common.h.

◆ YAC_OMP_PARALLEL

#define YAC_OMP_PARALLEL

Definition at line 77 of file utils_common.h.

Function Documentation

◆ yac_name_type_pair_get_name()

char const * yac_name_type_pair_get_name ( struct yac_name_type_pair const *  pairs,
size_t  count,
int  type 
)

Definition at line 17 of file utils_core.c.

Here is the caller graph for this function:

◆ yac_name_type_pair_get_type()

int yac_name_type_pair_get_type ( struct yac_name_type_pair const *  pairs,
size_t  count,
char const *  name 
)

Definition at line 26 of file utils_core.c.

Here is the caller graph for this function:

◆ yac_qsort_index()

void yac_qsort_index ( void *  a_,
size_t  count,
size_t  size,
int(*)(void const *, void const *)  compare,
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:

Parameters
[in,out]a_data to be sorted
[in]countlength of data
[in]sizesize of single data element
[in]comparecompare routine for data elements
[out]idxold index of sorted returned a

Definition at line 185 of file quicksort.c.

Here is the caller graph for this function:

◆ yac_remove_duplicates_int()

static void yac_remove_duplicates_int ( int *  array,
size_t *  n 
)
inlinestatic

remove duplicated entries from a list of integers

Parameters
[in,out]arrayarray containing a sorted (ascending) list of integers
[in,out]nnumber of entries in array

Definition at line 25 of file utils_common.h.

Here is the caller graph for this function: