Polly 20.0.0git
Macros | Functions
isl_sort.c File Reference
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <isl_sort.h>

Go to the source code of this file.

Macros

#define MID(lo, hi)   (lo + ((hi - lo) >> 1))
 

Functions

static void msort (void *array, void *buf, size_t low, size_t high, size_t size, int(*compare)(const void *, const void *, void *), void *arg)
 
static int MergeSort (void *base, size_t nmemb, size_t size, int(*compare)(const void *, const void *, void *), void *arg)
 
int isl_sort (void *const pbase, size_t total_elems, size_t size, int(*cmp)(const void *, const void *, void *arg), void *arg)
 

Macro Definition Documentation

◆ MID

#define MID (   lo,
  hi 
)    (lo + ((hi - lo) >> 1))

Definition at line 30 of file isl_sort.c.

Function Documentation

◆ isl_sort()

int isl_sort ( void *const  pbase,
size_t  total_elems,
size_t  size,
int(*)(const void *, const void *, void *arg cmp,
void *  arg 
)

◆ MergeSort()

static int MergeSort ( void *  base,
size_t  nmemb,
size_t  size,
int(*)(const void *, const void *, void *)  compare,
void *  arg 
)
static

Definition at line 133 of file isl_sort.c.

References arg, msort(), and size.

Referenced by isl_sort().

◆ msort()

static void msort ( void *  array,
void *  buf,
size_t  low,
size_t  high,
size_t  size,
int(*)(const void *, const void *, void *)  compare,
void *  arg 
)
static

Definition at line 53 of file isl_sort.c.

References arg, b(), MID, msort(), and size.

Referenced by MergeSort(), and msort().