#include <stdio.h>#include <string.h>#include <stdlib.h>#include <assert.h>#include "abc_global.h"
Go to the source code of this file.
Macros | |
| #define | NUMBER1 3716960521u |
| #define | NUMBER2 2174103536u |
Functions | |
| ABC_NAMESPACE_IMPL_START void | Abc_SortMerge (int *p1Beg, int *p1End, int *p2Beg, int *p2End, int *pOut) |
| DECLARATIONS ///. | |
| void | Abc_Sort_rec (int *pInBeg, int *pInEnd, int *pOutBeg) |
| void | Abc_MergeSort (int *pInput, int nSize) |
| void | Abc_SortMergeCost2 (int *p1Beg, int *p1End, int *p2Beg, int *p2End, int *pOut, int *pCost) |
| void | Abc_SortCost2_rec (int *pInBeg, int *pInEnd, int *pOutBeg, int *pCost) |
| void | Abc_MergeSortCost2 (int *pInput, int nSize, int *pCost) |
| void | Abc_SortMergeCost2Reverse (int *p1Beg, int *p1End, int *p2Beg, int *p2End, int *pOut, int *pCost) |
| void | Abc_SortCost2Reverse_rec (int *pInBeg, int *pInEnd, int *pOutBeg, int *pCost) |
| void | Abc_MergeSortCost2Reverse (int *pInput, int nSize, int *pCost) |
| void | Abc_MergeSortCostMerge (int *p1Beg, int *p1End, int *p2Beg, int *p2End, int *pOut) |
| void | Abc_MergeSortCost_rec (int *pInBeg, int *pInEnd, int *pOutBeg) |
| int * | Abc_MergeSortCost (int *pCosts, int nSize) |
| int | Abc_SortNumCompare (int *pNum1, int *pNum2) |
| void | Abc_SortTest () |
| int | Abc_QuickSort1CompareInc (word *p1, word *p2) |
| int | Abc_QuickSort1CompareDec (word *p1, word *p2) |
| void | Abc_QuickSort1 (word *pData, int nSize, int fDecrease) |
| void | Abc_QuickSort2Inc_rec (word *pData, int l, int r) |
| void | Abc_QuickSort2Dec_rec (word *pData, int l, int r) |
| void | Abc_QuickSort3Inc_rec (word *pData, int l, int r) |
| void | Abc_QuickSort3Dec_rec (word *pData, int l, int r) |
| void | Abc_QuickSort2 (word *pData, int nSize, int fDecrease) |
| void | Abc_QuickSort3 (word *pData, int nSize, int fDecrease) |
| void | Abc_QuickSortCostData (int *pCosts, int nSize, int fDecrease, word *pData, int *pResult) |
| int * | Abc_QuickSortCost (int *pCosts, int nSize, int fDecrease) |
| void | Abc_QuickSortTest () |
| unsigned | Abc_Random (int fReset) |
| word | Abc_RandomW (int fReset) |
| #define NUMBER1 3716960521u |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 1001 of file utilSort.c.
| #define NUMBER2 2174103536u |
Definition at line 1002 of file utilSort.c.
| void Abc_MergeSort | ( | int * | pInput, |
| int | nSize ) |
Function*************************************************************
Synopsis [Returns the sorted array of integers.]
Description [This procedure is about 10% faster than qsort().]
SideEffects []
SeeAlso []
Definition at line 129 of file utilSort.c.


| int * Abc_MergeSortCost | ( | int * | pCosts, |
| int | nSize ) |
Function*************************************************************
Synopsis [Sorting procedure.]
Description [Returns permutation for the non-decreasing order of costs.]
SideEffects []
SeeAlso []
Definition at line 442 of file utilSort.c.


| void Abc_MergeSortCost2 | ( | int * | pInput, |
| int | nSize, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Returns the sorted array of integers.]
Description [This procedure is about 10% faster than qsort().]
SideEffects []
SeeAlso []
Definition at line 231 of file utilSort.c.

| void Abc_MergeSortCost2Reverse | ( | int * | pInput, |
| int | nSize, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Returns the sorted array of integers.]
Description [This procedure is about 10% faster than qsort().]
SideEffects []
SeeAlso []
Definition at line 333 of file utilSort.c.


| void Abc_MergeSortCost_rec | ( | int * | pInBeg, |
| int * | pInEnd, | ||
| int * | pOutBeg ) |
Function*************************************************************
Synopsis [Recursive sorting.]
Description []
SideEffects []
SeeAlso []
Definition at line 387 of file utilSort.c.


| void Abc_MergeSortCostMerge | ( | int * | p1Beg, |
| int * | p1End, | ||
| int * | p2Beg, | ||
| int * | p2End, | ||
| int * | pOut ) |
Function*************************************************************
Synopsis [Merging two lists of entries.]
Description []
SideEffects []
SeeAlso []
Definition at line 356 of file utilSort.c.

| void Abc_QuickSort1 | ( | word * | pData, |
| int | nSize, | ||
| int | fDecrease ) |
Definition at line 681 of file utilSort.c.


Definition at line 673 of file utilSort.c.

Function*************************************************************
Synopsis [QuickSort algorithm as implemented by qsort().]
Description []
SideEffects []
SeeAlso []
Definition at line 665 of file utilSort.c.

| void Abc_QuickSort2 | ( | word * | pData, |
| int | nSize, | ||
| int | fDecrease ) |
Definition at line 866 of file utilSort.c.

| void Abc_QuickSort2Dec_rec | ( | word * | pData, |
| int | l, | ||
| int | r ) |
Definition at line 768 of file utilSort.c.


| void Abc_QuickSort2Inc_rec | ( | word * | pData, |
| int | l, | ||
| int | r ) |
Definition at line 742 of file utilSort.c.


| void Abc_QuickSort3 | ( | word * | pData, |
| int | nSize, | ||
| int | fDecrease ) |
Definition at line 884 of file utilSort.c.


| void Abc_QuickSort3Dec_rec | ( | word * | pData, |
| int | l, | ||
| int | r ) |
Definition at line 830 of file utilSort.c.


| void Abc_QuickSort3Inc_rec | ( | word * | pData, |
| int | l, | ||
| int | r ) |
Definition at line 795 of file utilSort.c.


| int * Abc_QuickSortCost | ( | int * | pCosts, |
| int | nSize, | ||
| int | fDecrease ) |
Definition at line 923 of file utilSort.c.


| void Abc_QuickSortCostData | ( | int * | pCosts, |
| int | nSize, | ||
| int | fDecrease, | ||
| word * | pData, | ||
| int * | pResult ) |
Function*************************************************************
Synopsis [Wrapper around QuickSort to sort entries based on cost.]
Description []
SideEffects []
SeeAlso []
Definition at line 914 of file utilSort.c.


| void Abc_QuickSortTest | ( | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 946 of file utilSort.c.

| unsigned Abc_Random | ( | int | fReset | ) |
Definition at line 1004 of file utilSort.c.
| word Abc_RandomW | ( | int | fReset | ) |
Definition at line 1022 of file utilSort.c.


| void Abc_Sort_rec | ( | int * | pInBeg, |
| int * | pInEnd, | ||
| int * | pOutBeg ) |
Function*************************************************************
Synopsis [Recursive sorting.]
Description []
SideEffects []
SeeAlso []
Definition at line 80 of file utilSort.c.


| void Abc_SortCost2_rec | ( | int * | pInBeg, |
| int * | pInEnd, | ||
| int * | pOutBeg, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Recursive sorting.]
Description []
SideEffects []
SeeAlso []
Definition at line 182 of file utilSort.c.


| void Abc_SortCost2Reverse_rec | ( | int * | pInBeg, |
| int * | pInEnd, | ||
| int * | pOutBeg, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Recursive sorting.]
Description []
SideEffects []
SeeAlso []
Definition at line 284 of file utilSort.c.


| ABC_NAMESPACE_IMPL_START void Abc_SortMerge | ( | int * | p1Beg, |
| int * | p1End, | ||
| int * | p2Beg, | ||
| int * | p2End, | ||
| int * | pOut ) |
DECLARATIONS ///.
CFile****************************************************************
FileName [utilSort.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Merge sort with user-specified cost.]
Synopsis [Merge sort with user-specified cost.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - Feburary 13, 2011.]
Revision [
] FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Merging two lists of entries.]
Description []
SideEffects []
SeeAlso []
Definition at line 49 of file utilSort.c.

| void Abc_SortMergeCost2 | ( | int * | p1Beg, |
| int * | p1End, | ||
| int * | p2Beg, | ||
| int * | p2End, | ||
| int * | pOut, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Merging two lists of entries.]
Description []
SideEffects []
SeeAlso []
Definition at line 151 of file utilSort.c.

| void Abc_SortMergeCost2Reverse | ( | int * | p1Beg, |
| int * | p1End, | ||
| int * | p2Beg, | ||
| int * | p2End, | ||
| int * | pOut, | ||
| int * | pCost ) |
Function*************************************************************
Synopsis [Merging two lists of entries.]
Description []
SideEffects []
SeeAlso []
Definition at line 253 of file utilSort.c.

| int Abc_SortNumCompare | ( | int * | pNum1, |
| int * | pNum2 ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 586 of file utilSort.c.

| void Abc_SortTest | ( | ) |
Function*************************************************************
Synopsis [Testing the sorting procedure.]
Description []
SideEffects []
SeeAlso []
Definition at line 602 of file utilSort.c.
