Esempio n. 1
0
        public SozuTable Create()
        {
            SozuTable subTable = null;

            for (var i = _sozuFactoryConfig.Length - 1; i >= 0; --i)
            {
                var config   = _sozuFactoryConfig[i];
                var newTable = new SozuTable(
                    new SozuConfig(i == 0, config.SectorBitDepth, _start, _end),
                    _lineage,
                    CreateSectorStore(config.TypeOfStore, string.Format(_path, i), config.SectorSizeInBytes),
                    subTable);
                subTable = newTable;
            }

            return(subTable);
        }
Esempio n. 2
0
        /// <param name="config"></param>
        /// <param name="lineage"></param>
        /// <param name="store"></param>
        /// <param name="subTable"></param>
        public SozuTable(SozuConfig config, ILineage lineage, ISectorStore store, SozuTable subTable = null)
        {
            _config   = config;
            _lineage  = lineage;
            _store    = store;
            _subTable = subTable;

            _residue      = TxoPack.Create();
            _rangeOutputs = TxoPack.Create();
            _deserialized = TxoPack.Create();
            _complement   = TxoPack.Create();
            _kept         = TxoPack.Create();
            _flowDown     = TxoPack.Create();
            _merged       = TxoPack.Create(2);
            store.Initialize();
            if (config.ImplicitSectors && !store.HasSectors())
            {
                store.AllocateSectors(1 << config.SectorBitDepth);
                EnsurePersistence();
            }
        }