Ignore:
Timestamp:
Aug 2, 2015, 8:12:17 AM (4 years ago)
Author:
cameron
Message:

Carry manager with bit packing now passes make check; cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/carry_manager.cpp

    r4712 r4713  
    145145        cd->summary.frameOffset = 0;
    146146    }
     147#ifndef NDEBUG
     148    if (cd->ifDepth == 0) cd->dumpCarryData(cerr);
     149#endif
    147150    return cd->scopeCarryDataSize;
    148151}
     
    648651}
    649652
    650 /* Store all the full carry packs generated locally in this scope. */
     653/* Store all the full carry packs generated locally in this scope or the
     654   single full pack for this scope*/
    651655void CarryManager::ensureCarriesStoredLocal() {
    652656#ifdef PACKING
    653     if ((mCurrentFrameIndex % PACK_SIZE) == 0) {
     657    const unsigned scopeCarryPacks = mCarryInfo->getScopeCarryPackCount();
     658    if ((scopeCarryPacks > 0) && ((mCurrentFrameIndex % PACK_SIZE) == 0)) {
     659        // We have carry data and we are not in the middle of a pack.
    654660        // Write out all local packs.
    655661        auto localCarryIndex = localBasePack();
     
    658664            storeCarryPack(i);
    659665        }
     666        if ((localCarryPacks == 0) && (scopeCarryPacks == 1) && (mCarryInfo->nested.entries > 1)) {
     667            storeCarryPack(localCarryIndex);
     668        }
    660669    }
    661670#endif
Note: See TracChangeset for help on using the changeset viewer.