From 94ab17c39e847a2326138068fadfe52c3675f70b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 2 Jun 2022 07:47:33 -0700 Subject: Supporting new resub problem format. --- src/misc/util/utilTruth.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/misc/util') diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h index d9efa55f..bc8ac3f0 100644 --- a/src/misc/util/utilTruth.h +++ b/src/misc/util/utilTruth.h @@ -1471,6 +1471,24 @@ static inline void Abc_TtPrintBinary( word * pTruth, int nVars ) printf( "%d", Abc_InfoHasBit( (unsigned *)pThis, k ) ); printf( "\n" ); } +static inline void Abc_TtPrintBinary1( FILE * pFile, word * pTruth, int nVars ) +{ + word * pThis, * pLimit = pTruth + Abc_TtWordNum(nVars); + int k, Limit = Abc_MinInt( 64, (1 << nVars) ); + assert( nVars >= 2 ); + for ( pThis = pTruth; pThis < pLimit; pThis++ ) + for ( k = 0; k < Limit; k++ ) + fprintf( pFile, "%d", Abc_InfoHasBit( (unsigned *)pThis, k ) ); +} +static inline void Abc_TtPrintBinary2( FILE * pFile, word * pTruth, int nVars ) +{ + word * pThis; + int k, Limit = Abc_MinInt( 64, (1 << nVars) ); + assert( nVars >= 2 ); + for ( pThis = pTruth + Abc_TtWordNum(nVars) - 1; pThis >= pTruth; pThis-- ) + for ( k = Limit-1; k >= 0; k-- ) + fprintf( pFile, "%d", Abc_InfoHasBit( (unsigned *)pThis, k ) ); +} /**Function************************************************************* -- cgit v1.2.3