#include <linux/types.h>#include <linux/kernel.h>Defines | |
| #define | min(x, y) (x) < (y) ? (x):(y) |
| #define | swapcode(TYPE, parmi, parmj, n) |
| #define | SWAPINIT(a, es) |
| #define | swap(a, b) |
| #define | vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) |
Functions | |
| static __inline void | swapfunc (char *a, char *b, int n, int swaptype) |
| static __inline char * | med3 (char *a, char *b, char *c, int(*cmp)(const void *, const void *)) |
| void | sortValues (void *aa, size_t n, size_t es, int(*cmp)(const void *, const void *)) |
| #define min | ( | x, | |||
| y | ) | (x) < (y) ? (x):(y) |
| #define swap | ( | a, | |||
| b | ) |
| #define swapcode | ( | TYPE, | |||
| parmi, | |||||
| parmj, | |||||
| n | ) |
Value:
{ \
long i = (n) / sizeof (TYPE); \
register TYPE *pi = (TYPE *) (parmi); \
register TYPE *pj = (TYPE *) (parmj); \
do { \
register TYPE t = *pi; \
*pi++ = *pj; \
*pj++ = t; \
} while (--i > 0); \
}
| #define SWAPINIT | ( | a, | |||
| es | ) |
Value:
swaptype = ((char *)a - (char *)0) % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
| static __inline char* med3 | ( | char * | a, | |
| char * | b, | |||
| char * | c, | |||
| int(*)(const void *, const void *) | cmp | |||
| ) | [static] |
| void sortValues | ( | void * | aa, | |
| size_t | n, | |||
| size_t | es, | |||
| int(*)(const void *, const void *) | cmp | |||
| ) |
| static __inline void swapfunc | ( | char * | a, | |
| char * | b, | |||
| int | n, | |||
| int | swaptype | |||
| ) | [static] |
Algorithm Development Kit 1.0