Go to the source code of this file.
|
static ABC_NAMESPACE_IMPL_START int | num_cmp1 (int *x, int *y) |
| DECLARATIONS ///. More...
|
|
static int | num_cmp2 (int *x, int *y) |
|
static void | selectionsort (int *array, int size, int(*comp)(const void *, const void *)) |
|
static void | sort_rec (int *array, int size, int(*comp)(const void *, const void *)) |
|
void | minisat_sort (int *array, int size, int(*comp)(const void *, const void *)) |
|
static void | selectionsort2 (int *array, int size) |
|
static void | sort_rec2 (int *array, int size) |
|
void | minisat_sort2 (int *array, int size) |
|
int * | Gia_SortGetTest (int nSize) |
|
void | Gia_SortVerifySorted (int *pArray, int nSize) |
|
void | Gia_SortTest () |
|
static void | selectionsort3 (float *array, int *perm, int size) |
|
static void | sort_rec3 (float *array, int *perm, int size) |
|
void | minisat_sort3 (float *array, int *perm, int size) |
|
int * | Gia_SortFloats (float *pArray, int *pPerm, int nSize) |
|
int* Gia_SortFloats |
( |
float * |
pArray, |
|
|
int * |
pPerm, |
|
|
int |
nSize |
|
) |
| |
Function*************************************************************
Synopsis [Sorts the array of floating point numbers.]
Description []
SideEffects []
SeeAlso []
Definition at line 251 of file giaSort.c.
257 for ( i = 0; i < nSize; i++ )
void minisat_sort3(float *array, int *perm, int size)
#define ABC_ALLOC(type, num)
int* Gia_SortGetTest |
( |
int |
nSize | ) |
|
Function*************************************************************
Synopsis [This is implementation of qsort in MiniSat.]
Description []
SideEffects []
SeeAlso []
Definition at line 144 of file giaSort.c.
149 for ( i = 0; i < nSize; i++ )
#define ABC_ALLOC(type, num)
Definition at line 159 of file giaSort.c.
161 int nSize = 100000000;
165 printf(
"Sorting %d integers\n", nSize );
168 qsort( pArray, nSize, 4, (
int (*)(
const void *,
const void *))
num_cmp1 );
void minisat_sort(int *array, int size, int(*comp)(const void *, const void *))
static abctime Abc_Clock()
int * Gia_SortGetTest(int nSize)
void Gia_SortVerifySorted(int *pArray, int nSize)
void minisat_sort2(int *array, int size)
static int num_cmp2(int *x, int *y)
static ABC_NAMESPACE_IMPL_START int num_cmp1(int *x, int *y)
DECLARATIONS ///.
void Gia_SortVerifySorted |
( |
int * |
pArray, |
|
|
int |
nSize |
|
) |
| |
Definition at line 153 of file giaSort.c.
156 for ( i = 1; i < nSize; i++ )
157 assert( pArray[i-1] <= pArray[i] );
void minisat_sort |
( |
int * |
array, |
|
|
int |
size, |
|
|
int(*)(const void *, const void *) |
comp |
|
) |
| |
Definition at line 79 of file giaSort.c.
static void sort_rec(int *array, int size, int(*comp)(const void *, const void *))
void minisat_sort2 |
( |
int * |
array, |
|
|
int |
size |
|
) |
| |
Definition at line 128 of file giaSort.c.
static void sort_rec2(int *array, int size)
void minisat_sort3 |
( |
float * |
array, |
|
|
int * |
perm, |
|
|
int |
size |
|
) |
| |
Definition at line 235 of file giaSort.c.
static void sort_rec3(float *array, int *perm, int size)
DECLARATIONS ///.
CFile****************************************************************
FileName [gia.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
Synopsis []
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [
- Id:
- gia.c,v 1.00 2005/06/20 00:00:00 alanmi Exp
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [This is implementation of qsort in MiniSat.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file giaSort.c.
45 {
return ((*x) < (*y)) ? -1 : (((*x) > (*y)) ? 1 : 0); }
static int num_cmp2 |
( |
int * |
x, |
|
|
int * |
y |
|
) |
| |
|
static |
Definition at line 46 of file giaSort.c.
46 {
return (*x) < (*y); }
static void selectionsort |
( |
int * |
array, |
|
|
int |
size, |
|
|
int(*)(const void *, const void *) |
comp |
|
) |
| |
|
inlinestatic |
Definition at line 47 of file giaSort.c.
51 for (i = 0; i <
size-1; i++){
53 for (j = i+1; j <
size; j++){
54 if (comp(array + j, array + best_i))
57 tmp = array[i]; array[i] = array[best_i]; array[best_i] = tmp;
static void selectionsort2 |
( |
int * |
array, |
|
|
int |
size |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [This is implementation of qsort in MiniSat.]
Description []
SideEffects []
SeeAlso []
Definition at line 96 of file giaSort.c.
100 for (i = 0; i <
size-1; i++){
102 for (j = i+1; j <
size; j++){
103 if (array[j] < array[best_i])
106 tmp = array[i]; array[i] = array[best_i]; array[best_i] = tmp;
static void selectionsort3 |
( |
float * |
array, |
|
|
int * |
perm, |
|
|
int |
size |
|
) |
| |
|
inlinestatic |
Function*************************************************************
Synopsis [This is implementation of qsort in MiniSat.]
Description []
SideEffects []
SeeAlso []
Definition at line 199 of file giaSort.c.
204 for (i = 0; i <
size-1; i++){
206 for (j = i+1; j <
size; j++){
207 if (array[j] < array[best_i])
210 tmpf = array[i]; array[i] = array[best_i]; array[best_i] = tmpf;
211 tmpi = perm[i]; perm[i] = perm[best_i]; perm[best_i] = tmpi;
static void sort_rec |
( |
int * |
array, |
|
|
int |
size, |
|
|
int(*)(const void *, const void *) |
comp |
|
) |
| |
|
static |
Definition at line 60 of file giaSort.c.
65 int pivot = array[
size/2];
70 do i++;
while(comp(array + i, &pivot));
71 do j--;
while(comp(&pivot, array + j));
73 tmp = array[i]; array[i] = array[j]; array[j] = tmp;
static void selectionsort(int *array, int size, int(*comp)(const void *, const void *))
static void sort_rec(int *array, int size, int(*comp)(const void *, const void *))
static void sort_rec2 |
( |
int * |
array, |
|
|
int |
size |
|
) |
| |
|
static |
Definition at line 109 of file giaSort.c.
114 int pivot = array[
size/2];
119 do i++;
while(array[i] < pivot);
120 do j--;
while(pivot < array[j]);
122 tmp = array[i]; array[i] = array[j]; array[j] = tmp;
static void selectionsort2(int *array, int size)
static void sort_rec2(int *array, int size)
static void sort_rec3 |
( |
float * |
array, |
|
|
int * |
perm, |
|
|
int |
size |
|
) |
| |
|
static |
Definition at line 214 of file giaSort.c.
219 float pivot = array[
size/2];
225 do i++;
while(array[i] < pivot);
226 do j--;
while(pivot < array[j]);
228 tmpf = array[i]; array[i] = array[j]; array[j] = tmpf;
229 tmpi = perm[i]; perm[i] = perm[j]; perm[j] = tmpi;
static void selectionsort3(float *array, int *perm, int size)
static void sort_rec3(float *array, int *perm, int size)