ScalES-PPM
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
msort.c File Reference

genometools merge sort adapted for ScalES-PPM More...

#include <sys/types.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "core/msort.h"

Macros

#define NATURAL
 
#define THRESHOLD   16 /* Best choice for natural merge cut-off. */
 
#define ISIZE   sizeof (int)
 
#define PSIZE   sizeof (u_char *)
 
#define ICOPY_LIST(src, dst, last)
 
#define ICOPY_ELT(src, dst, i)
 
#define CCOPY_LIST(src, dst, last)
 
#define CCOPY_ELT(src, dst, i)
 
#define msort_swap(a, b)
 
#define reverse(bot, top)
 
#define EVAL(p)
 

Typedefs

typedef unsigned char u_char
 

Functions

void PPM_msort_r (void *base, size_t nmemb, size_t size, void *comparinfo, PPM_CompareWithData compar)
 
void PPM_msort (void *base, size_t nmemb, size_t size, PPM_Compare compar)
 

Detailed Description

genometools merge sort adapted for ScalES-PPM

Version
1.0
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Macro Definition Documentation

◆ CCOPY_ELT

#define CCOPY_ELT ( src,
dst,
i )
Value:
do \
*dst++ = *src++; \
while (i -= 1)

◆ CCOPY_LIST

#define CCOPY_LIST ( src,
dst,
last )
Value:
do \
*dst++ = *src++; \
while (src < last)

◆ EVAL

#define EVAL ( p)
Value:
(u_char **)\
((u_char *)0 +\
((size_t)((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1)))

◆ ICOPY_ELT

#define ICOPY_ELT ( src,
dst,
i )
Value:
do \
*(int*) dst = *(int*) src, src += ISIZE, dst += ISIZE; \
while (i -= ISIZE)

◆ ICOPY_LIST

#define ICOPY_LIST ( src,
dst,
last )
Value:
do \
*(int*)dst = *(int*)src, src += ISIZE, dst += ISIZE; \
while (src < last)

◆ msort_swap

#define msort_swap ( a,
b )
Value:
{ \
s = b; \
size_t i = size; \
do { \
__typeof (*a) tmp = *a; *a++ = *s; *s++ = tmp; \
} while (--i); \
a -= size; \
}

◆ reverse

#define reverse ( bot,
top )
Value:
{ \
s = top; \
do { \
size_t i = size; \
do { \
__typeof (*bot) tmp = *bot; *bot++ = *s; *s++ = tmp; \
} while (--i); \
s -= size2; \
} while (bot < s); \
}

Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.