diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-05 18:27:03 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-05 18:27:03 -0800 |
commit | df8b63616939c0f978530f8790aab8088f3680f8 (patch) | |
tree | d5c7f63fee4282caa8cf521f6e5ceee7e43e97f6 /src/map/if/ifDec16.c | |
parent | 72404d1fdf699c75a4f98101cd695dd3622afe69 (diff) | |
download | abc-df8b63616939c0f978530f8790aab8088f3680f8.tar.gz abc-df8b63616939c0f978530f8790aab8088f3680f8.tar.bz2 abc-df8b63616939c0f978530f8790aab8088f3680f8.zip |
Fixed performance bug in matching code.
Diffstat (limited to 'src/map/if/ifDec16.c')
-rw-r--r-- | src/map/if/ifDec16.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c index 415f4a03..e2599d7d 100644 --- a/src/map/if/ifDec16.c +++ b/src/map/if/ifDec16.c @@ -781,17 +781,32 @@ void If_CluSwapVars( word * pTruth, int nVars, int * V2P, int * P2V, int iVar, i } else { +/* iStep = If_CluWordNum(iVar + 1)/2; jStep = If_CluWordNum(jVar + 1)/2; - for ( w = 0; w < nWords; w += 2*jStep ) + for (w = 0; w < nWords; w += 2*jStep) { - for ( i = 0; i < jStep; i += 2*iStep ) + for (i = 0; i < jStep; i += 2*iStep) { temp = pTruth[w + iStep + i]; pTruth[w + iStep + i] = pTruth[w + jStep + i]; pTruth[w + jStep + i] = temp; } - + } +*/ + iStep = If_CluWordNum(iVar + 1)/2; + jStep = If_CluWordNum(jVar + 1)/2; + for (w = 0; w < nWords; w += 2*jStep) + { + for (i = 0; i < jStep; i += 2*iStep) + { + for (j = 0; j < iStep; j++) + { + temp = pTruth[w + iStep + i + j]; + pTruth[w + iStep + i + j] = pTruth[w + jStep + i + j]; + pTruth[w + jStep + i + j] = temp; + } + } } } if ( V2P && P2V ) |