summaryrefslogtreecommitdiffstats
path: root/src/aig/dar
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-08-01 13:47:51 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-08-01 13:47:51 +0700
commit961f7532d703060ef2e053df1f1b7a672e7dae30 (patch)
tree4acbe7857d51c5d80d3f2c7315ef5b80450c9723 /src/aig/dar
parent820a147ef1e8ff307c3d4e675001372e8f636404 (diff)
downloadabc-961f7532d703060ef2e053df1f1b7a672e7dae30.tar.gz
abc-961f7532d703060ef2e053df1f1b7a672e7dae30.tar.bz2
abc-961f7532d703060ef2e053df1f1b7a672e7dae30.zip
Changing the ordering of arguments in two iterators.
Diffstat (limited to 'src/aig/dar')
-rw-r--r--src/aig/dar/darCore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/aig/dar/darCore.c b/src/aig/dar/darCore.c
index a80277d5..6ca3082d 100644
--- a/src/aig/dar/darCore.c
+++ b/src/aig/dar/darCore.c
@@ -27,6 +27,12 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
+// iterator over the nodes in the topological order
+#define Aig_ManForEachNodeInOrder( p, pObj ) \
+ for ( assert(p->pOrderData), p->iPrev = 0, p->iNext = p->pOrderData[1]; \
+ p->iNext && (((pObj) = Aig_ManObj(p, p->iNext)), 1); \
+ p->iNext = p->pOrderData[2*p->iPrev+1] )
+
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////