YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Data Structures | Functions
mergesort.c File Reference
#include <stdlib.h>
#include <string.h>
#include "ensure_array_size.h"
#include "utils_core.h"
Include dependency graph for mergesort.c:

Go to the source code of this file.

Data Structures

struct  run
 

Functions

static void determine_runs (char *base, size_t num, size_t size, int(*compar)(const void *, const void *), struct run **runs, size_t *num_runs)
 
static void merge (char *base_a, size_t num_a, int a_ascending, char *base_b, size_t num_b, int b_ascending, size_t size, int(*compar)(const void *, const void *), char *target)
 
static void merge_runs (char *base, size_t size, int(*compar)(const void *, const void *), struct run **runs, size_t *num_runs, char *buffer)
 
void yac_mergesort (void *base, size_t num, size_t size, int(*compar)(const void *, const void *))
 

Function Documentation

◆ determine_runs()

static void determine_runs ( char *  base,
size_t  num,
size_t  size,
int(*)(const void *, const void *)  compar,
struct run **  runs,
size_t *  num_runs 
)
static

Definition at line 17 of file mergesort.c.

Here is the caller graph for this function:

◆ merge()

static void merge ( char *  base_a,
size_t  num_a,
int  a_ascending,
char *  base_b,
size_t  num_b,
int  b_ascending,
size_t  size,
int(*)(const void *, const void *)  compar,
char *  target 
)
static

Definition at line 56 of file mergesort.c.

Here is the caller graph for this function:

◆ merge_runs()

static void merge_runs ( char *  base,
size_t  size,
int(*)(const void *, const void *)  compar,
struct run **  runs,
size_t *  num_runs,
char *  buffer 
)
static

Definition at line 98 of file mergesort.c.

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

◆ yac_mergesort()

void yac_mergesort ( void *  base,
size_t  num,
size_t  size,
int(*)(const void *, const void *)  compar 
)

Natural Merge sort

Examples
test_mergesort.c.

Definition at line 134 of file mergesort.c.

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