gwenhywfar  5.14.1
Macros | Functions
sort_r.h File Reference
#include <stdlib.h>
#include <string.h>
Include dependency graph for sort_r.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _SORT_R_INLINE   inline
 
#define SORT_R_SWAP(a, b, tmp)   ((tmp) = (a), (a) = (b), (b) = (tmp))
 

Functions

static _SORT_R_INLINE void sort_r (void *base, size_t nel, size_t width, int(*compar)(const void *_a, const void *_b, void *_arg), void *arg)
 
static _SORT_R_INLINE int sort_r_cmpswap (char *__restrict a, char *__restrict b, size_t w, int(*compar)(const void *_a, const void *_b, void *_arg), void *arg)
 
static _SORT_R_INLINE void sort_r_simple (void *base, size_t nel, size_t w, int(*compar)(const void *_a, const void *_b, void *_arg), void *arg)
 
static _SORT_R_INLINE void sort_r_swap (char *__restrict a, char *__restrict b, size_t w)
 
static _SORT_R_INLINE void sort_r_swap_blocks (char *ptr, size_t na, size_t nb)
 

Macro Definition Documentation

◆ _SORT_R_INLINE

#define _SORT_R_INLINE   inline

Definition at line 25 of file sort_r.h.

◆ SORT_R_SWAP

#define SORT_R_SWAP (   a,
  b,
  tmp 
)    ((tmp) = (a), (a) = (b), (b) = (tmp))

Definition at line 45 of file sort_r.h.

Referenced by sort_r_simple(), and sort_r_swap().

Function Documentation

◆ sort_r()

static _SORT_R_INLINE void sort_r ( void *  base,
size_t  nel,
size_t  width,
int(*)(const void *_a, const void *_b, void *_arg)  compar,
void *  arg 
)
static

Definition at line 274 of file sort_r.h.

References sort_r_simple().

Referenced by GWEN_QuickSort().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_r_cmpswap()

static _SORT_R_INLINE int sort_r_cmpswap ( char *__restrict  a,
char *__restrict  b,
size_t  w,
int(*)(const void *_a, const void *_b, void *_arg)  compar,
void *  arg 
)
static

Definition at line 59 of file sort_r.h.

References sort_r_swap().

Referenced by sort_r_simple().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_r_simple()

static _SORT_R_INLINE void sort_r_simple ( void *  base,
size_t  nel,
size_t  w,
int(*)(const void *_a, const void *_b, void *_arg)  compar,
void *  arg 
)
static

Definition at line 92 of file sort_r.h.

References sort_r_cmpswap(), SORT_R_SWAP, sort_r_swap(), and sort_r_swap_blocks().

Referenced by sort_r().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_r_swap()

static _SORT_R_INLINE void sort_r_swap ( char *__restrict  a,
char *__restrict  b,
size_t  w 
)
static

Definition at line 49 of file sort_r.h.

References SORT_R_SWAP.

Referenced by sort_r_cmpswap(), sort_r_simple(), and sort_r_swap_blocks().

Here is the caller graph for this function:

◆ sort_r_swap_blocks()

static _SORT_R_INLINE void sort_r_swap_blocks ( char *  ptr,
size_t  na,
size_t  nb 
)
static

Definition at line 82 of file sort_r.h.

References sort_r_swap().

Referenced by sort_r_simple().

Here is the call graph for this function:
Here is the caller graph for this function: