internal override void CopyTo(ParallelPostingsArray toArray, int numToCopy) { Debug.Assert(toArray is FreqProxPostingsArray); FreqProxPostingsArray to = (FreqProxPostingsArray)toArray; base.CopyTo(toArray, numToCopy); Array.Copy(lastDocIDs, 0, to.lastDocIDs, 0, numToCopy); Array.Copy(lastDocCodes, 0, to.lastDocCodes, 0, numToCopy); if (lastPositions != null) { Debug.Assert(to.lastPositions != null); Array.Copy(lastPositions, 0, to.lastPositions, 0, numToCopy); } if (lastOffsets != null) { Debug.Assert(to.lastOffsets != null); Array.Copy(lastOffsets, 0, to.lastOffsets, 0, numToCopy); } if (termFreqs != null) { Debug.Assert(to.termFreqs != null); Array.Copy(termFreqs, 0, to.termFreqs, 0, numToCopy); } }
internal ParallelPostingsArray Grow() { int newSize = ArrayUtil.Oversize(size + 1, BytesPerPosting()); ParallelPostingsArray newArray = NewInstance(newSize); CopyTo(newArray, size); return(newArray); }
public override int[] Grow() { ParallelPostingsArray postingsArray = perField.postingsArray; int oldSize = perField.postingsArray.size; postingsArray = perField.postingsArray = postingsArray.Grow(); bytesUsed.AddAndGet((postingsArray.BytesPerPosting() * (postingsArray.size - oldSize))); return(postingsArray.textStarts); }
internal override void CopyTo(ParallelPostingsArray toArray, int numToCopy) { Debug.Assert(toArray is TermVectorsPostingsArray); TermVectorsPostingsArray to = (TermVectorsPostingsArray)toArray; base.CopyTo(toArray, numToCopy); Array.Copy(freqs, 0, to.freqs, 0, size); Array.Copy(lastOffsets, 0, to.lastOffsets, 0, size); Array.Copy(lastPositions, 0, to.lastPositions, 0, size); }
internal virtual void CopyTo(ParallelPostingsArray toArray, int numToCopy) { Array.Copy(textStarts, 0, toArray.textStarts, 0, numToCopy); Array.Copy(intStarts, 0, toArray.intStarts, 0, numToCopy); Array.Copy(byteStarts, 0, toArray.byteStarts, 0, numToCopy); }