diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-04-07 13:49:03 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-04-07 13:49:03 -0700 |
commit | a28fe0d324b0c096d1f6f2d27f956f4f1625ed9e (patch) | |
tree | 5d67bc486c4ad11f2c5127c4a797862f3c57c008 /src/misc/vec/vecInt.h | |
parent | 1794bd37cddc9ba24b9b1f517ee813e238f62ae4 (diff) | |
download | abc-a28fe0d324b0c096d1f6f2d27f956f4f1625ed9e.tar.gz abc-a28fe0d324b0c096d1f6f2d27f956f4f1625ed9e.tar.bz2 abc-a28fe0d324b0c096d1f6f2d27f956f4f1625ed9e.zip |
Unsuccessful attempt to improve PDR and a few minor changes.
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r-- | src/misc/vec/vecInt.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 6fcce5c6..318afd35 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -1123,6 +1123,32 @@ static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2 } +/**Function************************************************************* + + Synopsis [Performs fast mapping for one node.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline void Vec_IntSelectSort( int * pArray, int nSize ) +{ + int temp, i, j, best_i; + for ( i = 0; i < nSize-1; i++ ) + { + best_i = i; + for ( j = i+1; j < nSize; j++ ) + if ( pArray[j] < pArray[best_i] ) + best_i = j; + temp = pArray[i]; + pArray[i] = pArray[best_i]; + pArray[best_i] = temp; + } +} + ABC_NAMESPACE_HEADER_END |