summaryrefslogtreecommitdiffstats
path: root/src/bool/kit/kitPerm.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
commit19c25fd6aab057b2373717f996fe538507c1b1e1 (patch)
tree7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src/bool/kit/kitPerm.c
parent94356f0d1fa8e671303299717f631ecf0ca2f17e (diff)
downloadabc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.gz
abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.bz2
abc-19c25fd6aab057b2373717f996fe538507c1b1e1.zip
Adding a wrapper around clock() for more accurate time counting in ABC.
Diffstat (limited to 'src/bool/kit/kitPerm.c')
-rw-r--r--src/bool/kit/kitPerm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bool/kit/kitPerm.c b/src/bool/kit/kitPerm.c
index 9d6f9373..16f5746d 100644
--- a/src/bool/kit/kitPerm.c
+++ b/src/bool/kit/kitPerm.c
@@ -280,31 +280,31 @@ void Kit_PermComputeTest()
word * T = (word *)malloc( 8 * NFUNCS );
word i, o, w = 0;
int k, b;
- clock_t clk;
+ abctime clk;
srand( 0 );
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
for ( b = 0; b < 8; b++ )
((byte *)(T + k))[b] = (byte)(rand() & 0xFF);
- ABC_PRT( "Assign", clock() - clk );
+ ABC_PRT( "Assign", Abc_Clock() - clk );
// T[0] = 0xacaccacaaccaacca;
// Kit_DsdPrintFromTruth( T, 6 );
// perform measurements
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
{
i = T[k];
// Kit_PermComputeNaive( &i, 6 );
Tf( i, 6 );
}
- ABC_PRT( "Perm1 ", clock() - clk );
+ ABC_PRT( "Perm1 ", Abc_Clock() - clk );
// perform measurements
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
{
i = T[k];
@@ -314,7 +314,7 @@ void Kit_PermComputeTest()
// Kit_PermComputeNaive( &w, 6 );
// assert( w == o );
}
- ABC_PRT( "Perm2 ", clock() - clk );
+ ABC_PRT( "Perm2 ", Abc_Clock() - clk );
assert( w == 0 );
free( T );