Exemplo n.º 1
0
            internal void Reset(int len)
            {
                int bitsPerOffset    = PackedInts.BitsRequired(len - LAST_LITERALS);
                int bitsPerOffsetLog = 32 - Number.NumberOfLeadingZeros(bitsPerOffset - 1);

                HashLog = MEMORY_USAGE + 3 - bitsPerOffsetLog;
                if (hashTable == null || hashTable.Size() < 1 << HashLog || hashTable.BitsPerValue < bitsPerOffset)
                {
                    hashTable = PackedInts.GetMutable(1 << HashLog, bitsPerOffset, PackedInts.DEFAULT);
                }
                else
                {
                    hashTable.Clear();
                }
            }
Exemplo n.º 2
0
 public override void Clear()
 {
     Current.Clear();
 }