// functions /// \brief Size the wire usage according to the number of device tiles. void autosize(void) { // release any existing bitsets for(TileCount i; i < mBitsets.getSize(); i++) { if(mBitsets[i] != 0) { delete mBitsets[i]; mBitsets[i] = 0; } mTileDirty.reset(i); } // resize for the new dimensions TileCount tileCount = mTiles.getTileCount(); mBitsets.setSize(tileCount); for(TileCount i; i < tileCount; i++) mBitsets[i] = 0; mTileDirty.resize(tileCount); }
/// \brief Marks all arcs as being unused, without releasing the bitset objects. /// \details This capability allows the tracer to track the wires that it has visited while /// processing a particular net, and then to start again from scratch without incurring /// allocation and construction overheads. void clear(void) { // iterate over all of the tiles size_t tileCount = mBitsets.getSize(); for(TileIndex i; i < tileCount; i++) { // skip this tile if it isn't dirty if(!mTileDirty[i]) continue; // mark the tile clean mTileDirty.reset(i); // look up the bitset for this tile dynamic_bitset* bitset = mBitsets[i]; // skip tiles without an associated bitset (should never happen for dirty tiles) if(bitset == 0) continue; // clear the entire bitset bitset->reset(); } }