diff --git a/Directory.Build.props b/Directory.Build.props index 6e4d7ab265..6fc005a90b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,13 +20,13 @@ --> - $(MSBuildThisFileDirectory) - + - 9.0 + 11.0 apache lucenenet @@ -35,8 +35,8 @@ 4.8.0 @@ -85,10 +85,10 @@ true - diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs index c44dbea3fc..6eb8a38eca 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs @@ -1,8 +1,6 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Util; -using System.Diagnostics; using System.IO; namespace Lucene.Net.Analysis.CharFilters @@ -62,7 +60,7 @@ protected override int Correct(int currentOff) while (hi >= lo) { - mid = (lo + hi).TripleShift(1); + mid = (lo + hi) >>> 1; if (currentOff < offsets[mid]) { hi = mid - 1; diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/HyphenationTree.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/HyphenationTree.cs index e1340e9c4f..4db6c3761c 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/HyphenationTree.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/HyphenationTree.cs @@ -1,7 +1,5 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Support; -using System; using System.Collections.Generic; using System.IO; using System.Text; @@ -17,9 +15,9 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +29,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// This tree structure stores the hyphenation patterns in an efficient way for /// fast lookup. It provides the provides the method to hyphenate a word. /// - /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. + /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. /// /// Lucene.NET specific note: /// If you are going to extend this class by inheriting from it, you should be aware that the @@ -109,7 +107,7 @@ protected virtual string UnpackValues(int k) byte v = m_vspace[k++]; while (v != 0) { - char c = (char)(v.TripleShift(4) - 1 + '0'); + char c = (char)((v >>> 4) - 1 + '0'); buf.Append(c); c = (char)(v & 0x0f); if (c == 0) @@ -253,7 +251,7 @@ protected virtual byte[] GetValues(int k) byte v = m_vspace[k++]; while (v != 0) { - char c = (char)(v.TripleShift(4) - 1); + char c = (char)((v >>> 4) - 1); buf.Append(c); c = (char)(v & 0x0f); if (c == 0) @@ -278,7 +276,7 @@ protected virtual byte[] GetValues(int k) /// interletter values. In other words, it does something like: /// /// - /// for (i=0; i<patterns.Length; i++) + /// for (i=0; i<patterns.Length; i++) /// { /// if (word.Substring(index).StartsWith(patterns[i], StringComparison.Ordinal)) /// update_interletter_values(patterns[i]); @@ -596,4 +594,4 @@ public virtual void AddPattern(string pattern, string ivalue) // } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs index 2665f69409..c77fd262cb 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs @@ -1,6 +1,5 @@ // Lucene version compatibility level 4.10.4 using J2N; -using J2N.Numerics; using J2N.Text; using Lucene.Net.Diagnostics; using Lucene.Net.Store; @@ -1128,7 +1127,7 @@ internal static char[] DecodeFlags(BytesRef b) { return CharsRef.EMPTY_CHARS; } - int len = b.Length.TripleShift(1); + int len = b.Length >>> 1; char[] flags = new char[len]; int upto = 0; int end = b.Offset + b.Length; diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs index 5869a322f4..475698c760 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.10.4 -using J2N.Numerics; using J2N.Text; using Lucene.Net.Analysis.Util; using Lucene.Net.Diagnostics; @@ -398,7 +397,7 @@ private IList Stem(char[] word, int length, int previous, int prevFlag char stripOrd = (char)(affixReader.ReadInt16() & 0xffff); int condition = (char)(affixReader.ReadInt16() & 0xffff); bool crossProduct = (condition & 1) == 1; - condition = condition.TripleShift(1); + condition >>>= 1; char append = (char)(affixReader.ReadInt16() & 0xffff); bool compatible; @@ -503,7 +502,7 @@ private IList Stem(char[] word, int length, int previous, int prevFlag char stripOrd = (char)(affixReader.ReadInt16() & 0xffff); int condition = (char)(affixReader.ReadInt16() & 0xffff); bool crossProduct = (condition & 1) == 1; - condition = condition.TripleShift(1); + condition >>>= 1; char append = (char)(affixReader.ReadInt16() & 0xffff); bool compatible; @@ -618,7 +617,7 @@ internal IList ApplyAffix(char[] strippedWord, int length, int affix, affixReader.SkipBytes(2); // strip int condition = (char)(affixReader.ReadInt16() & 0xffff); bool crossProduct = (condition & 1) == 1; - condition = condition.TripleShift(1); + condition >>>= 1; char append = (char)(affixReader.ReadInt16() & 0xffff); JCG.List stems = new JCG.List(); @@ -689,7 +688,7 @@ internal IList ApplyAffix(char[] strippedWord, int length, int affix, if (prefix) { // we took away the first prefix. - // COMPLEXPREFIXES = true: combine with a second prefix and another suffix + // COMPLEXPREFIXES = true: combine with a second prefix and another suffix // COMPLEXPREFIXES = false: combine with a suffix stems.AddRange(Stem(strippedWord, length, affix, flag, flag, ++recursionDepth, dictionary.complexPrefixes && dictionary.twoStageAffix, true, true, circumfix, caseVariant)); } @@ -731,4 +730,4 @@ private static bool HasCrossCheckedFlag(char flag, char[] flags, bool matchEmpty return (flags.Length == 0 && matchEmpty) || Array.BinarySearch(flags, flag) >= 0; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs index 134508f5e6..07a3a28026 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs @@ -1,6 +1,5 @@ // Lucene version compatibility level 4.8.1 using J2N; -using J2N.Numerics; using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Diagnostics; using Lucene.Net.Store; @@ -34,29 +33,29 @@ namespace Lucene.Net.Analysis.Synonym /// This token stream cannot properly handle position /// increments != 1, ie, you should place this filter before /// filtering out stop words. - /// + /// /// Note that with the current implementation, parsing is /// greedy, so whenever multiple parses would apply, the rule /// starting the earliest and parsing the most tokens wins. /// For example if you have these rules: - /// + /// /// /// a -> x /// a b -> y /// b c d -> z /// - /// + /// /// Then input a b c d e parses to y b c /// d, ie the 2nd rule "wins" because it started /// earliest and matched the most input tokens of other rules /// starting at that point. - /// + /// /// A future improvement to this filter could allow /// non-greedy parsing, such that the 3rd rule would win, and /// also separately allow multiple parses, such that all 3 /// rules would match, perhaps even on a rule by rule /// basis. - /// + /// /// NOTE: when a match occurs, the output tokens /// associated with the matching rule are "stacked" on top of /// the input stream (if the rule had @@ -69,7 +68,7 @@ namespace Lucene.Net.Analysis.Synonym /// do so. This limitation is necessary because Lucene's /// (and index) cannot yet represent an arbitrary /// graph. - /// + /// /// NOTE: If multiple incoming tokens arrive on the /// same position, only the first token at that position is /// used for parsing. Subsequent tokens simply pass through @@ -260,7 +259,7 @@ public virtual void Add(char[] output, int offset, int len, int endOffset, int p /// in using . /// Note, if you set this to true, its your responsibility to lowercase /// the input entries when you create the . - public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase) + public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase) : base(input) { termAtt = AddAttribute(); @@ -496,7 +495,7 @@ private void AddOutput(BytesRef bytes, int matchInputLength, int matchEndOffset) int code = bytesReader.ReadVInt32(); bool keepOrig = (code & 0x1) == 0; - int count = code.TripleShift(1); + int count = code >>> 1; //System.out.println(" addOutput count=" + count + " keepOrig=" + keepOrig); for (int outputIDX = 0; outputIDX < count; outputIDX++) { @@ -716,4 +715,4 @@ public override void Reset() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs index 965a6da59e..13c530afd6 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs @@ -1,6 +1,5 @@ using J2N; using J2N.IO; -using J2N.Numerics; using Lucene.Net.Codecs; using Lucene.Net.Store; using Lucene.Net.Support; @@ -116,7 +115,7 @@ protected BinaryDictionary() targetMapOffsets[sourceId] = ofs; sourceId++; } - accum += val.TripleShift(1); + accum += val >>> 1; targetMap[ofs] = accum; } if (sourceId + 1 != targetMapOffsets.Length) @@ -218,12 +217,12 @@ public virtual void LookupWordIds(int sourceId, Int32sRef @ref) public virtual int GetLeftId(int wordId) { - return buffer.GetInt16(wordId).TripleShift(3); + return buffer.GetInt16(wordId) >>> 3; } public virtual int GetRightId(int wordId) { - return buffer.GetInt16(wordId).TripleShift(3); + return buffer.GetInt16(wordId) >>> 3; } public virtual int GetWordCost(int wordId) @@ -237,7 +236,7 @@ public virtual string GetBaseForm(int wordId, char[] surfaceForm, int off, int l { int offset = BaseFormOffset(wordId); int data = buffer.Get(offset++) & 0xff; - int prefix = data.TripleShift(4); + int prefix = data >>> 4; int suffix = data & 0xF; char[] text = new char[prefix + suffix]; Arrays.Copy(surfaceForm, off, text, 0, prefix); @@ -259,7 +258,7 @@ public virtual string GetReading(int wordId, char[] surface, int off, int len) { int offset = ReadingOffset(wordId); int readingData = buffer.Get(offset++) & 0xff; - return ReadString(offset, readingData.TripleShift(1), (readingData & 1) == 1); + return ReadString(offset, readingData >>> 1, (readingData & 1) == 1); } else { @@ -292,7 +291,7 @@ public virtual string GetPronunciation(int wordId, char[] surface, int off, int { int offset = PronunciationOffset(wordId); int pronunciationData = buffer.Get(offset++) & 0xff; - return ReadString(offset, pronunciationData.TripleShift(1), (pronunciationData & 1) == 1); + return ReadString(offset, pronunciationData >>> 1, (pronunciationData & 1) == 1); } else { @@ -342,7 +341,7 @@ private int PronunciationOffset(int wordId) } else { - readingLength = readingData.TripleShift(1); + readingLength = readingData >>> 1; } return offset + readingLength; } diff --git a/src/Lucene.Net.Analysis.Kuromoji/Dict/ConnectionCosts.cs b/src/Lucene.Net.Analysis.Kuromoji/Dict/ConnectionCosts.cs index d16c320681..9065f1228a 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Dict/ConnectionCosts.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Dict/ConnectionCosts.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Codecs; +using Lucene.Net.Codecs; using Lucene.Net.Store; using Lucene.Net.Support; using System; @@ -53,7 +52,7 @@ private ConnectionCosts() for (int i = 0; i < a.Length; i++) { int raw = @in.ReadVInt32(); - accum += raw.TripleShift(1) ^ -(raw & 1); + accum += (raw >>> 1) ^ -(raw & 1); a[i] = (short)accum; } } diff --git a/src/Lucene.Net.Analysis.SmartCn/Hhmm/PathNode.cs b/src/Lucene.Net.Analysis.SmartCn/Hhmm/PathNode.cs index 42ad7e382e..35d7aa1996 100644 --- a/src/Lucene.Net.Analysis.SmartCn/Hhmm/PathNode.cs +++ b/src/Lucene.Net.Analysis.SmartCn/Hhmm/PathNode.cs @@ -1,5 +1,4 @@ // lucene version compatibility level: 4.8.1 -using J2N.Numerics; using System; namespace Lucene.Net.Analysis.Cn.Smart.Hhmm @@ -54,7 +53,7 @@ public override int GetHashCode() result = prime * result + PreNode; long temp; temp = J2N.BitConversion.DoubleToInt64Bits(Weight); - result = prime * result + (int)(temp ^ temp.TripleShift(32)); + result = prime * result + (int)(temp ^ (temp >>> 32)); return result; } diff --git a/src/Lucene.Net.Analysis.SmartCn/Hhmm/SegTokenPair.cs b/src/Lucene.Net.Analysis.SmartCn/Hhmm/SegTokenPair.cs index 1e571589cb..4365b7e9c5 100644 --- a/src/Lucene.Net.Analysis.SmartCn/Hhmm/SegTokenPair.cs +++ b/src/Lucene.Net.Analysis.SmartCn/Hhmm/SegTokenPair.cs @@ -1,5 +1,4 @@ // lucene version compatibility level: 4.8.1 -using J2N.Numerics; using Lucene.Net.Support; namespace Lucene.Net.Analysis.Cn.Smart.Hhmm @@ -66,7 +65,7 @@ public override int GetHashCode() result = prime * result + To; long temp; temp = J2N.BitConversion.DoubleToInt64Bits(Weight); - result = prime * result + (int)(temp ^ temp.TripleShift(32)); + result = prime * result + (int)(temp ^ (temp >>> 32)); return result; } diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs index 6d8c962897..337a056342 100644 --- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs +++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs @@ -1,12 +1,10 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util; using Lucene.Net.Util.Packed; using System.Collections.Generic; -using System.Diagnostics; namespace Lucene.Net.Codecs.BlockTerms { @@ -196,7 +194,7 @@ public override long Seek(BytesRef target) while (hi >= lo) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; long offset2 = fieldIndex.termOffsets.Get(mid); int length2 = (int)(fieldIndex.termOffsets.Get(1 + mid) - offset2); @@ -494,4 +492,4 @@ public override long RamBytesUsed() return sizeInBytes; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs index e8d88adc57..3bd71f8eb8 100644 --- a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs +++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs @@ -1,8 +1,6 @@ -using J2N.Numerics; -using Lucene.Net.Codecs.Sep; +using Lucene.Net.Codecs.Sep; using Lucene.Net.Diagnostics; using Lucene.Net.Store; -using System.Diagnostics; namespace Lucene.Net.Codecs.IntBlock { @@ -165,12 +163,12 @@ public override void Read(DataInput indexIn, bool absolute) if ((uptoDelta & 1) == 1) { // same block - upto += uptoDelta.TripleShift(1); + upto += uptoDelta >>> 1; } else { // new block - upto = uptoDelta.TripleShift(1); + upto = uptoDelta >>> 1; fp += indexIn.ReadVInt64(); } } @@ -203,4 +201,4 @@ public override string ToString() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs index 495169751d..8484d3d7e9 100644 --- a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs +++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Codecs.Sep; +using Lucene.Net.Codecs.Sep; using Lucene.Net.Diagnostics; using Lucene.Net.Store; using Lucene.Net.Support; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace Lucene.Net.Codecs.IntBlock @@ -41,7 +39,7 @@ namespace Lucene.Net.Codecs.IntBlock /// /// Naive int block API that writes vInts. This is /// expected to give poor performance; it's really only for - /// testing the pluggability. One should typically use pfor instead. + /// testing the pluggability. One should typically use pfor instead. /// public abstract class VariableInt32BlockIndexInput : Int32IndexInput { @@ -194,12 +192,12 @@ public override void Read(DataInput indexIn, bool absolute) if ((uptoDelta & 1) == 1) { // same block - upto += uptoDelta.TripleShift(1); + upto += uptoDelta >>> 1; } else { // new block - upto = uptoDelta.TripleShift(1); + upto = uptoDelta >>> 1; fp += indexIn.ReadVInt64(); } } @@ -234,4 +232,4 @@ public override object Clone() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs index dcf9503430..c3f19ac735 100644 --- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs +++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs @@ -1,10 +1,8 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Support; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using JCG = J2N.Collections.Generic; @@ -904,7 +902,7 @@ private int FindTerm(BytesRef term) while (low <= high) { - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; int cmp = outerInstance.Compare(mid, term); if (cmp < 0) { @@ -1480,7 +1478,7 @@ public override bool MoveNext() skipUpto = 0; goto nextTermContinue; } - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; int cmp = (outerInstance.termBytes[outerInstance.termOffsets[mid] + stateUpto] & 0xFF) - targetLabel; // if (DEBUG) { @@ -2334,7 +2332,7 @@ public override int Advance(int target) break; } - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; int cmp = docIDs[mid] - target; //System.out.println(" bsearch low=" + low + " high=" + high+ ": docIDs[" + mid + "]=" + docIDs[mid]); @@ -2540,7 +2538,7 @@ public override int Advance(int target) break; } - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; int cmp = docIDs[mid] - target; //System.out.println(" bsearch low=" + low + " high=" + high+ ": docIDs[" + mid + "]=" + docIDs[mid]); @@ -2612,4 +2610,4 @@ public override long GetCost() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs index 11eec666c8..c163f46f8b 100644 --- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs +++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Support; @@ -368,7 +367,7 @@ internal void RefillStats() int code = statsReader.ReadVInt32(); if (outerInstance.HasFreqs) { - docFreq[i] = code.TripleShift(1); + docFreq[i] = code >>> 1; if ((code & 1) == 1) { totalTermFreq[i] = docFreq[i]; @@ -951,4 +950,4 @@ public override void CheckIntegrity() postingsReader.CheckIntegrity(); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs index 97e80aec36..3bf101a588 100644 --- a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs +++ b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs @@ -1,7 +1,5 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; -using System.Diagnostics; namespace Lucene.Net.Codecs.Memory { @@ -28,7 +26,7 @@ namespace Lucene.Net.Codecs.Memory using IndexOptions = Index.IndexOptions; /// - /// An FST implementation for + /// An FST implementation for /// . /// /// @lucene.experimental @@ -70,8 +68,8 @@ internal TermData(long[] longs, byte[] bytes, int docFreq, long totalTermFreq) this.totalTermFreq = totalTermFreq; } - // NOTE: actually, FST nodes are seldom - // identical when outputs on their arcs + // NOTE: actually, FST nodes are seldom + // identical when outputs on their arcs // aren't NO_OUTPUTs. public override int GetHashCode() { @@ -101,10 +99,10 @@ public override bool Equals(object other) { if (other == this) return true; - + if (!(other is TermData)) return false; - + var _other = (TermData) other; return StatsEqual(this, _other) && Int64sEqual(this, _other) && BytesEqual(this, _other); } @@ -117,7 +115,7 @@ protected internal FSTTermOutputs(FieldInfo fieldInfo, int longsSize) } /// - /// The return value will be the smaller one, when these two are + /// The return value will be the smaller one, when these two are /// 'comparable', i.e. /// /// every value in t1 is not larger than in t2, or @@ -128,7 +126,7 @@ public override TermData Common(TermData t1, TermData t2) { if (Equals(t1, NO_OUTPUT) || Equals(t2, NO_OUTPUT)) return NO_OUTPUT; - + if (Debugging.AssertsEnabled) Debugging.Assert(t1.longs.Length == t2.longs.Length); long[] min = t1.longs, max = t2.longs; @@ -183,7 +181,7 @@ public override TermData Subtract(TermData t1, TermData t2) { if (Equals(t2, NO_OUTPUT)) return t1; - + if (Debugging.AssertsEnabled) Debugging.Assert(t1.longs.Length == t2.longs.Length); int pos = 0; @@ -211,16 +209,16 @@ public override TermData Subtract(TermData t1, TermData t2) } // TODO: if we refactor a 'addSelf(TermData other)', - // we can gain about 5~7% for fuzzy queries, however this also + // we can gain about 5~7% for fuzzy queries, however this also // means we are putting too much stress on FST Outputs decoding? public override TermData Add(TermData t1, TermData t2) { if (Equals(t1, NO_OUTPUT)) return t2; - + if (Equals(t2, NO_OUTPUT)) return t1; - + if (Debugging.AssertsEnabled) Debugging.Assert(t1.longs.Length == t2.longs.Length); var pos = 0; @@ -310,7 +308,7 @@ public override TermData Read(DataInput input) int bit0 = bits & 1; int bit1 = bits & 2; int bit2 = bits & 4; - var bytesSize = bits.TripleShift(3); + var bytesSize = bits >>> 3; if (bit1 > 0 && bytesSize == 0) // determine extra length { bytesSize = input.ReadVInt32(); @@ -332,7 +330,7 @@ public override TermData Read(DataInput input) int code = input.ReadVInt32(); if (_hasPos) { - totalTermFreq = docFreq = code.TripleShift(1); + totalTermFreq = docFreq = code >>> 1; if ((code & 1) == 0) { totalTermFreq += input.ReadVInt64(); @@ -389,4 +387,4 @@ private static bool AllZero(long[] l) return true; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs index 3688527ce1..38d9c544c6 100644 --- a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs +++ b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs @@ -1,11 +1,9 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Support; using Lucene.Net.Util.Fst; using System; using System.Collections.Generic; -using System.Diagnostics; using JCG = J2N.Collections.Generic; namespace Lucene.Net.Codecs.Memory @@ -63,13 +61,13 @@ namespace Lucene.Net.Codecs.Memory /// /// Stores terms & postings (docs, positions, payloads) in /// RAM, using an FST. - /// + /// /// Note that this codec implements advance as a linear /// scan! This means if you store large fields in here, /// queries that rely on advance will (AND BooleanQuery, /// PhraseQuery) will be relatively slow! /// - /// @lucene.experimental + /// @lucene.experimental /// // TODO: Maybe name this 'Cached' or something to reflect @@ -81,7 +79,7 @@ public sealed class MemoryPostingsFormat : PostingsFormat private readonly bool doPackFST; private readonly float acceptableOverheadRatio; - public MemoryPostingsFormat() + public MemoryPostingsFormat() : this(false, PackedInt32s.DEFAULT) { } @@ -92,7 +90,7 @@ public MemoryPostingsFormat() /// NOTE: packed FSTs are limited to ~2.1 GB of postings. /// Allowable overhead for packed s /// during FST construction. - public MemoryPostingsFormat(bool doPackFST, float acceptableOverheadRatio) + public MemoryPostingsFormat(bool doPackFST, float acceptableOverheadRatio) : base() { this.doPackFST = doPackFST; @@ -440,7 +438,7 @@ public override int NextDoc() else { int code = @in.ReadVInt32(); - accum += code.TripleShift(1); + accum += code >>> 1; //System.out.println(" docID=" + accum + " code=" + code); if ((code & 1) != 0) { @@ -601,7 +599,7 @@ public override int NextDoc() docUpto++; int code = @in.ReadVInt32(); - accum += code.TripleShift(1); + accum += code >>> 1; if ((code & 1) != 0) { freq = 1; @@ -667,7 +665,7 @@ public override int NextPosition() else { int code = @in.ReadVInt32(); - pos += code.TripleShift(1); + pos += code >>> 1; if ((code & 1) != 0) { payloadLength = @in.ReadVInt32(); @@ -685,7 +683,7 @@ public override int NextPosition() // new offset length offsetLength = @in.ReadVInt32(); } - startOffset += offsetCode.TripleShift(1); + startOffset += offsetCode >>> 1; } if (storePayloads) @@ -1030,4 +1028,4 @@ public override void CheckIntegrity() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs index 3fd236ae0b..775e06b501 100644 --- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs +++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs @@ -1,13 +1,10 @@ -using J2N.Numerics; -using J2N.Runtime.CompilerServices; +using J2N.Runtime.CompilerServices; using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util; -using System; using System.Collections.Generic; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using JCG = J2N.Collections.Generic; @@ -182,7 +179,7 @@ public override void DecodeTerm(long[] empty, DataInput input, FieldInfo fieldIn long count = IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 ? termState2.TotalTermFreq : termState2.DocFreq; - + if (count <= _maxPositions) { // Inlined into terms dict -- just read the byte[] blob in, @@ -249,10 +246,10 @@ public override DocsEnum Docs(FieldInfo field, BlockTermState termState, IBits l postings = new PulsingDocsEnum(field); } } - + if (reuse != postings) SetOther(postings, reuse); // postings.other = reuse - + return postings.Reset(liveDocs, termState2); } @@ -297,7 +294,7 @@ public override DocsAndPositionsEnum DocsAndPositions(FieldInfo field, BlockTerm } if (reuse != postings) { - SetOther(postings, reuse); // postings.other = reuse + SetOther(postings, reuse); // postings.other = reuse } return postings.Reset(liveDocs, termState2); } @@ -381,7 +378,7 @@ public override int NextDoc() } else { - _accum += code.TripleShift(1); // shift off low bit + _accum += code >>> 1; // shift off low bit _freq = (code & 1) != 0 ? 1 : _postings.ReadVInt32(); // LUCENENET specific - to avoid boxing, changed from CompareTo() to IndexOptionsComparer.Compare() @@ -520,7 +517,7 @@ public override int NextDoc() } var code = _postings.ReadVInt32(); - _accum += code.TripleShift(1); // shift off low bit + _accum += code >>> 1; // shift off low bit _freq = (code & 1) != 0 ? 1 : _postings.ReadVInt32(); _posPending = _freq; _startOffset = _storeOffsets ? 0 : -1; // always return -1 if no offsets are stored @@ -558,7 +555,7 @@ public override int NextPosition() { _payloadLength = _postings.ReadVInt32(); } - _position += code.TripleShift(1); + _position += code >>> 1; _payloadRetrieved = false; } else @@ -574,7 +571,7 @@ public override int NextPosition() // new offset length _offsetLength = _postings.ReadVInt32(); } - _startOffset += offsetCode.TripleShift(1); + _startOffset += offsetCode >>> 1; } return _position; @@ -669,7 +666,7 @@ private DocsEnum SetOther(DocsEnum de, DocsEnum other) /// so that pulsing enums can keep a reference to their wrapped enums, /// and vice versa. this way we can always reuse. /// - /// @lucene.internal + /// @lucene.internal /// public interface IPulsingEnumAttribute : IAttribute { @@ -688,7 +685,7 @@ public sealed class PulsingEnumAttribute : Util.Attribute, IPulsingEnumAttribute // this could cause problems? // TODO: we should consider nuking this map and just making it so if you do this, // you don't reuse? and maybe pulsingPostingsReader should throw an exc if it wraps - // another pulsing, because this is just stupid and wasteful. + // another pulsing, because this is just stupid and wasteful. // we still have to be careful in case someone does Pulsing(Stomping(Pulsing(... private readonly IDictionary _enums = new JCG.Dictionary(IdentityEqualityComparer.Default); @@ -716,6 +713,6 @@ public override long RamBytesUsed() public override void CheckIntegrity() { _wrappedPostingsReader.CheckIntegrity(); - } + } } } diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs index cfdc63dbce..7eb51368b6 100644 --- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs +++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Util; -using System.Diagnostics; namespace Lucene.Net.Codecs.Sep { @@ -30,7 +28,7 @@ namespace Lucene.Net.Codecs.Sep /// /// Concrete class that reads the current doc/freq/skip - /// postings format. + /// postings format. /// /// @lucene.experimental /// @@ -692,7 +690,7 @@ public override int NextPosition() payloadLength = posReader.Next(); if (Debugging.AssertsEnabled) Debugging.Assert(payloadLength >= 0); } - position += code.TripleShift(1); + position += code >>> 1; pendingPayloadBytes += payloadLength; payloadPending = payloadLength > 0; } @@ -763,4 +761,4 @@ public override void CheckIntegrity() // TODO: remove sep layout, its fallen behind on features... } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs index 2c9bedf871..6134e8700f 100644 --- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs +++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Support; -using System.Diagnostics; using System.IO; namespace Lucene.Net.Codecs.Sep @@ -142,8 +140,8 @@ internal void Init(long skipPointer, internal long PayloadPointer => lastPayloadPointer; /// - /// Returns the payload length of the payload stored just before - /// the doc to which the last call of + /// Returns the payload length of the payload stored just before + /// the doc to which the last call of /// has skipped. /// internal int PayloadLength => lastPayloadLength; @@ -209,8 +207,7 @@ protected override int ReadSkipData(int level, IndexInput skipStream) { payloadLength[level] = skipStream.ReadVInt32(); } - //delta >>>= 1; - delta = delta.TripleShift(1); + delta >>>= 1; } else { @@ -233,4 +230,4 @@ protected override int ReadSkipData(int level, IndexInput skipStream) return delta; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Facet/RandomSamplingFacetsCollector.cs b/src/Lucene.Net.Facet/RandomSamplingFacetsCollector.cs index dd0e9cfc5e..ea037cbf2b 100644 --- a/src/Lucene.Net.Facet/RandomSamplingFacetsCollector.cs +++ b/src/Lucene.Net.Facet/RandomSamplingFacetsCollector.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Support; using System; using System.Collections.Generic; @@ -73,7 +72,7 @@ public XORShift64Random(long seed) public virtual long RandomInt64() { x ^= (x << 21); - x ^= (x.TripleShift(35)); + x ^= (x >>> 35); x ^= (x << 4); return x; } @@ -312,4 +311,4 @@ public virtual FacetResult AmortizeFacetCounts(FacetResult res, FacetsConfig con /// public virtual double SamplingRate => samplingRate; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Facet/Range/LongRangeCounter.cs b/src/Lucene.Net.Facet/Range/LongRangeCounter.cs index c9fcbe6612..ee0a19ebab 100644 --- a/src/Lucene.Net.Facet/Range/LongRangeCounter.cs +++ b/src/Lucene.Net.Facet/Range/LongRangeCounter.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Diagnostics; using System.Collections.Generic; using System.Text; @@ -180,7 +179,7 @@ public void Add(long v) int hi = boundaries.Length - 1; while (true) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; //System.out.println(" cycle lo=" + lo + " hi=" + hi + " mid=" + mid + " boundary=" + boundaries[mid] + " to " + boundaries[mid+1]); if (v <= boundaries[mid]) { @@ -210,7 +209,7 @@ public void Add(long v) /// /// Fills counts corresponding to the original input /// ranges, returning the missing count (how many hits - /// didn't match any ranges). + /// didn't match any ranges). /// public int FillCounts(int[] counts) { @@ -263,7 +262,7 @@ private static Int64RangeNode Split(int start, int end, IList el } else { - int mid = (start + end).TripleShift(1); + int mid = (start + end) >>> 1; Int64RangeNode left = Split(start, mid, elementaryIntervals); Int64RangeNode right = Split(mid, end, elementaryIntervals); return new Int64RangeNode(left.start, right.end, left, right, -1); @@ -386,4 +385,4 @@ internal void ToString(StringBuilder sb, int depth) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs index 2f6ed655bb..fb4272b7cd 100644 --- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs +++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using System; using System.IO; using System.Runtime.Serialization; @@ -36,16 +35,16 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache /// collisions in the exceeds /// GetMaxOrdinal(). Growing also includes reinserting all colliding /// labels into the s to possibly reduce the number of collisions. - /// - /// For setting the see - /// . + /// + /// For setting the see + /// . /// /// /// This data structure has a much lower memory footprint (~30%) compared to a /// Java HashMap<String, Integer>. It also only uses a small fraction of objects /// a HashMap would use, thus limiting the GC overhead. Ingestion speed was also /// ~50% faster compared to a HashMap for 3M unique labels. - /// + /// /// @lucene.experimental /// /// @@ -67,7 +66,7 @@ public class CompactLabelToOrdinal : LabelToOrdinal private float loadFactor; /// - /// How many labels. + /// How many labels. /// public virtual int SizeOfMap => this.collisionMap.Count; @@ -313,8 +312,8 @@ internal static int StringHashCode(FacetLabel label) { int hash = label.GetHashCode(); - hash = hash ^ hash.TripleShift(20) ^ hash.TripleShift(12); - hash = hash ^ hash.TripleShift(7) ^ hash.TripleShift(4); + hash = hash ^ ((hash >>> 20) ^ (hash >>> 12)); + hash = hash ^ (hash >>> 7) ^ (hash >>> 4); return hash; @@ -323,8 +322,8 @@ internal static int StringHashCode(FacetLabel label) internal static int StringHashCode(CharBlockArray labelRepository, int offset) { int hash = CategoryPathUtils.HashCodeOfSerialized(labelRepository, offset); - hash = hash ^ hash.TripleShift(20) ^ hash.TripleShift(12); - hash = hash ^ hash.TripleShift(7) ^ hash.TripleShift(4); + hash = hash ^ ((hash >>> 20) ^ (hash >>> 12)); + hash = hash ^ (hash >>> 7) ^ (hash >>> 4); return hash; } @@ -427,7 +426,7 @@ internal static CompactLabelToOrdinal Open(FileInfo file, float loadFactor, int int offset = 1; int lastStartOffset = offset; // This loop really relies on a well-formed input (assumes pretty blindly - // that array offsets will work). Since the initial file is machine + // that array offsets will work). Since the initial file is machine // generated, I think this should be OK. while (offset < l2o.labelRepository.Length) { @@ -448,8 +447,8 @@ internal static CompactLabelToOrdinal Open(FileInfo file, float loadFactor, int } // Now that we've hashed the components of the label, do the // final part of the hash algorithm. - hash = hash ^ hash.TripleShift(20) ^ hash.TripleShift(12); - hash = hash ^ hash.TripleShift(7) ^ hash.TripleShift(4); + hash = hash ^ ((hash >>> 20) ^ (hash >>> 12)); + hash = hash ^ (hash >>> 7) ^ (hash >>> 4); // Add the label, and let's keep going l2o.AddLabelOffset(hash, cid, lastStartOffset); cid++; @@ -498,4 +497,4 @@ internal HashArray(int c) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Highlighter/Highlight/SimpleSpanFragmenter.cs b/src/Lucene.Net.Highlighter/Highlight/SimpleSpanFragmenter.cs index d93530ffdd..4cf33fe277 100644 --- a/src/Lucene.Net.Highlighter/Highlight/SimpleSpanFragmenter.cs +++ b/src/Lucene.Net.Highlighter/Highlight/SimpleSpanFragmenter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Analysis; +using Lucene.Net.Analysis; using Lucene.Net.Analysis.TokenAttributes; using System.Collections.Generic; @@ -84,7 +83,7 @@ public virtual bool IsNewFragment() } bool isNewFrag = offsetAtt.EndOffset >= (fragmentSize * currentNumFrags) - && (textSize - offsetAtt.EndOffset) >= fragmentSize.TripleShift(1); + && (textSize - offsetAtt.EndOffset) >= fragmentSize >>> 1; if (isNewFrag) @@ -106,4 +105,4 @@ public virtual void Start(string originalText, TokenStream tokenStream) offsetAtt = tokenStream.AddAttribute(); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Highlighter/VectorHighlight/FieldPhraseList.cs b/src/Lucene.Net.Highlighter/VectorHighlight/FieldPhraseList.cs index b3f6865290..f2f8996add 100644 --- a/src/Lucene.Net.Highlighter/VectorHighlight/FieldPhraseList.cs +++ b/src/Lucene.Net.Highlighter/VectorHighlight/FieldPhraseList.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Util; +using Lucene.Net.Util; using System; using System.Collections.Generic; using System.Text; @@ -208,7 +207,7 @@ public FieldPhraseList(FieldPhraseList[] toMerge) /// /// - /// NOTE: When overriding this method, be aware that the constructor of this class calls + /// NOTE: When overriding this method, be aware that the constructor of this class calls /// a private method and not this virtual method. So if you need to override /// the behavior during the initialization, call your own private method from the constructor /// with whatever custom behavior you need. @@ -224,8 +223,8 @@ private void AddIfNoOverlapInternal(WeightedPhraseInfo wpi) { if (existWpi.IsOffsetOverlap(wpi)) { - // WeightedPhraseInfo.addIfNoOverlap() dumps the second part of, for example, hyphenated words (social-economics). - // The result is that all informations in TermInfo are lost and not available for further operations. + // WeightedPhraseInfo.addIfNoOverlap() dumps the second part of, for example, hyphenated words (social-economics). + // The result is that all informations in TermInfo are lost and not available for further operations. existWpi.TermsInfos.AddRange(wpi.TermsInfos); return; } @@ -270,7 +269,7 @@ public virtual string GetText() public virtual float Boost => boost; /// - /// the termInfos + /// the termInfos /// public virtual IList TermsInfos => termsInfos; @@ -437,7 +436,7 @@ public override int GetHashCode() result = prime * result + StartOffset; result = prime * result + EndOffset; long b = J2N.BitConversion.DoubleToInt64Bits(Boost); - result = prime * result + (int)(b ^ b.TripleShift(32)); + result = prime * result + (int)(b ^ (b >>> 32)); return result; } diff --git a/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs b/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs index 00d129fed4..cbeb83b103 100644 --- a/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs +++ b/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Search; using Lucene.Net.Search.Similarities; @@ -236,7 +235,7 @@ internal static int BinarySearch(BytesRef b, BytesRef bytesRef, int low, int hig int mid; // LUCENENET: IDE0059: Remove unnecessary value assignment while (low <= high) { - mid = (low + high).TripleShift(1); + mid = (low + high) >>> 1; hash.Get(ords[mid], bytesRef); int cmp = comparer.Compare(bytesRef, b); if (cmp < 0) diff --git a/src/Lucene.Net.Misc/Index/Sorter/SortingAtomicReader.cs b/src/Lucene.Net.Misc/Index/Sorter/SortingAtomicReader.cs index ff91dd7238..eb65e31df7 100644 --- a/src/Lucene.Net.Misc/Index/Sorter/SortingAtomicReader.cs +++ b/src/Lucene.Net.Misc/Index/Sorter/SortingAtomicReader.cs @@ -1,12 +1,10 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Search; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util; using Lucene.Net.Util.Automaton; using System; -using System.Diagnostics; namespace Lucene.Net.Index.Sorter { @@ -30,7 +28,7 @@ namespace Lucene.Net.Index.Sorter /// /// An which supports sorting documents by a given /// . You can use this class to sort an index as follows: - /// + /// /// /// IndexWriter writer; // writer to which the sorted index will be added /// DirectoryReader reader; // reader on the input index @@ -40,7 +38,7 @@ namespace Lucene.Net.Index.Sorter /// reader.Dispose(); // alternatively, you can use a using block /// writer.Dispose(); // alternatively, you can use a using block /// - /// + /// /// @lucene.experimental /// public class SortingAtomicReader : FilterAtomicReader @@ -76,7 +74,7 @@ private class SortingTerms : FilterTerms private readonly Sorter.DocMap docMap; private readonly IndexOptions indexOptions; - public SortingTerms(Terms input, IndexOptions indexOptions, Sorter.DocMap docMap) + public SortingTerms(Terms input, IndexOptions indexOptions, Sorter.DocMap docMap) : base(input) { this.docMap = docMap; @@ -323,7 +321,7 @@ private sealed class DocFreqSorter : TimSorter private readonly int[] tmpDocs; private int[] tmpFreqs; - public DocFreqSorter(int maxDoc) + public DocFreqSorter(int maxDoc) : base(maxDoc / 64) { this.tmpDocs = new int[maxDoc / 64]; @@ -511,7 +509,7 @@ internal sealed class DocOffsetSorter : TimSorter private readonly int[] tmpDocs; private readonly long[] tmpOffsets; - public DocOffsetSorter(int maxDoc) + public DocOffsetSorter(int maxDoc) : base(maxDoc / 64) { this.tmpDocs = new int[maxDoc / 64]; @@ -655,7 +653,7 @@ private void AddPositions(DocsAndPositionsEnum @in, IndexOutput @out) int pos = @in.NextPosition(); BytesRef payload = @in.GetPayload(); // The low-order bit of token is set only if there is a payload, the - // previous bits are the delta-encoded position. + // previous bits are the delta-encoded position. int token = (pos - previousPosition) << 1 | (payload is null ? 0 : 1); @out.WriteVInt32(token); previousPosition = pos; @@ -710,7 +708,7 @@ public override int NextDoc() public override int NextPosition() { int token = postingInput.ReadVInt32(); - pos += token.TripleShift(1); + pos += token >>> 1; if (storeOffsets) { startOffset = endOffset + postingInput.ReadVInt32(); @@ -744,7 +742,7 @@ public override int NextPosition() /// /// Return a sorted view of according to the order /// defined by . If the reader is already sorted, this - /// method might return the reader as-is. + /// method might return the reader as-is. /// public static AtomicReader Wrap(AtomicReader reader, Sort sort) { @@ -893,4 +891,4 @@ public override Fields GetTermVectors(int docID) return m_input.GetTermVectors(docMap.NewToOld(docID)); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Misc/Util/Fst/UpToTwoPositiveIntOutputs.cs b/src/Lucene.Net.Misc/Util/Fst/UpToTwoPositiveIntOutputs.cs index 058f454c79..cf97d1cdd5 100644 --- a/src/Lucene.Net.Misc/Util/Fst/UpToTwoPositiveIntOutputs.cs +++ b/src/Lucene.Net.Misc/Util/Fst/UpToTwoPositiveIntOutputs.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Store; using System; using System.Runtime.CompilerServices; @@ -27,13 +26,13 @@ namespace Lucene.Net.Util.Fst /// /// An FST implementation where each output /// is one or two non-negative long values. If it's a - /// output, is + /// output, is /// returned; else, . Order /// is preserved in the case, ie .first is the first /// input/output added to , and .second is the /// second. You cannot store 0 output with this (that's /// reserved to mean "no output")! - /// + /// /// NOTE: the only way to create a TwoLongs output is to /// add the same input to the FST twice in a row. This is /// how the FST maps a single input to two outputs (e.g. you @@ -42,7 +41,7 @@ namespace Lucene.Net.Util.Fst /// you only have at most 2 then this implementation will /// require fewer bytes as it steals one bit from each long /// value. - /// + /// /// /// NOTE: the resulting FST is not guaranteed to be minimal! /// See . @@ -97,7 +96,7 @@ public override bool Equals(object other) public override int GetHashCode() { - return (int)((first ^ (first.TripleShift(32))) ^ (second ^ (second >> 32))); + return (int)((first ^ (first >>> 32)) ^ (second ^ (second >> 32))); } } @@ -239,7 +238,7 @@ public override object Read(DataInput @in) if ((code & 1) == 0) { // single long - long v = code.TripleShift(1); + long v = code >>> 1; if (v == 0) { return NO_OUTPUT; @@ -252,7 +251,7 @@ public override object Read(DataInput @in) else { // two longs - long first = code.TripleShift(1); + long first = code >>> 1; long second = @in.ReadVInt64(); return new TwoInt64s(first, second); } @@ -304,4 +303,4 @@ public override object Merge(object first, object second) return new TwoInt64s((Int64)first, (Int64)second); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/BoostedQuery.cs b/src/Lucene.Net.Queries/Function/BoostedQuery.cs index 72e05b92dd..560ede6ee6 100644 --- a/src/Lucene.Net.Queries/Function/BoostedQuery.cs +++ b/src/Lucene.Net.Queries/Function/BoostedQuery.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Search; using Lucene.Net.Util; @@ -30,7 +29,7 @@ namespace Lucene.Net.Queries.Function /// /// Query that is boosted by a /// - // TODO: BoostedQuery and BoostingQuery in the same module? + // TODO: BoostedQuery and BoostingQuery in the same module? // something has to give public class BoostedQuery : Query { @@ -46,7 +45,7 @@ public BoostedQuery(Query subQuery, ValueSource boostVal) public virtual Query Query => q; public virtual ValueSource ValueSource => boostVal; - + public override Query Rewrite(IndexReader reader) { var newQ = q.Rewrite(reader); @@ -219,11 +218,11 @@ public override bool Equals(object o) public override int GetHashCode() { int h = q.GetHashCode(); - h ^= (h << 17) | (h.TripleShift(16)); + h ^= (h << 17) | (h >>> 16); h += boostVal.GetHashCode(); - h ^= (h << 8) | (h.TripleShift(25)); + h ^= (h << 8) | (h >>> 25); h += J2N.BitConversion.SingleToInt32Bits(Boost); return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/ValueSources/DoubleConstValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/DoubleConstValueSource.cs index 7fcd5196e2..78d163cca0 100644 --- a/src/Lucene.Net.Queries/Function/ValueSources/DoubleConstValueSource.cs +++ b/src/Lucene.Net.Queries/Function/ValueSources/DoubleConstValueSource.cs @@ -1,8 +1,6 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Queries.Function.DocValues; -using System; using System.Collections; using System.Globalization; @@ -109,7 +107,7 @@ public override string ToString(int doc) public override int GetHashCode() { long bits = J2N.BitConversion.DoubleToRawInt64Bits(constant); - return (int)(bits ^ (bits.TripleShift(32))); + return (int)(bits ^ (bits >>> 32)); } public override bool Equals(object o) @@ -142,4 +140,4 @@ public override bool Equals(object o) public override bool Bool => constant != 0; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/ValueSources/DualFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/DualFloatFunction.cs index 188c33e254..280809161c 100644 --- a/src/Lucene.Net.Queries/Function/ValueSources/DualFloatFunction.cs +++ b/src/Lucene.Net.Queries/Function/ValueSources/DualFloatFunction.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Queries.Function.DocValues; using Lucene.Net.Search; @@ -96,9 +95,9 @@ public override void CreateWeight(IDictionary context, IndexSearcher searcher) public override int GetHashCode() { int h = m_a.GetHashCode(); - h ^= (h << 13) | (h.TripleShift(20)); + h ^= (h << 13) | (h >>> 20); h += m_b.GetHashCode(); - h ^= (h << 23) | (h.TripleShift(10)); + h ^= (h << 23) | (h >>> 10); h += Name.GetHashCode(); return h; } @@ -112,4 +111,4 @@ public override bool Equals(object o) return this.m_a.Equals(other.m_a) && this.m_b.Equals(other.m_b); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/ValueSources/LinearFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/LinearFloatFunction.cs index e8f69bbf6b..5969ee8ed2 100644 --- a/src/Lucene.Net.Queries/Function/ValueSources/LinearFloatFunction.cs +++ b/src/Lucene.Net.Queries/Function/ValueSources/LinearFloatFunction.cs @@ -1,10 +1,8 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Queries.Function.DocValues; using Lucene.Net.Search; using System.Collections; -using System.Globalization; namespace Lucene.Net.Queries.Function.ValueSources { @@ -95,9 +93,9 @@ public override void CreateWeight(IDictionary context, IndexSearcher searcher) public override int GetHashCode() { int h = J2N.BitConversion.SingleToInt32Bits(m_slope); - h = (h.TripleShift(2)) | (h << 30); + h = (h >>> 2) | (h << 30); h += J2N.BitConversion.SingleToInt32Bits(m_intercept); - h ^= (h << 14) | (h.TripleShift(19)); + h ^= (h << 14) | (h >>> 19); return h + m_source.GetHashCode(); } @@ -108,4 +106,4 @@ public override bool Equals(object o) return this.m_slope == other.m_slope && this.m_intercept == other.m_intercept && this.m_source.Equals(other.m_source); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/ValueSources/RangeMapFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/RangeMapFloatFunction.cs index 413321e746..e86862d68f 100644 --- a/src/Lucene.Net.Queries/Function/ValueSources/RangeMapFloatFunction.cs +++ b/src/Lucene.Net.Queries/Function/ValueSources/RangeMapFloatFunction.cs @@ -1,5 +1,4 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Queries.Function.DocValues; using Lucene.Net.Search; @@ -112,9 +111,9 @@ public override void CreateWeight(IDictionary context, IndexSearcher searcher) public override int GetHashCode() { int h = m_source.GetHashCode(); - h ^= (h << 10) | (h.TripleShift(23)); + h ^= (h << 10) | (h >>> 23); h += J2N.BitConversion.SingleToInt32Bits(m_min); - h ^= (h << 14) | (h.TripleShift(19)); + h ^= (h << 14) | (h >>> 19); h += J2N.BitConversion.SingleToInt32Bits(m_max); h += m_target.GetHashCode(); if (m_defaultVal != null) @@ -129,11 +128,11 @@ public override bool Equals(object o) if (!(o is RangeMapSingleFunction other)) return false; // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled - return J2N.BitConversion.SingleToInt32Bits(this.m_min) == J2N.BitConversion.SingleToInt32Bits(other.m_min) - && J2N.BitConversion.SingleToInt32Bits(this.m_max) == J2N.BitConversion.SingleToInt32Bits(other.m_max) - && this.m_target.Equals(other.m_target) - && this.m_source.Equals(other.m_source) + return J2N.BitConversion.SingleToInt32Bits(this.m_min) == J2N.BitConversion.SingleToInt32Bits(other.m_min) + && J2N.BitConversion.SingleToInt32Bits(this.m_max) == J2N.BitConversion.SingleToInt32Bits(other.m_max) + && this.m_target.Equals(other.m_target) + && this.m_source.Equals(other.m_source) && (this.m_defaultVal == other.m_defaultVal || (this.m_defaultVal != null && this.m_defaultVal.Equals(other.m_defaultVal))); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs index 05f7292de9..27985440e4 100644 --- a/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs +++ b/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs @@ -1,10 +1,7 @@ // Lucene version compatibility level 4.8.1 -using J2N.Numerics; using Lucene.Net.Index; using Lucene.Net.Queries.Function.DocValues; using Lucene.Net.Search; -using Lucene.Net.Util; -using System; using System.Collections; using System.Globalization; @@ -105,15 +102,15 @@ public override void CreateWeight(IDictionary context, IndexSearcher searcher) public override string GetDescription() { - return J2N.Numerics.Single.ToString(m_a, CultureInfo.InvariantCulture) + - "/(" + J2N.Numerics.Single.ToString(m_m, CultureInfo.InvariantCulture) + + return J2N.Numerics.Single.ToString(m_a, CultureInfo.InvariantCulture) + + "/(" + J2N.Numerics.Single.ToString(m_m, CultureInfo.InvariantCulture) + "*float(" + m_source.GetDescription() + ")" + "+" + J2N.Numerics.Single.ToString(m_b, CultureInfo.InvariantCulture) + ')'; } public override int GetHashCode() { int h = J2N.BitConversion.SingleToInt32Bits(m_a) + J2N.BitConversion.SingleToInt32Bits(m_m); - h ^= (h << 13) | (h.TripleShift(20)); + h ^= (h << 13) | (h >>> 20); return h + (J2N.BitConversion.SingleToInt32Bits(m_b)) + m_source.GetHashCode(); } @@ -128,4 +125,4 @@ public override bool Equals(object o) && this.m_source.Equals(other.m_source); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs b/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs index 283ff34cb4..eff5d5c4f5 100644 --- a/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs +++ b/src/Lucene.Net.QueryParser/Classic/QueryParserBase.cs @@ -1,6 +1,5 @@ using J2N; using J2N.Globalization; -using J2N.Numerics; using Lucene.Net.Analysis; using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Documents; @@ -41,7 +40,7 @@ namespace Lucene.Net.QueryParsers.Classic // but it has been de-nested to make usage syntax shorter. /// - /// The default operator for parsing queries. + /// The default operator for parsing queries. /// Use to change it. /// public enum Operator @@ -58,7 +57,7 @@ public abstract class QueryParserBase : QueryBuilder, ICommonQueryParserConfigur /// /// Do not catch this exception in your code, it means you are using methods that you should no longer use. /// - // LUCENENET: It is no longer good practice to use binary serialization. + // LUCENENET: It is no longer good practice to use binary serialization. // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568 #if FEATURE_SERIALIZABLE_EXCEPTIONS [Serializable] @@ -96,11 +95,11 @@ protected MethodRemovedUseAnother(SerializationInfo info, StreamingContext conte // the nested class: /// - /// Alternative form of + /// Alternative form of /// public const Operator AND_OPERATOR = Operator.AND; /// - /// Alternative form of + /// Alternative form of /// public const Operator OR_OPERATOR = Operator.OR; @@ -234,14 +233,14 @@ public virtual Query Parse(string query) public virtual float FuzzyMinSim { get; set; } /// - /// Get or Set the prefix length for fuzzy queries. + /// Get or Set the prefix length for fuzzy queries. /// Default is 0. /// public virtual int FuzzyPrefixLength { get; set; } /// - /// Gets or Sets the default slop for phrases. - /// If zero, then exact phrase matches are required. + /// Gets or Sets the default slop for phrases. + /// If zero, then exact phrase matches are required. /// Default value is zero. /// public virtual int PhraseSlop { get; set; } @@ -291,7 +290,7 @@ public virtual Query Parse(string query) /// Get or Set locale used by date range parsing, lowercasing, and other /// locale-sensitive operations. /// - /// By default, the culture is null, which indicates to read the culture on the fly + /// By default, the culture is null, which indicates to read the culture on the fly /// from . This ensures if you change the culture on /// the current thread, QueryParser will utilize it. You can also explicitly set a culture. /// Setting the culture to null will restore the default behavior if you have explicitly set a culture. @@ -305,7 +304,7 @@ public virtual Query Parse(string query) /// /// Get or Set the current time zone for date and time parsing operations. /// - /// By default, the time zone is null, which indicates to read the time zone on the fly + /// By default, the time zone is null, which indicates to read the time zone on the fly /// from . This ensures if you change the time zone on /// the current system, QueryParser will utilize it. You can also explicitly set a time zone. /// Setting the time zone to null will restore the default behavior if you have explicitly set a time zone. @@ -349,7 +348,7 @@ public virtual void SetDateResolution(string fieldName, DateResolution dateResol /// /// Returns the date resolution that is used by RangeQueries for the given field. - /// Returns null, if no default or field specific date resolution has been set + /// Returns null, if no default or field specific date resolution has been set /// for the given field. /// public virtual DateResolution GetDateResolution(string fieldName) @@ -376,7 +375,7 @@ public virtual DateResolution GetDateResolution(string fieldName) /// /// Get or Set whether or not to analyze range terms when constructing s. - /// For example, setting this to true can enable analyzing terms into + /// For example, setting this to true can enable analyzing terms into /// collation keys for locale-sensitive . /// public virtual bool AnalyzeRangeTerms @@ -496,7 +495,7 @@ protected internal virtual Query GetRangeQuery(string field, // See LUCENENET-423 - DateRange differences with Java and .NET // Java allows parsing of the string up to the end of the pattern - // and then ignores everything else. .NET will throw an exception, + // and then ignores everything else. .NET will throw an exception, // so this will fail in those cases, though the code below is clear // that users can only specify the date, not the time. Unfortunately, // the date format is much more strict in .NET. @@ -694,7 +693,7 @@ protected internal virtual Query NewWildcardQuery(Term t) /// Can be overridden by extending classes, to modify query being /// returned. /// - /// List that contains instances + /// List that contains instances /// to join. /// throw in overridden method to disallow /// Resulting object. @@ -953,7 +952,7 @@ internal virtual Query HandleBoost(Query q, Token boost) /// Returns a string where the escape char has been /// removed, or kept only once if there was a double escape. /// - /// Supports escaped unicode characters, e. g. translates + /// Supports escaped unicode characters, e. g. translates /// \\u0041 to A. /// internal virtual string DiscardEscapeChar(string input) @@ -983,7 +982,7 @@ internal virtual string DiscardEscapeChar(string input) if (codePointMultiplier > 0) { codePoint += HexToInt32(curChar) * codePointMultiplier; - codePointMultiplier = codePointMultiplier.TripleShift(4); + codePointMultiplier >>>= 4; if (codePointMultiplier == 0) { output[length++] = (char)codePoint; diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs index 67adf0bcb1..08a432c9f4 100644 --- a/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs +++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Parser/EscapeQuerySyntaxImpl.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using J2N.Text; +using J2N.Text; using Lucene.Net.QueryParsers.Flexible.Core.Messages; using Lucene.Net.QueryParsers.Flexible.Core.Parser; using Lucene.Net.QueryParsers.Flexible.Core.Util; @@ -188,7 +187,7 @@ private static ICharSequence ReplaceIgnoreCase(ICharSequence @string, start = firstIndex + 1; } } - + if (result.Length == 0 && copyStart == 0) return @string; #if FEATURE_STRINGBUILDER_APPEND_READONLYSPAN @@ -230,7 +229,7 @@ public virtual string Escape(string text, CultureInfo locale, EscapeQuerySyntaxT return Escape(text.AsCharSequence(), locale, type).ToString(); } - public virtual ICharSequence Escape(ICharSequence text, CultureInfo locale, EscapeQuerySyntaxType type) + public virtual ICharSequence Escape(ICharSequence text, CultureInfo locale, EscapeQuerySyntaxType type) { if (text is null || text.Length == 0) return text; @@ -294,7 +293,7 @@ public static UnescapedCharSequence DiscardEscapeChar(string input) if (codePointMultiplier > 0) { codePoint += HexToInt32(curChar) * codePointMultiplier; - codePointMultiplier = codePointMultiplier.TripleShift(4); + codePointMultiplier >>>= 4; if (codePointMultiplier == 0) { output[length++] = (char)codePoint; diff --git a/src/Lucene.Net.Replicator/RevisionFile.cs b/src/Lucene.Net.Replicator/RevisionFile.cs index ab5371d69b..63ea4a1fa7 100644 --- a/src/Lucene.Net.Replicator/RevisionFile.cs +++ b/src/Lucene.Net.Replicator/RevisionFile.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System; +using System; namespace Lucene.Net.Replicator { @@ -33,14 +32,14 @@ public class RevisionFile : IEquatable /// Gets the name of the file. /// public string FileName { get; private set; } - + /// /// Gets or sets the length of the file denoted by . /// public long Length { get; set; } /// - /// Constructor with the given file name and optionally length. + /// Constructor with the given file name and optionally length. /// /// The name of the file /// Optional, the length of the file. @@ -70,7 +69,7 @@ public virtual bool Equals(RevisionFile other) public override int GetHashCode() { - return FileName.GetHashCode() ^ (int)(Length ^ Length.TripleShift(32)); + return FileName.GetHashCode() ^ (int)(Length ^ (Length >>> 32)); } public override string ToString() @@ -78,4 +77,4 @@ public override string ToString() return string.Format("fileName={0} length={1}", FileName, Length); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Sandbox/Queries/SortedSetSortField.cs b/src/Lucene.Net.Sandbox/Queries/SortedSetSortField.cs index 1cbbbe14d5..578aef3e50 100644 --- a/src/Lucene.Net.Sandbox/Queries/SortedSetSortField.cs +++ b/src/Lucene.Net.Sandbox/Queries/SortedSetSortField.cs @@ -1,10 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; -using Lucene.Net.Index; +using Lucene.Net.Index; using Lucene.Net.Search; using Lucene.Net.Util; using System; -using System.Diagnostics; using System.Text; namespace Lucene.Net.Sandbox.Queries @@ -46,7 +43,7 @@ namespace Lucene.Net.Sandbox.Queries /// are unsupported. /// /// - /// Selectors other than the default require + /// Selectors other than the default require /// optional codec support. However several codecs provided by Lucene, /// including the current default codec, support this. /// @@ -60,7 +57,7 @@ public class SortedSetSortField : SortField private readonly Selector selector; /// - /// Creates a sort, possibly in reverse, by the minimum value in the set + /// Creates a sort, possibly in reverse, by the minimum value in the set /// for the document. /// /// Name of field to sort by. Must not be null. @@ -71,7 +68,7 @@ public SortedSetSortField(string field, bool reverse) } /// - /// Creates a sort, possibly in reverse, specifying how the sort value from + /// Creates a sort, possibly in reverse, specifying how the sort value from /// the document's set is selected. /// /// Name of field to sort by. Must not be null. @@ -129,7 +126,7 @@ public override string ToString() /// /// Set how missing values (the empty set) are sorted. /// - /// Note that this must be or + /// Note that this must be or /// . /// public override void SetMissingValue(object value) @@ -283,7 +280,7 @@ public override int GetOrd(int docID) } else { - return (int)@in.OrdAt((count - 1).TripleShift(1)); + return (int)@in.OrdAt((count - 1) >>> 1); } } @@ -320,7 +317,7 @@ public override int GetOrd(int docID) } else { - return (int)@in.OrdAt(count.TripleShift(1)); + return (int)@in.OrdAt(count >>> 1); } } @@ -342,11 +339,11 @@ public override int LookupTerm(BytesRef key) public enum Selector { /// - /// Selects the minimum value in the set + /// Selects the minimum value in the set /// MIN, /// - /// Selects the maximum value in the set + /// Selects the maximum value in the set /// MAX, /// diff --git a/src/Lucene.Net.Spatial/Util/DistanceToShapeValueSource.cs b/src/Lucene.Net.Spatial/Util/DistanceToShapeValueSource.cs index b8f697a249..e95a846f76 100644 --- a/src/Lucene.Net.Spatial/Util/DistanceToShapeValueSource.cs +++ b/src/Lucene.Net.Spatial/Util/DistanceToShapeValueSource.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Index; +using Lucene.Net.Index; using Lucene.Net.Queries.Function; using Lucene.Net.Queries.Function.DocValues; using Lucene.Net.Search; @@ -32,7 +31,7 @@ namespace Lucene.Net.Spatial.Util /// The distance from a provided Point to a Point retrieved from a ValueSource via /// . The distance /// is calculated via a . - /// + /// /// @lucene.experimental /// public class DistanceToShapeValueSource : ValueSource @@ -133,7 +132,7 @@ public override int GetHashCode() result = shapeValueSource.GetHashCode(); result = 31 * result + queryPoint.GetHashCode(); temp = J2N.BitConversion.DoubleToInt64Bits(multiplier); - result = 31 * result + (int)(temp ^ (temp.TripleShift(32))); + result = 31 * result + (int)(temp ^ (temp >>> 32)); return result; } } diff --git a/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs b/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs index e0f9e6d12b..bb5ac1fd75 100644 --- a/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs +++ b/src/Lucene.Net.TestFramework/Support/ApiScanTestBase.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using System.Text; using System.Text.RegularExpressions; using Assert = Lucene.Net.TestFramework.Assert; @@ -37,8 +38,8 @@ public abstract class ApiScanTestBase : LuceneTestCase internal ApiScanTestBase() { } // LUCENENET: Not for use by end users /// - /// Private fields must be upper case separated with underscores, - /// must be camelCase (optionally may be prefixed with underscore, + /// Private fields must be upper case separated with underscores, + /// must be camelCase (optionally may be prefixed with underscore, /// but it is preferred not to use the underscore to match Lucene). /// private static readonly Regex PrivateFieldName = new Regex("^_?[a-z][a-zA-Z0-9_]*$|^[A-Z0-9_]+$", RegexOptions.Compiled); @@ -199,7 +200,7 @@ public virtual void TestClassNames(Type typeFromTargetAssembly) //} Assert.IsFalse(names.Any(), names.Count() + " invalid class names detected. " + - "Class names must be Pascal case, but may not follow the interface naming " + + "Class names must be Pascal case, but may not follow the interface naming " + "convention of captial 'I' followed by another capital letter."); } @@ -235,9 +236,9 @@ public virtual void TestForPropertiesThatReturnArray(Type typeFromTargetAssembly //} Assert.IsFalse(names.Any(), names.Count() + " properties that return Array detected. " + - "Properties should generally not return Array. Change to a method (prefixed with Get) " + + "Properties should generally not return Array. Change to a method (prefixed with Get) " + "or if returning an array that can be written to was intended, decorate with the WritableArray attribute. " + - "Note that returning an array field from either a property or method means the array can be written to by " + + "Note that returning an array field from either a property or method means the array can be written to by " + "the consumer if the array is not cloned using arr.ToArray()."); } @@ -293,11 +294,11 @@ public virtual void TestForPublicMembersNamedSize(Type typeFromTargetAssembly) //} Assert.IsFalse(names.Any(), names.Count() + " member names named 'Size'. " + - "In .NET, we need to change the name 'Size' to either 'Count' or 'Length', " + + "In .NET, we need to change the name 'Size' to either 'Count' or 'Length', " + "and it should generally be made a property."); } - + //[Test, LuceneNetSpecific] public virtual void TestForPublicMembersContainingNonNetNumeric(Type typeFromTargetAssembly) @@ -312,7 +313,7 @@ public virtual void TestForPublicMembersContainingNonNetNumeric(Type typeFromTar } //} - Assert.IsFalse(names.Any(), names.Count() + " member names containing the word 'Int' not followed " + + Assert.IsFalse(names.Any(), names.Count() + " member names containing the word 'Int' not followed " + "by 16, 32, or 64, 'Long', 'Short', or 'Float' detected. " + "In .NET, we need to change to 'Short' to 'Int16', 'Int' to 'Int32', 'Long' to 'Int64', and 'Float' to 'Single'."); } @@ -488,11 +489,11 @@ private static IEnumerable GetInvalidPublicFields(Assembly assembly, str { var result = new List(); - var classes = assembly.GetTypes().Where(t => t.IsClass); + var classes = assembly.GetTypes().Where(t => t.IsClass && !t.HasAttribute(inherit: false)); foreach (var c in classes) { - if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods + if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods { continue; } @@ -587,7 +588,7 @@ private static IEnumerable GetInvalidClassNames(Assembly assembly) foreach (var c in classes) { - if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods + if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods { continue; } @@ -650,7 +651,7 @@ private static IEnumerable GetPropertiesThatReturnArray(Assembly assembl } var getMethod = property.GetGetMethod(); - + if (getMethod != null && getMethod.ReturnParameter != null && getMethod.ReturnParameter.ParameterType.IsArray && property.DeclaringType.Equals(c.UnderlyingSystemType)) { result.Add(string.Concat(c.FullName, ".", property.Name)); @@ -706,7 +707,7 @@ private static IEnumerable GetMembersContainingComparer(Assembly assembl { result.Add(t.FullName); } - + var members = t.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); foreach (var member in members) @@ -759,7 +760,7 @@ private static IEnumerable GetMembersNamedSize(Assembly assembly) { result.Add(string.Concat(t.FullName, ".", member.Name)); } - + } } } @@ -841,7 +842,7 @@ private static IEnumerable GetMethodsThatReturnWritableArray(Assembly as foreach (var c in classes) { - if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods + if (c.Name.StartsWith("<", StringComparison.Ordinal)) // Ignore classes produced by anonymous methods { continue; } @@ -865,8 +866,8 @@ private static IEnumerable GetMethodsThatReturnWritableArray(Assembly as continue; } - if (method != null && method.ReturnParameter != null - && method.ReturnParameter.ParameterType.IsArray + if (method != null && method.ReturnParameter != null + && method.ReturnParameter.ParameterType.IsArray && method.DeclaringType.Equals(c.UnderlyingSystemType)) { @@ -957,16 +958,16 @@ private static IEnumerable GetPublicNullableEnumMembers(Assembly assembl } } } - else if (member.MemberType == MemberTypes.Property - && Nullable.GetUnderlyingType(((PropertyInfo)member).PropertyType) != null - && ((PropertyInfo)member).PropertyType.GetGenericArguments()[0].IsEnum + else if (member.MemberType == MemberTypes.Property + && Nullable.GetUnderlyingType(((PropertyInfo)member).PropertyType) != null + && ((PropertyInfo)member).PropertyType.GetGenericArguments()[0].IsEnum && IsNonPrivateProperty((PropertyInfo)member)) { result.Add(string.Concat(t.FullName, ".", member.Name)); } - else if (member.MemberType == MemberTypes.Field - && Nullable.GetUnderlyingType(((FieldInfo)member).FieldType) != null - && ((FieldInfo)member).FieldType.GetGenericArguments()[0].IsEnum + else if (member.MemberType == MemberTypes.Field + && Nullable.GetUnderlyingType(((FieldInfo)member).FieldType) != null + && ((FieldInfo)member).FieldType.GetGenericArguments()[0].IsEnum && (((FieldInfo)member).IsFamily || ((FieldInfo)member).IsFamilyOrAssembly)) { result.Add(string.Concat(t.FullName, ".", member.Name, " (field)")); diff --git a/src/Lucene.Net.Tests/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs b/src/Lucene.Net.Tests/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs index 058e87112a..fed5fc8237 100644 --- a/src/Lucene.Net.Tests/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs +++ b/src/Lucene.Net.Tests/Codecs/Compressing/AbstractTestLZ4CompressionMode.cs @@ -1,8 +1,6 @@ -using J2N.Numerics; -using J2N.Text; +using J2N.Text; using Lucene.Net.Support; using NUnit.Framework; -using System; using System.Text; using Assert = Lucene.Net.TestFramework.Assert; using RandomInts = RandomizedTesting.Generators.RandomNumbers; @@ -37,7 +35,7 @@ public override byte[] Test(byte[] decompressed) for (; ; ) { int token = compressed[off++] & 0xFF; - int literalLen = token.TripleShift(4); + int literalLen = token >>> 4; if (literalLen == 0x0F) { while (compressed[off] == 0xFF) @@ -81,7 +79,7 @@ public override byte[] Test(byte[] decompressed) if (decompressedOff + matchLen < decompressed.Length - LZ4.LAST_LITERALS) { bool moreCommonBytes = decompressed[decompressedOff + matchLen] == decompressed[decompressedOff - matchDec + matchLen]; - bool nextSequenceHasLiterals = (compressed[off] & 0xFF).TripleShift(4) != 0; + bool nextSequenceHasLiterals = (compressed[off] & 0xFF) >>> 4 != 0; Assert.IsTrue(!moreCommonBytes || !nextSequenceHasLiterals); } @@ -129,4 +127,4 @@ public virtual void TestMatchRightBeforeLastLiterals() Test(new byte[] { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5 }); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs index 133456ca69..cc8213f30b 100644 --- a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs +++ b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs @@ -1,6 +1,5 @@ using J2N; using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Index.Extensions; using NUnit.Framework; @@ -8,7 +7,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using JCG = J2N.Collections.Generic; using Assert = Lucene.Net.TestFramework.Assert; @@ -104,7 +102,7 @@ public class TestBackwardsCompatibility : LuceneTestCase public void testCreateCFS() throws IOException { createIndex("index.cfs", true, false); } - + public void testCreateNoCFS() throws IOException { createIndex("index.nocfs", false, false); } @@ -115,15 +113,15 @@ public void testCreateNoCFS() throws IOException { // that also single-segment indexes are correctly upgraded by IndexUpgrader. // You don't need them to be build for non-4.0 (the test is happy with just one // "old" segment format, version is unimportant: - + public void testCreateSingleSegmentCFS() throws IOException { createIndex("index.singlesegment.cfs", true, true); } - + public void testCreateSingleSegmentNoCFS() throws IOException { createIndex("index.singlesegment.nocfs", false, true); } - + */ /* @@ -134,14 +132,14 @@ public void testCreateMoreTermsIndex() throws Exception { File indexDir = new File("moreterms"); TestUtil.rmDir(indexDir); Directory dir = NewFSDirectory(indexDir); - + LogByteSizeMergePolicy mp = new LogByteSizeMergePolicy(); mp.SetUseCompoundFile(false); mp.setNoCFSRatio(1.0); mp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); MockAnalyzer analyzer = new MockAnalyzer(Random()); analyzer.setMaxTokenLength(TestUtil.nextInt(Random(), 1, IndexWriter.MAX_TERM_LENGTH)); - + // TODO: remove randomness IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, analyzer) .SetMergePolicy(mp); @@ -153,7 +151,7 @@ public void testCreateMoreTermsIndex() throws Exception { } writer.Dispose(); dir.Dispose(); - + // Gives you time to copy the index out!: (there is also // a test option to not remove temp dir...): Thread.sleep(100000); @@ -507,7 +505,7 @@ public virtual void SearchIndex(Directory dir, string oldName) int id = Convert.ToInt32(reader.Document(i).Get("id")); Assert.AreEqual(id, dvByte.Get(i)); - sbyte[] bytes = new sbyte[] { (sbyte)(id.TripleShift(24)), (sbyte)(id.TripleShift(16)), (sbyte)(id.TripleShift(8)), (sbyte)id }; + sbyte[] bytes = new sbyte[] { (sbyte)(id >>> 24), (sbyte)(id >>> 16), (sbyte)(id >>> 8), (sbyte)id }; BytesRef expectedRef = new BytesRef((byte[])(Array)bytes); BytesRef scratch = new BytesRef(); @@ -713,7 +711,7 @@ private void AddDoc(IndexWriter writer, int id) doc.Add(new Int64Field("trieLong", (long)id, Field.Store.NO)); // add docvalues fields doc.Add(new NumericDocValuesField("dvByte", (sbyte)id)); - sbyte[] bytes = new sbyte[] { (sbyte)(id.TripleShift(24)), (sbyte)(id.TripleShift(16)), (sbyte)(id.TripleShift(8)), (sbyte)id }; + sbyte[] bytes = new sbyte[] { (sbyte)(id >>> 24), (sbyte)(id >>> 16), (sbyte)(id >>> 8), (sbyte)id }; BytesRef @ref = new BytesRef((byte[])(Array)bytes); doc.Add(new BinaryDocValuesField("dvBytesDerefFixed", @ref)); doc.Add(new BinaryDocValuesField("dvBytesDerefVar", @ref)); @@ -742,7 +740,7 @@ private void AddDoc(IndexWriter writer, int id) customType4.StoreTermVectorOffsets = true; customType4.IndexOptions = IndexOptions.DOCS_AND_FREQS; doc.Add(new Field("content6", "here is more content with aaa aaa aaa", customType4)); - // TODO: + // TODO: // index different norms types via similarity (we use a random one currently?!) // remove any analyzer randomness, explicitly add payloads for certain fields. writer.AddDocument(doc); @@ -1071,4 +1069,4 @@ public virtual void TestMoreTerms() dir.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs index e2e506609a..9ac0bf703e 100644 --- a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs +++ b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility3x.cs @@ -1,5 +1,4 @@ using J2N; -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Index.Extensions; using NUnit.Framework; @@ -89,7 +88,7 @@ public class TestBackwardsCompatibility3x : LuceneTestCase public void testCreateCFS() throws IOException { createIndex("index.cfs", true, false); } - + public void testCreateNoCFS() throws IOException { createIndex("index.nocfs", false, false); } @@ -100,15 +99,15 @@ public void testCreateNoCFS() throws IOException { // that also single-segment indexes are correctly upgraded by IndexUpgrader. // You don't need them to be build for non-3.1 (the test is happy with just one // "old" segment format, version is unimportant: - + public void testCreateSingleSegmentCFS() throws IOException { createIndex("index.singlesegment.cfs", true, true); } - + public void testCreateSingleSegmentNoCFS() throws IOException { createIndex("index.singlesegment.nocfs", false, true); } - + */ // LUCENENET specific to load resources for this type @@ -339,7 +338,7 @@ public virtual void TestIndexOldIndex() } } - /// @deprecated 3.x transition mechanism + /// @deprecated 3.x transition mechanism [Obsolete("3.x transition mechanism")] [Test] public virtual void TestDeleteOldIndex() @@ -476,7 +475,7 @@ public virtual void SearchIndex(Directory dir, string oldName) int id = Convert.ToInt32(reader.Document(i).Get("id")); Assert.AreEqual(id, dvByte.Get(i)); - sbyte[] bytes = new sbyte[] { (sbyte)(id.TripleShift(24)), (sbyte)(id.TripleShift(16)), (sbyte)(id.TripleShift(8)), (sbyte)id }; + sbyte[] bytes = new sbyte[] { (sbyte)(id >>> 24), (sbyte)(id >>> 16), (sbyte)(id >>> 8), (sbyte)id }; BytesRef expectedRef = new BytesRef((byte[])(Array)bytes); BytesRef scratch = new BytesRef(); @@ -674,7 +673,7 @@ private void AddDoc(IndexWriter writer, int id) doc.Add(new Int64Field("trieLong", (long)id, Field.Store.NO)); // add docvalues fields doc.Add(new NumericDocValuesField("dvByte", (sbyte)id)); - sbyte[] bytes = new sbyte[] { (sbyte)(id.TripleShift(24)), (sbyte)(id.TripleShift(16)), (sbyte)(id.TripleShift(8)), (sbyte)id }; + sbyte[] bytes = new sbyte[] { (sbyte)(id >>> 24), (sbyte)(id >>> 16), (sbyte)(id >>> 8), (sbyte)id }; BytesRef @ref = new BytesRef((byte[])(Array)bytes); doc.Add(new BinaryDocValuesField("dvBytesDerefFixed", @ref)); doc.Add(new BinaryDocValuesField("dvBytesDerefVar", @ref)); @@ -702,7 +701,7 @@ private void AddDoc(IndexWriter writer, int id) customType4.StoreTermVectorOffsets = true; customType4.IndexOptions = IndexOptions.DOCS_AND_FREQS; doc.Add(new Field("content6", "here is more content with aaa aaa aaa", customType4)); - // TODO: + // TODO: // index different norms types via similarity (we use a random one currently?!) // remove any analyzer randomness, explicitly add payloads for certain fields. writer.AddDocument(doc); @@ -972,7 +971,7 @@ public virtual void TestSurrogates() dir.Dispose(); } - /* + /* * Index with negative positions (LUCENE-1542) * Created with this code, using a 2.4.0 jar, then upgraded with 3.6 upgrader: * @@ -998,15 +997,15 @@ public virtual void TestSurrogates() * iw.Dispose(); * d.Dispose(); * } - * + * * static class CannedTokenStream extends TokenStream { * private final Token[] tokens; * private int upto = 0; - * + * * CannedTokenStream(Token... tokens) { * this.tokens = tokens; * } - * + * * @Override * public Token next() { * if (upto < tokens.Length) { @@ -1047,4 +1046,4 @@ public virtual void TestNegativePositions() } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs index b2d8818487..838cc8f43e 100644 --- a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs +++ b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs @@ -1,5 +1,4 @@ using J2N; -using J2N.Numerics; using J2N.Threading; using J2N.Threading.Atomic; using Lucene.Net.Attributes; @@ -91,7 +90,7 @@ internal static BytesRef ToBytes(long value) while ((value & ~0x7FL) != 0L) { bytes.Bytes[bytes.Length++] = unchecked((byte)((value & 0x7FL) | 0x80L)); - value = value.TripleShift(7); + value >>>= 7; } bytes.Bytes[bytes.Length++] = (byte)value; // System.err.println("[" + Thread.currentThread().getName() + "] value=" + orig + ", bytes=" + bytes); @@ -1783,8 +1782,8 @@ public virtual void TestUpdateTwoNonexistingTerms() /// /// Using the exact translation from Lucene, we had an issue where loss of float precision was causing - /// index corruption when using binary doc values in combination with a 32 bit application to write the index. - /// Consequently, a 64 bit application could not read an index generated by a 32 bit application and a + /// index corruption when using binary doc values in combination with a 32 bit application to write the index. + /// Consequently, a 64 bit application could not read an index generated by a 32 bit application and a /// 32 bit application could not read an index written by Java Lucene (regardless of bitness). /// /// This test is to verify that the current test environment (be it 32 or 64 bit) can read an index with @@ -1839,7 +1838,7 @@ public virtual void TestReadIndexBitness() FacetResult result2 = facets.GetTopChildren(int.MaxValue, "facetField2"); - + for (int i = 0; i < iterations; i++) { assertEquals(i, System.Convert.ToInt32(result2.LabelValues[i].Label)); @@ -1866,4 +1865,4 @@ private FacetsConfig GetFacetConfig() return facetConfig; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs b/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs index 8944ae2bbc..41e9818ff5 100644 --- a/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs +++ b/src/Lucene.Net.Tests/Index/TestStressIndexing2.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using J2N.Text; using J2N.Threading; using Lucene.Net.Analysis.TokenAttributes; @@ -671,7 +670,7 @@ public virtual void VerifyEquals(DirectoryReader r1, DirectoryReader r2, string // now compare for (int i = 0; i < len1; i++) { - Assert.AreEqual(info1[i], info2[i], "i=" + i + " len=" + len1 + " d1=" + (info1[i].TripleShift(32)) + " f1=" + (info1[i] & int.MaxValue) + " d2=" + (info2[i].TripleShift(32)) + " f2=" + (info2[i] & int.MaxValue) + " field=" + field1 + " term=" + term1.Utf8ToString()); + Assert.AreEqual(info1[i], info2[i], "i=" + i + " len=" + len1 + " d1=" + (info1[i] >>> 32) + " f1=" + (info1[i] & int.MaxValue) + " d2=" + (info2[i] >>> 32) + " f2=" + (info2[i] & int.MaxValue) + " field=" + field1 + " term=" + term1.Utf8ToString()); } } } diff --git a/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs b/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs index a43f3195e8..e72dc8c6c1 100644 --- a/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs +++ b/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs @@ -1,5 +1,4 @@ using J2N.IO; -using J2N.Numerics; using Lucene.Net.Support; using NUnit.Framework; using RandomizedTesting.Generators; @@ -1025,7 +1024,7 @@ public virtual void TestEncodeDecode() { // clear highest bits for packed int toClear = 64 % bpv; - blocks[i] = (blocks[i] << toClear).TripleShift(toClear); + blocks[i] = (blocks[i] << toClear) >>> toClear; } } diff --git a/src/Lucene.Net.Tests/Util/TestNumericUtils.cs b/src/Lucene.Net.Tests/Util/TestNumericUtils.cs index 6cec59004a..7f83d991b5 100644 --- a/src/Lucene.Net.Tests/Util/TestNumericUtils.cs +++ b/src/Lucene.Net.Tests/Util/TestNumericUtils.cs @@ -1,5 +1,4 @@ #if FEATURE_UTIL_TESTS -using J2N.Numerics; using J2N.Text; using Lucene.Net.Support; using NUnit.Framework; @@ -323,9 +322,9 @@ public override void AddRange(long min, long max, int shift) neededShifts.MoveNext(); Assert.AreEqual(neededShifts.Current, shift, "shift"); neededBounds.MoveNext(); - Assert.AreEqual(neededBounds.Current, min.TripleShift(shift), "inner min bound"); + Assert.AreEqual(neededBounds.Current, min >>> shift, "inner min bound"); neededBounds.MoveNext(); - Assert.AreEqual(neededBounds.Current, max.TripleShift(shift), "inner max bound"); + Assert.AreEqual(neededBounds.Current, max >>> shift, "inner max bound"); } } @@ -410,11 +409,11 @@ private long RandomLong(Random random) } if (random.NextBoolean()) { - val = val << 1; + val <<= 1; } if (random.NextBoolean()) { - val = val.TripleShift(1); + val >>>= 1; } } @@ -516,9 +515,9 @@ public override void AddRange(int min, int max, int shift) neededShifts.MoveNext(); Assert.AreEqual(neededShifts.Current, shift, "shift"); neededBounds.MoveNext(); - Assert.AreEqual(neededBounds.Current, min.TripleShift(shift), "inner min bound"); + Assert.AreEqual(neededBounds.Current, min >>> shift, "inner min bound"); neededBounds.MoveNext(); - Assert.AreEqual(neededBounds.Current, max.TripleShift(shift), "inner max bound"); + Assert.AreEqual(neededBounds.Current, max >>> shift, "inner max bound"); } } diff --git a/src/Lucene.Net/Codecs/BlockTreeTermsReader.cs b/src/Lucene.Net/Codecs/BlockTreeTermsReader.cs index 3c343c79e5..81b24930d5 100644 --- a/src/Lucene.Net/Codecs/BlockTreeTermsReader.cs +++ b/src/Lucene.Net/Codecs/BlockTreeTermsReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Support; using Lucene.Net.Util; @@ -596,7 +595,7 @@ internal FieldReader(BlockTreeTermsReader outerInstance, FieldIn // System.out.println("BTTR: seg=" + segment + " field=" + fieldInfo.name + " rootBlockCode=" + rootCode + " divisor=" + indexDivisor); // } - rootBlockFP = new ByteArrayDataInput(rootCode.Bytes, rootCode.Offset, rootCode.Length).ReadVInt64().TripleShift(BlockTreeTermsWriter.OUTPUT_FLAGS_NUM_BITS); + rootBlockFP = new ByteArrayDataInput(rootCode.Bytes, rootCode.Offset, rootCode.Length).ReadVInt64() >>> BlockTreeTermsWriter.OUTPUT_FLAGS_NUM_BITS; if (indexIn != null) { @@ -789,7 +788,7 @@ internal void LoadNextFloorBlock() do { - fp = fpOrig + (floorDataReader.ReadVInt64().TripleShift(1)); + fp = fpOrig + (floorDataReader.ReadVInt64() >>> 1); numFollowFloorBlocks--; // if (DEBUG) System.out.println(" skip floor block2! nextFloorLabel=" + (char) nextFloorLabel + " vs target=" + (char) transitions[transitionIndex].getMin() + " newFP=" + fp + " numFollowFloorBlocks=" + numFollowFloorBlocks); if (numFollowFloorBlocks != 0) @@ -850,7 +849,7 @@ internal void Load(BytesRef frameIndexData) // Maybe skip floor blocks: while (numFollowFloorBlocks != 0 && nextFloorLabel <= transitions[0].Min) { - fp = fpOrig + (floorDataReader.ReadVInt64().TripleShift(1)); + fp = fpOrig + (floorDataReader.ReadVInt64() >>> 1); numFollowFloorBlocks--; // if (DEBUG) System.out.println(" skip floor block! nextFloorLabel=" + (char) nextFloorLabel + " vs target=" + (char) transitions[0].getMin() + " newFP=" + fp + " numFollowFloorBlocks=" + numFollowFloorBlocks); if (numFollowFloorBlocks != 0) @@ -868,14 +867,14 @@ internal void Load(BytesRef frameIndexData) outerInstance.@in.Seek(fp); int code_ = outerInstance.@in.ReadVInt32(); - entCount = code_.TripleShift(1); + entCount = code_ >>> 1; if (Debugging.AssertsEnabled) Debugging.Assert(entCount > 0); isLastInFloor = (code_ & 1) != 0; // term suffixes: code_ = outerInstance.@in.ReadVInt32(); isLeafBlock = (code_ & 1) != 0; - int numBytes = code_.TripleShift(1); + int numBytes = code_ >>> 1; // if (DEBUG) System.out.println(" entCount=" + entCount + " lastInFloor?=" + isLastInFloor + " leafBlock?=" + isLeafBlock + " numSuffixBytes=" + numBytes); if (suffixBytes.Length < numBytes) { @@ -944,7 +943,7 @@ public bool NextNonLeaf() if (Debugging.AssertsEnabled) Debugging.Assert(nextEnt != -1 && nextEnt < entCount, "nextEnt={0} entCount={1} fp={2}", nextEnt, entCount, fp); nextEnt++; int code = suffixesReader.ReadVInt32(); - suffix = code.TripleShift(1); + suffix = code >>> 1; startBytePos = suffixesReader.Position; suffixesReader.SkipBytes(suffix); if ((code & 1) == 0) @@ -1747,7 +1746,7 @@ internal Frame PushFrame(FST.Arc arc, BytesRef frameData, int length) { scratchReader.Reset(frameData.Bytes, frameData.Offset, frameData.Length); long code = scratchReader.ReadVInt64(); - long fpSeek = code.TripleShift(BlockTreeTermsWriter.OUTPUT_FLAGS_NUM_BITS); + long fpSeek = code >>> BlockTreeTermsWriter.OUTPUT_FLAGS_NUM_BITS; Frame f = GetFrame(1 + currentFrame.ord); f.hasTerms = (code & BlockTreeTermsWriter.OUTPUT_FLAG_HAS_TERMS) != 0; f.hasTermsOrig = f.hasTerms; @@ -2759,7 +2758,7 @@ internal void LoadBlock() outerInstance.@in.Seek(fp); int code = outerInstance.@in.ReadVInt32(); - entCount = code.TripleShift(1); + entCount = code >>> 1; if (Debugging.AssertsEnabled) Debugging.Assert(entCount > 0); isLastInFloor = (code & 1) != 0; if (Debugging.AssertsEnabled) Debugging.Assert(arc is null || (isLastInFloor || isFloor)); @@ -2772,7 +2771,7 @@ internal void LoadBlock() // term suffixes: code = outerInstance.@in.ReadVInt32(); isLeafBlock = (code & 1) != 0; - int numBytes = code.TripleShift(1); + int numBytes = code >>> 1; if (suffixBytes.Length < numBytes) { suffixBytes = new byte[ArrayUtil.Oversize(numBytes, 1)]; @@ -2905,7 +2904,7 @@ public bool NextNonLeaf() if (Debugging.AssertsEnabled) Debugging.Assert(nextEnt != -1 && nextEnt < entCount, "nextEnt={0} entCount={1} fp={2}", nextEnt, entCount, fp); nextEnt++; int code = suffixesReader.ReadVInt32(); - suffix = code.TripleShift(1); + suffix = code >>> 1; startBytePos = suffixesReader.Position; outerInstance.term.Length = prefix + suffix; if (outerInstance.term.Bytes.Length < outerInstance.term.Length) @@ -2967,7 +2966,7 @@ public void ScanToFloorFrame(BytesRef target) while (true) { long code = floorDataReader.ReadVInt64(); - newFP = fpOrig + (code.TripleShift(1)); + newFP = fpOrig + (code >>> 1); hasTerms = (code & 1) != 0; // if (DEBUG) { // System.out.println(" label=" + toHex(nextFloorLabel) + " fp=" + newFP + " hasTerms?=" + hasTerms + " numFollowFloor=" + numFollowFloorBlocks); @@ -3093,7 +3092,7 @@ public void ScanToSubBlock(long subFP) if (Debugging.AssertsEnabled) Debugging.Assert(nextEnt < entCount); nextEnt++; int code = suffixesReader.ReadVInt32(); - suffixesReader.SkipBytes(isLeafBlock ? code : code.TripleShift(1)); + suffixesReader.SkipBytes(isLeafBlock ? code : code >>> 1); //if (DEBUG) System.out.println(" " + nextEnt + " (of " + entCount + ") ent isSubBlock=" + ((code&1)==1)); if ((code & 1) != 0) { @@ -3296,7 +3295,7 @@ public SeekStatus ScanToTermNonLeaf(BytesRef target, bool exactOnly) nextEnt++; int code = suffixesReader.ReadVInt32(); - suffix = code.TripleShift(1); + suffix = code >>> 1; // if (DEBUG) { // BytesRef suffixBytesRef = new BytesRef(); // suffixBytesRef.bytes = suffixBytes; diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs index 791b9d666c..4ad245af88 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; using ArrayUtil = Lucene.Net.Util.ArrayUtil; @@ -38,7 +37,7 @@ public sealed class CompressingStoredFieldsIndexReader // LUCENENET specific: No { internal static long MoveLowOrderBitToSign(long n) { - return ((n.TripleShift(1)) ^ -(n & 1)); + return ((n >>> 1) ^ -(n & 1)); } internal readonly int maxDoc; @@ -119,7 +118,7 @@ private int Block(int docID) int lo = 0, hi = docBases.Length - 1; while (lo <= hi) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midValue = docBases[mid]; if (midValue == docID) { @@ -158,7 +157,7 @@ private int RelativeChunk(int block, int relativeDoc) int lo = 0, hi = docBasesDeltas[block].Count - 1; while (lo <= hi) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midValue = RelativeDocBase(block, mid); if (midValue == relativeDoc) { @@ -214,4 +213,4 @@ internal long RamBytesUsed() return res; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsReader.cs b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsReader.cs index 18616a96e8..9bc3be19c1 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsReader.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Codecs.Lucene40; +using Lucene.Net.Codecs.Lucene40; using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; -using System.IO; using System.Runtime.CompilerServices; namespace Lucene.Net.Codecs.Compressing @@ -358,7 +356,7 @@ public override void VisitDocument(int docID, StoredFieldVisitor visitor) for (int fieldIDX = 0; fieldIDX < numStoredFields; fieldIDX++) { long infoAndBits = documentInput.ReadVInt64(); - int fieldNumber = (int)infoAndBits.TripleShift(CompressingStoredFieldsWriter.TYPE_BITS); + int fieldNumber = (int)(infoAndBits >>> CompressingStoredFieldsWriter.TYPE_BITS); FieldInfo fieldInfo = fieldInfos.FieldInfo(fieldNumber); int bits = (int)(infoAndBits & CompressingStoredFieldsWriter.TYPE_MASK); @@ -625,4 +623,4 @@ public override void CheckIntegrity() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsReader.cs b/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsReader.cs index 321ad82d18..3a0ea5ffb8 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsReader.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsReader.cs @@ -1,12 +1,10 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Util; using Lucene.Net.Util.Packed; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.CompilerServices; namespace Lucene.Net.Codecs.Compressing @@ -225,7 +223,7 @@ public override Fields Get(int doc) int token = vectorsStream.ReadByte() & 0xFF; if (Debugging.AssertsEnabled) Debugging.Assert(token != 0); // means no term vectors, cannot happen since we checked for numFields == 0 int bitsPerFieldNum = token & 0x1F; - int totalDistinctFields = token.TripleShift(5); + int totalDistinctFields = token >>> 5; if (totalDistinctFields == 0x07) { totalDistinctFields += vectorsStream.ReadVInt32(); @@ -1139,4 +1137,4 @@ public override void CheckIntegrity() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsWriter.cs b/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsWriter.cs index 52da95b3e2..e3fd67c2d1 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsWriter.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingTermVectorsWriter.cs @@ -2,11 +2,9 @@ using Lucene.Net.Support; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.CompilerServices; using JCG = J2N.Collections.Generic; using ArrayUtil = Lucene.Net.Util.ArrayUtil; -using J2N.Numerics; namespace Lucene.Net.Codecs.Compressing { @@ -844,7 +842,7 @@ public override void AddProx(int numProx, DataInput positions, DataInput offsets { payloadLengthsBuf[payStart + i] = 0; } - position += code.TripleShift(1); + position += code >>> 1; positionsBuf[posStart + i] = position; } } @@ -852,7 +850,7 @@ public override void AddProx(int numProx, DataInput positions, DataInput offsets { for (int i = 0; i < numProx; ++i) { - position += positions.ReadVInt32().TripleShift(1); + position += positions.ReadVInt32() >>> 1; positionsBuf[posStart + i] = position; } } @@ -1006,4 +1004,4 @@ private static int NextDeletedDoc(int doc, IBits liveDocs, int maxDoc) return doc; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Compressing/LZ4.cs b/src/Lucene.Net/Codecs/Compressing/LZ4.cs index 19ff38e014..baa67b6a68 100644 --- a/src/Lucene.Net/Codecs/Compressing/LZ4.cs +++ b/src/Lucene.Net/Codecs/Compressing/LZ4.cs @@ -46,7 +46,7 @@ public static class LZ4 // LUCENENET specific - made static [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int Hash(int i, int hashBits) { - return (i * -1640531535).TripleShift(32 - hashBits); + return (i * -1640531535) >>> (32 - hashBits); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -111,7 +111,7 @@ public static int Decompress(DataInput compressed, int decompressedLen, byte[] d { // literals int token = compressed.ReadByte() & 0xFF; - int literalLen = token.TripleShift(4); + int literalLen = token >>> 4; if (literalLen != 0) { @@ -217,7 +217,7 @@ private static void EncodeSequence(byte[] bytes, int anchor, int matchRef, int m int matchDec = matchOff - matchRef; if (Debugging.AssertsEnabled) Debugging.Assert(matchDec > 0 && matchDec < 1 << 16); @out.WriteByte((byte)matchDec); - @out.WriteByte((byte)matchDec.TripleShift(8)); + @out.WriteByte((byte)(matchDec >>> 8)); // encode match len if (matchLen >= MIN_MATCH + 0x0F) @@ -656,4 +656,4 @@ public static void CompressHC(byte[] src, int srcOff, int srcLen, DataOutput @ou EncodeLastLiterals(src, anchor, srcEnd - anchor, @out); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xSkipListReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xSkipListReader.cs index 86e4d3f9bb..f04cdfe96d 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xSkipListReader.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xSkipListReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -108,7 +107,7 @@ protected override int ReadSkipData(int level, IndexInput skipStream) { payloadLength[level] = skipStream.ReadVInt32(); } - delta = delta.TripleShift(1); + delta >>>= 1; } else { @@ -121,4 +120,4 @@ protected override int ReadSkipData(int level, IndexInput skipStream) return delta; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermDocs.cs b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermDocs.cs index a51f4d4770..7d775b8bfb 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermDocs.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermDocs.cs @@ -1,7 +1,5 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; -using System.Diagnostics; using System.Runtime.CompilerServices; using IBits = Lucene.Net.Util.IBits; @@ -169,7 +167,7 @@ public virtual bool Next() } else { - doc += docCode.TripleShift(1); // shift off low bit + doc += docCode >>> 1; // shift off low bit if ((docCode & 1) != 0) // if low bit is set { freq = 1; // freq is one @@ -208,7 +206,7 @@ public virtual int Read(int[] docs, int[] freqs) { // manually inlined call to next() for speed int docCode = m_freqStream.ReadVInt32(); - doc += docCode.TripleShift(1); // shift off low bit + doc += docCode >>> 1; // shift off low bit if ((docCode & 1) != 0) // if low bit is set { freq = 1; // freq is one @@ -298,4 +296,4 @@ public virtual bool SkipTo(int target) return true; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermPositions.cs b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermPositions.cs index d1d0a3464d..be3898b4e9 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermPositions.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermPositions.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using System; using System.Runtime.CompilerServices; @@ -29,7 +28,7 @@ namespace Lucene.Net.Codecs.Lucene3x using Term = Lucene.Net.Index.Term; /// - /// @lucene.experimental + /// @lucene.experimental /// [Obsolete("(4.0)")] internal sealed class SegmentTermPositions : SegmentTermDocs @@ -116,7 +115,7 @@ private int ReadDeltaPosition() { payloadLength = proxStream.ReadVInt32(); } - delta = delta.TripleShift(1); + delta >>>= 1; needToLoadPayload = true; } else if (delta == -1) @@ -252,4 +251,4 @@ public BytesRef GetPayload() public bool IsPayloadAvailable => needToLoadPayload && payloadLength > 0; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene3x/TermInfosReaderIndex.cs b/src/Lucene.Net/Codecs/Lucene3x/TermInfosReaderIndex.cs index dbb8313b71..1ce98cfe1a 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/TermInfosReaderIndex.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/TermInfosReaderIndex.cs @@ -175,7 +175,7 @@ internal virtual int GetIndexOffset(Term term) BytesRef scratch = new BytesRef(); while (hi >= lo) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int delta = CompareTo(term, mid, input, scratch); if (delta < 0) { @@ -284,4 +284,4 @@ internal virtual long RamBytesUsed() return ramBytesUsed; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs index 94dbe4fff2..cd599e6835 100644 --- a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs +++ b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs @@ -1,8 +1,6 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; -using System.Diagnostics; using System.Runtime.CompilerServices; using BitUtil = Lucene.Net.Util.BitUtil; @@ -74,7 +72,7 @@ internal BitVector(byte[] bits, int size) [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int GetNumBytes(int size) // LUCENENET: CA1822: Mark members as static { - int bytesLength = size.TripleShift(3); + int bytesLength = size >>> 3; if ((size & 7) != 0) { bytesLength++; @@ -259,7 +257,7 @@ public int GetRecomputedCount() /// /// Writes this vector to the file in Directory - /// , in a format that can be read by the constructor + /// , in a format that can be read by the constructor /// . /// public void Write(Directory d, string name, IOContext context) @@ -534,4 +532,4 @@ private void ReadClearedDgaps(IndexInput input) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs index f6256f6004..32bcc29e53 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Index; +using Lucene.Net.Index; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -37,7 +36,7 @@ namespace Lucene.Net.Codecs.Lucene40 /// /// Lucene 4.0 FieldInfos reader. /// - /// @lucene.experimental + /// @lucene.experimental /// /// [Obsolete("Only for reading old 4.0 and 4.1 segments")] @@ -104,7 +103,7 @@ public override FieldInfos Read(Directory directory, string segmentName, string // DV Types are packed in one byte byte val = input.ReadByte(); LegacyDocValuesType oldValuesType = GetDocValuesType((sbyte)(val & 0x0F)); - LegacyDocValuesType oldNormsType = GetDocValuesType((sbyte)(val.TripleShift(4) & 0x0F)); + LegacyDocValuesType oldNormsType = GetDocValuesType((sbyte)((val >>> 4) & 0x0F)); IDictionary attributes = input.ReadStringStringMap(); if (oldValuesType.GetMapping() != DocValuesType.NONE) { @@ -219,4 +218,4 @@ public static LegacyDocValuesType ToLegacyDocValuesType(this string name) // Was { LegacyDocValuesType.BYTES_VAR_SORTED, DocValuesType.SORTED } }; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs index 3ed2a05b6f..64d86f7ffc 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Support; using System; @@ -389,7 +388,7 @@ private int BinarySearch(int hi, int low, int target, int[] docs) { while (low <= hi) { - int mid = (hi + low).TripleShift(1); + int mid = (hi + low) >>> 1; int doc = docs[mid]; if (doc < target) { @@ -475,7 +474,7 @@ private int FillDocsAndFreqs(int size) for (int i = 0; i < size; i++) { int code = freqIn.ReadVInt32(); - docAc += code.TripleShift(1); // shift off low bit + docAc += code >>> 1; // shift off low bit freqs[i] = ReadFreq(freqIn, code); docs[i] = docAc; } @@ -579,7 +578,7 @@ protected internal override int ScanTo(int target) } else { - docAcc += code.TripleShift(1); // shift off low bit + docAcc += code >>> 1; // shift off low bit frq = ReadFreq(freqIn, code); } if (docAcc >= target) @@ -606,7 +605,7 @@ protected internal override int NextUnreadDoc() } else { - m_accum += code.TripleShift(1); // shift off low bit + m_accum += code >>> 1; // shift off low bit m_freq = ReadFreq(freqIn, code); } return m_accum; @@ -678,7 +677,7 @@ protected internal override int ScanTo(int target) } else { - docAcc += code.TripleShift(1); // shift off low bit + docAcc += code >>> 1; // shift off low bit frq = ReadFreq(freqIn, code); } if (docAcc >= target && liveDocs.Get(docAcc)) @@ -711,7 +710,7 @@ protected internal override int NextUnreadDoc() } else { - docAcc += code.TripleShift(1); // shift off low bit + docAcc += code >>> 1; // shift off low bit frq = ReadFreq(freqIn, code); } if (liveDocs.Get(docAcc)) @@ -816,7 +815,7 @@ public override int NextDoc() // Decode next doc/freq pair int code = freqIn.ReadVInt32(); - accum += code.TripleShift(1); // shift off low bit + accum += code >>> 1; // shift off low bit if ((code & 1) != 0) // if low bit is set { freq = 1; // freq is one @@ -1047,7 +1046,7 @@ public override int NextDoc() // Decode next doc/freq pair int code = freqIn.ReadVInt32(); - accum += code.TripleShift(1); // shift off low bit + accum += code >>> 1; // shift off low bit if ((code & 1) != 0) // if low bit is set { freq = 1; // freq is one @@ -1199,7 +1198,7 @@ public override int NextPosition() if (Debugging.AssertsEnabled) Debugging.Assert(payloadLength != -1); payloadPending = true; - code_ = code_.TripleShift(1); + code_ >>>= 1; } position += code_; @@ -1211,7 +1210,7 @@ public override int NextPosition() // new offset length offsetLength = proxIn.ReadVInt32(); } - startOffset += offsetCode.TripleShift(1); + startOffset += offsetCode >>> 1; } posPendingCount--; @@ -1282,4 +1281,4 @@ public override void CheckIntegrity() { } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40SkipListReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40SkipListReader.cs index e353831651..29e4e13525 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40SkipListReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40SkipListReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -139,7 +138,7 @@ protected override int ReadSkipData(int level, IndexInput skipStream) offsetLength[level] = skipStream.ReadVInt32(); } } - delta = delta.TripleShift(1); + delta >>>= 1; } else { @@ -152,4 +151,4 @@ protected override int ReadSkipData(int level, IndexInput skipStream) return delta; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs index 2c9f8a1ce7..1002d73013 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Support; using System; @@ -499,7 +498,7 @@ public override bool MoveNext() for (int posUpto = 0; posUpto < freq; posUpto++) { int code = tvf.ReadVInt32(); - pos += code.TripleShift(1); + pos += code >>> 1; positions[posUpto] = pos; if ((code & 1) != 0) { @@ -834,4 +833,4 @@ public override void CheckIntegrity() { } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs index 501c9ecbb3..87a9864872 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using J2N.Text; +using J2N.Text; using Lucene.Net.Diagnostics; using System; using System.Collections.Generic; @@ -209,11 +208,11 @@ public override void AddProx(int numProx, DataInput positions, DataInput offsets scratch.Grow(length); scratch.Length = length; positions.ReadBytes(scratch.Bytes, scratch.Offset, scratch.Length); - WritePosition(code.TripleShift(1), scratch); + WritePosition(code >>> 1, scratch); } else { - WritePosition(code.TripleShift(1), null); + WritePosition(code >>> 1, null); } } tvf.WriteBytes(payloadData.Bytes, payloadData.Offset, payloadData.Length); @@ -223,7 +222,7 @@ public override void AddProx(int numProx, DataInput positions, DataInput offsets // pure positions, no payloads for (int i = 0; i < numProx; i++) { - tvf.WriteVInt32(positions.ReadVInt32().TripleShift(1)); + tvf.WriteVInt32(positions.ReadVInt32() >>> 1); } } @@ -338,9 +337,9 @@ public override void Abort() catch (Exception ignored) when (ignored.IsThrowable()) { } - IOUtils.DeleteFilesIgnoringExceptions(directory, - IndexFileNames.SegmentFileName(segment, "", Lucene40TermVectorsReader.VECTORS_INDEX_EXTENSION), - IndexFileNames.SegmentFileName(segment, "", Lucene40TermVectorsReader.VECTORS_DOCUMENTS_EXTENSION), + IOUtils.DeleteFilesIgnoringExceptions(directory, + IndexFileNames.SegmentFileName(segment, "", Lucene40TermVectorsReader.VECTORS_INDEX_EXTENSION), + IndexFileNames.SegmentFileName(segment, "", Lucene40TermVectorsReader.VECTORS_DOCUMENTS_EXTENSION), IndexFileNames.SegmentFileName(segment, "", Lucene40TermVectorsReader.VECTORS_FIELDS_EXTENSION)); } @@ -535,4 +534,4 @@ protected override void Dispose(bool disposing) public override IComparer Comparer => BytesRef.UTF8SortedAsUnicodeComparer; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene41/ForUtil.cs b/src/Lucene.Net/Codecs/Lucene41/ForUtil.cs index 21ced0370e..6b5a6eff91 100644 --- a/src/Lucene.Net/Codecs/Lucene41/ForUtil.cs +++ b/src/Lucene.Net/Codecs/Lucene41/ForUtil.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util.Packed; @@ -143,7 +142,7 @@ internal ForUtil(DataInput @in) for (int bpv = 1; bpv <= 32; ++bpv) { var code = @in.ReadVInt32(); - var formatId = code.TripleShift(5); + var formatId = code >>> 5; var bitsPerValue = (code & 31) + 1; PackedInt32s.Format format = PackedInt32s.Format.ById(formatId); @@ -262,4 +261,4 @@ private static int BitsRequired(int[] data) return PackedInt32s.BitsRequired(or); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs index 4ae6171910..1d4f519b3b 100644 --- a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs @@ -1,10 +1,8 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Index; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util; -using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Codecs.Lucene41 @@ -110,7 +108,7 @@ internal static void ReadVInt32Block(IndexInput docIn, int[] docBuffer, int[] fr for (int i = 0; i < num; i++) { int code = docIn.ReadVInt32(); - docBuffer[i] = code.TripleShift(1); + docBuffer[i] = code >>> 1; if ((code & 1) != 0) { freqBuffer[i] = 1; @@ -337,9 +335,9 @@ public BlockDocsEnum(Lucene41PostingsReader outerInstance, FieldInfo fieldInfo) public bool CanReuse(IndexInput docIn, FieldInfo fieldInfo) { // LUCENENET specific - to avoid boxing, changed from CompareTo() to IndexOptionsComparer.Compare() - return docIn == startDocIn && - indexHasFreq == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS) >= 0) && - indexHasPos == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) && + return docIn == startDocIn && + indexHasFreq == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS) >= 0) && + indexHasPos == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) && indexHasPayloads == fieldInfo.HasPayloads; } @@ -659,8 +657,8 @@ public BlockDocsAndPositionsEnum(Lucene41PostingsReader outerInstance, FieldInfo [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool CanReuse(IndexInput docIn, FieldInfo fieldInfo) { - return docIn == startDocIn && - indexHasOffsets == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0) + return docIn == startDocIn && + indexHasOffsets == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0) && indexHasPayloads == fieldInfo.HasPayloads; } @@ -767,7 +765,7 @@ private void RefillPositions() { payloadLength = posIn.ReadVInt32(); } - posDeltaBuffer[i] = code.TripleShift(1); + posDeltaBuffer[i] = code >>> 1; if (payloadLength != 0) { posIn.Seek(posIn.Position + payloadLength); // LUCENENET specific: Renamed from getFilePointer() to match FileStream @@ -1165,8 +1163,8 @@ public EverythingEnum(Lucene41PostingsReader outerInstance, FieldInfo fieldInfo) public bool CanReuse(IndexInput docIn, FieldInfo fieldInfo) { // LUCENENET specific - to avoid boxing, changed from CompareTo() to IndexOptionsComparer.Compare() - return docIn == startDocIn && - indexHasOffsets == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0) && + return docIn == startDocIn && + indexHasOffsets == (IndexOptionsComparer.Default.Compare(fieldInfo.IndexOptions, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0) && indexHasPayloads == fieldInfo.HasPayloads; } @@ -1282,7 +1280,7 @@ private void RefillPositions() // System.out.println(" i=" + i + " payloadLen=" + payloadLength); // } payloadLengthBuffer[i] = payloadLength; - posDeltaBuffer[i] = code.TripleShift(1); + posDeltaBuffer[i] = code >>> 1; if (payloadLength != 0) { if (payloadByteUpto + payloadLength > payloadBytes.Length) @@ -1309,7 +1307,7 @@ private void RefillPositions() { offsetLength = posIn.ReadVInt32(); } - offsetStartDeltaBuffer[i] = deltaCode.TripleShift(1); + offsetStartDeltaBuffer[i] = deltaCode >>> 1; offsetLengthBuffer[i] = offsetLength; // if (DEBUG) { // System.out.println(" startOffDelta=" + offsetStartDeltaBuffer[i] + " offsetLen=" + offsetLengthBuffer[i]); @@ -1714,4 +1712,4 @@ public override void CheckIntegrity() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs index f3c448bdd3..e46f6dfd17 100644 --- a/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs +++ b/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System; using System.Collections.Generic; @@ -97,7 +96,7 @@ public override FieldInfos Read(Directory directory, string segmentName, string // DV Types are packed in one byte sbyte val = (sbyte)input.ReadByte(); DocValuesType docValuesType = GetDocValuesType(input, (byte)(val & 0x0F)); - DocValuesType normsType = GetDocValuesType(input, (byte)((val.TripleShift(4)) & 0x0F)); + DocValuesType normsType = GetDocValuesType(input, (byte)((val >>> 4) & 0x0F)); IDictionary attributes = input.ReadStringStringMap(); infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, indexOptions, docValuesType, normsType, Collections.AsReadOnly(attributes)); diff --git a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs index 789ef4236a..179cf0d6ac 100644 --- a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs +++ b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs @@ -1,12 +1,9 @@ -using J2N.Numerics; -using J2N.Threading.Atomic; -using Lucene.Net.Diagnostics; +using J2N.Threading.Atomic; using Lucene.Net.Index; using Lucene.Net.Support.Threading; using Lucene.Net.Util; using System; using System.Collections.Generic; -using System.IO; using System.Runtime.CompilerServices; namespace Lucene.Net.Codecs.Lucene45 @@ -914,7 +911,7 @@ internal NumericEntry() internal int format; /// - /// Packed s version used to encode these numerics. + /// Packed s version used to encode these numerics. /// /// NOTE: This was packedIntsVersion (field) in Lucene /// @@ -1146,7 +1143,7 @@ public override TermsEnum.SeekStatus SeekCeil(BytesRef text) while (low <= high) { - long mid = (low + high).TripleShift(1); + long mid = (low + high) >>> 1; DoSeek(mid * outerInstance.interval); int cmp = termBuffer.CompareTo(text); @@ -1252,4 +1249,4 @@ public override DocsAndPositionsEnum DocsAndPositions(IBits liveDocs, DocsAndPos } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs index 83b9cd7b95..003e3a242d 100644 --- a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs +++ b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System.Collections.Generic; namespace Lucene.Net.Codecs.Lucene46 @@ -94,7 +93,7 @@ public override FieldInfos Read(Directory directory, string segmentName, string // DV Types are packed in one byte byte val = input.ReadByte(); DocValuesType docValuesType = GetDocValuesType(input, (byte)(val & 0x0F)); - DocValuesType normsType = GetDocValuesType(input, (byte)((val.TripleShift(4)) & 0x0F)); + DocValuesType normsType = GetDocValuesType(input, (byte)((val >>> 4) & 0x0F)); long dvGen = input.ReadInt64(); IDictionary attributes = input.ReadStringStringMap(); infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, indexOptions, docValuesType, normsType, Collections.AsReadOnly(attributes)); diff --git a/src/Lucene.Net/Codecs/TermVectorsWriter.cs b/src/Lucene.Net/Codecs/TermVectorsWriter.cs index bca990c15e..ae74da3f75 100644 --- a/src/Lucene.Net/Codecs/TermVectorsWriter.cs +++ b/src/Lucene.Net/Codecs/TermVectorsWriter.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using J2N.Text; +using J2N.Text; using Lucene.Net.Diagnostics; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Runtime.CompilerServices; namespace Lucene.Net.Codecs @@ -170,7 +168,7 @@ public virtual void AddProx(int numProx, DataInput positions, DataInput offsets) else { int code = positions.ReadVInt32(); - position += code.TripleShift(1); + position += code >>> 1; if ((code & 1) != 0) { // this position has a payload @@ -379,4 +377,4 @@ public void Dispose() /// protected abstract void Dispose(bool disposing); } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/DocTermOrds.cs b/src/Lucene.Net/Index/DocTermOrds.cs index 5b61c980e2..3535f6c064 100644 --- a/src/Lucene.Net/Index/DocTermOrds.cs +++ b/src/Lucene.Net/Index/DocTermOrds.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Collections.Generic; @@ -127,15 +126,15 @@ public class DocTermOrds /// /// Don't uninvert terms that exceed this count. - protected readonly int m_maxTermDocFreq; + protected readonly int m_maxTermDocFreq; /// /// Field we are uninverting. - protected readonly string m_field; + protected readonly string m_field; /// /// Number of terms in the field. - protected int m_numTermsInField; + protected int m_numTermsInField; /// /// Total number of references to term numbers. @@ -145,7 +144,7 @@ public class DocTermOrds /// /// Total time to uninvert the field. - protected int m_total_time; + protected int m_total_time; /// /// Time for phase1 of the uninvert process. @@ -176,7 +175,7 @@ public class DocTermOrds /// /// Ordinal of the first term in the field, or 0 if the - /// does not implement + /// does not implement /// . /// protected int m_ordBase; @@ -471,7 +470,7 @@ protected virtual void Uninvert(AtomicReader reader, IBits liveDocs, BytesRef te { // index into byte array (actually the end of // the doc-specific byte[] when building) - int pos = val.TripleShift(8); + int pos = val >>> 8; int ilen = VInt32Size(delta); var arr = bytes[doc]; int newend = pos + ilen; @@ -538,7 +537,7 @@ protected virtual void Uninvert(AtomicReader reader, IBits liveDocs, BytesRef te for (int j = 0; j < ipos; j++) { tempArr[j] = (sbyte)val; - val = val.TripleShift(8); + val >>>= 8; } // point at the end index in the byte[] index[doc] = (endPos << 8) | 1; @@ -602,7 +601,7 @@ protected virtual void Uninvert(AtomicReader reader, IBits liveDocs, BytesRef te int val = index[doc]; if ((val & 0xff) == 1) { - int len = val.TripleShift(8); + int len = val >>> 8; //System.out.println(" ptr pos=" + pos); index[doc] = (pos << 8) | 1; // change index to point to start of array if ((pos & 0xff000000) != 0) @@ -676,7 +675,7 @@ protected virtual void Uninvert(AtomicReader reader, IBits liveDocs, BytesRef te } /// - /// Number of bytes to represent an unsigned int as a vint. + /// Number of bytes to represent an unsigned int as a vint. /// /// NOTE: This was vIntSize() in Lucene /// @@ -708,22 +707,22 @@ private static int VInt32Size(int x) /// private static int WriteInt32(int x, sbyte[] arr, int pos) { - var a = x.TripleShift(7 * 4); + var a = x >>> (7 * 4); if (a != 0) { arr[pos++] = (sbyte)(a | 0x80); } - a = x.TripleShift(7 * 3); + a = x >>> (7 * 3); if (a != 0) { arr[pos++] = (sbyte)(a | 0x80); } - a = x.TripleShift(7 * 2); + a = x >>> (7 * 2); if (a != 0) { arr[pos++] = (sbyte)(a | 0x80); } - a = x.TripleShift(7 * 1); + a = x >>> (7 * 1); if (a != 0) { arr[pos++] = (sbyte)(a | 0x80); @@ -874,7 +873,7 @@ public override void SeekExact(long targetOrd) //System.out.println(" seek(ord) targetOrd=" + targetOrd + " delta=" + delta + " ord=" + ord + " ii=" + indexInterval); if (delta < 0 || delta > outerInstance.indexInterval) { - int idx = (int)targetOrd.TripleShift(outerInstance.indexIntervalBits); + int idx = (int)(targetOrd >>> outerInstance.indexIntervalBits); BytesRef @base = outerInstance.m_indexedTermsArray[idx]; //System.out.println(" do seek term=" + base.utf8ToString()); ord = idx << outerInstance.indexIntervalBits; @@ -1006,7 +1005,7 @@ internal virtual int Read(int[] buffer) //System.out.println(" tnum=" + tnum); delta = 0; } - code = code.TripleShift(8); + code >>>= 8; } } else @@ -1050,9 +1049,9 @@ public override void SetDocument(int docID) if ((code & 0xff) == 1) { // a pointer - upto = code.TripleShift(8); + upto = code >>> 8; //System.out.println(" pointer! upto=" + upto); - int whichArray = (docID.TripleShift(16)) & 0xff; + int whichArray = (docID >>> 16) & 0xff; arr = outerInstance.m_tnums[whichArray]; } else @@ -1115,4 +1114,4 @@ public override TermsEnum GetTermsEnum() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs b/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs index 3197ece859..3fd3db8889 100644 --- a/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs +++ b/src/Lucene.Net/Index/FreqProxTermsWriterPerField.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using J2N.Text; +using J2N.Text; using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Diagnostics; using Lucene.Net.Support; @@ -542,7 +541,7 @@ internal void Flush(string fieldName, FieldsConsumer consumer, SegmentWriteState } else { - docID += code.TripleShift(1); + docID += code >>> 1; if ((code & 1) != 0) { termFreq = 1; @@ -608,7 +607,7 @@ internal void Flush(string fieldName, FieldsConsumer consumer, SegmentWriteState if (readPositions) { int code = prox.ReadVInt32(); - position += code.TripleShift(1); + position += code >>> 1; if ((code & 1) != 0) { @@ -669,4 +668,4 @@ internal void Flush(string fieldName, FieldsConsumer consumer, SegmentWriteState termsConsumer.Finish(writeTermFreq ? sumTotalTermFreq : -1, sumDocFreq, visitedDocs.Cardinality); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/PrefixCodedTerms.cs b/src/Lucene.Net/Index/PrefixCodedTerms.cs index c4b4ec6e88..f3ba1b0615 100644 --- a/src/Lucene.Net/Index/PrefixCodedTerms.cs +++ b/src/Lucene.Net/Index/PrefixCodedTerms.cs @@ -1,9 +1,7 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Collections; using System.Collections.Generic; -using System.IO; namespace Lucene.Net.Index { @@ -114,7 +112,7 @@ public virtual bool MoveNext() { field = input.ReadString(); } - int prefix = code.TripleShift(1); + int prefix = code >>> 1; int suffix = input.ReadVInt32(); bytes.Grow(prefix + suffix); input.ReadBytes(bytes.Bytes, prefix, suffix); @@ -213,4 +211,4 @@ private static int SharedPrefix(BytesRef term1, BytesRef term2) // LUCENENET: CA } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/ReaderUtil.cs b/src/Lucene.Net/Index/ReaderUtil.cs index 6426498c1e..fb8aa6dc19 100644 --- a/src/Lucene.Net/Index/ReaderUtil.cs +++ b/src/Lucene.Net/Index/ReaderUtil.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System.Collections.Generic; +using System.Collections.Generic; namespace Lucene.Net.Index { @@ -56,7 +55,7 @@ public static int SubIndex(int n, int[] docStarts) // find int hi = size - 1; // for first element less than n, return its index while (hi >= lo) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midValue = docStarts[mid]; if (n < midValue) { @@ -90,7 +89,7 @@ public static int SubIndex(int n, IList leaves) // find int hi = size - 1; // for first element less than n, return its index while (hi >= lo) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midValue = leaves[mid].DocBase; if (n < midValue) { @@ -112,4 +111,4 @@ public static int SubIndex(int n, IList leaves) // find return hi; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/SortedDocValues.cs b/src/Lucene.Net/Index/SortedDocValues.cs index ed21a45cb5..0a07e62015 100644 --- a/src/Lucene.Net/Index/SortedDocValues.cs +++ b/src/Lucene.Net/Index/SortedDocValues.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; - -namespace Lucene.Net.Index +namespace Lucene.Net.Index { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -77,7 +75,7 @@ public override void Get(int docID, BytesRef result) /// /// If exists, returns its ordinal, else - /// returns -insertionPoint-1, like + /// returns -insertionPoint-1, like /// /// /// Key to look up @@ -89,7 +87,7 @@ public virtual int LookupTerm(BytesRef key) while (low <= high) { - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; LookupOrd(mid, spare); int cmp = spare.CompareTo(key); @@ -119,4 +117,4 @@ public virtual TermsEnum GetTermsEnum() return new SortedDocValuesTermsEnum(this); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/SortedSetDocValues.cs b/src/Lucene.Net/Index/SortedSetDocValues.cs index b1ce6d0974..0c775f2eb2 100644 --- a/src/Lucene.Net/Index/SortedSetDocValues.cs +++ b/src/Lucene.Net/Index/SortedSetDocValues.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; - -namespace Lucene.Net.Index +namespace Lucene.Net.Index { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -85,7 +83,7 @@ public virtual long LookupTerm(BytesRef key) while (low <= high) { - long mid = (low + high).TripleShift(1); + long mid = (low + high) >>> 1; LookupOrd(mid, spare); int cmp = spare.CompareTo(key); @@ -115,4 +113,4 @@ public virtual TermsEnum GetTermsEnum() return new SortedSetDocValuesTermsEnum(this); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/TermsHashPerField.cs b/src/Lucene.Net/Index/TermsHashPerField.cs index bcada27def..dbd60285e8 100644 --- a/src/Lucene.Net/Index/TermsHashPerField.cs +++ b/src/Lucene.Net/Index/TermsHashPerField.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Analysis.TokenAttributes; +using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Diagnostics; using System; using System.Collections.Generic; @@ -319,7 +318,7 @@ internal void WriteVInt32(int stream, int i) while ((i & ~0x7F) != 0) { WriteByte(stream, (byte)((i & 0x7f) | 0x80)); - i = i.TripleShift(7); + i >>>= 7; } WriteByte(stream, (byte)i); } @@ -379,4 +378,4 @@ public override Counter BytesUsed() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs b/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs index f1e0d70492..820abba147 100644 --- a/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs +++ b/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Text; @@ -188,7 +187,7 @@ public override sealed int GetHashCode() { int h = field.GetHashCode(); h ^= (lowerVal != null) ? lowerVal.GetHashCode() : 550356204; - h = (h << 1) | (h.TripleShift(31)); // rotate to distinguish lower from upper + h = (h << 1) | (h >>> 31); // rotate to distinguish lower from upper h ^= (upperVal != null) ? upperVal.GetHashCode() : -1674416163; h ^= (includeLower ? 1549299360 : -365038026) ^ (includeUpper ? 1721088258 : 1948649653); return h; @@ -214,4 +213,4 @@ public override sealed int GetHashCode() /// Returns the upper value of this range filter public virtual BytesRef UpperVal => upperVal; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs index f1f4517827..3e58ac3b26 100644 --- a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs +++ b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Text; using JCG = J2N.Collections.Generic; @@ -780,7 +779,7 @@ public override sealed int GetHashCode() { int h = field.GetHashCode(); h ^= (lowerVal != null) ? lowerVal.GetHashCode() : 550356204; - h = (h << 1) | (h.TripleShift(31)); // rotate to distinguish lower from upper + h = (h << 1) | (h >>> 31); // rotate to distinguish lower from upper h ^= (upperVal != null) ? upperVal.GetHashCode() : -1674416163; h ^= (parser != null) ? parser.GetHashCode() : -1572457324; h ^= (includeLower ? 1549299360 : -365038026) ^ (includeUpper ? 1721088258 : 1948649653); @@ -811,4 +810,4 @@ public override sealed int GetHashCode() /// Returns the current numeric parser (null for is ) public virtual FieldCache.IParser Parser => parser; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs b/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs index 63834ae84e..ccad612a48 100644 --- a/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Util; using System.Text; @@ -98,9 +97,9 @@ public override bool Equals(object o) public override int GetHashCode() { int h = m_match.GetHashCode(); - h ^= (h << 8) | (h.TripleShift(25)); // reversible + h ^= (h << 8) | (h >>> 25); // reversible h ^= J2N.BitConversion.SingleToRawInt32Bits(Boost) ^ m_end; return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs index 11363afaba..1e6e91ab07 100644 --- a/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using Lucene.Net.Util; using System.Collections; using System.Collections.Generic; @@ -140,11 +139,11 @@ public override bool Equals(object o) public override int GetHashCode() { int h = m_match.GetHashCode(); - h ^= (h << 8) | (h.TripleShift(25)); // reversible + h ^= (h << 8) | (h >>> 25); // reversible //TODO: is this right? h ^= payloadEqualityComparer.GetHashCode(m_payloadToMatch); // LUCENENET NOTE: Need to use the structural equality comparer to compare equality of all contained values h ^= J2N.BitConversion.SingleToRawInt32Bits(Boost); return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs index dcc3aa5ea2..f14e8c5f5e 100644 --- a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Util; using System; using System.Collections.Generic; @@ -221,11 +220,11 @@ public override int GetHashCode() // Mix bits before folding in things like boost, since it could cancel the // last element of clauses. this particular mix also serves to // differentiate SpanNearQuery hashcodes from others. - result ^= (result << 14) | (result.TripleShift(19)); // reversible + result ^= (result << 14) | (result >>> 19); // reversible result += J2N.BitConversion.SingleToRawInt32Bits(Boost); result += m_slop; result ^= (m_inOrder ? unchecked((int)0x99AFD3BD) : 0); return result; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs index 9753f5f2ec..739a66c4ed 100644 --- a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Util; using System; using System.Collections.Generic; @@ -172,7 +171,7 @@ public override int GetHashCode() { //If this doesn't work, hash all elemnts together instead. This version was used to reduce time complexity int h = clauses.GetHashCode(); - h ^= (h << 10) | (h.TripleShift(23)); + h ^= (h << 10) | (h >>> 23); h ^= J2N.BitConversion.SingleToRawInt32Bits(Boost); return h; } @@ -338,4 +337,4 @@ public override long GetCost() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs index de2972e1a7..5abc4e5baa 100644 --- a/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs @@ -3,7 +3,6 @@ using System; using System.Text; using System.Collections; -using J2N.Numerics; using Lucene.Net.Util; namespace Lucene.Net.Search.Spans @@ -144,11 +143,11 @@ public override bool Equals(object o) public override int GetHashCode() { int h = m_match.GetHashCode(); - h ^= (h << 8) | (h.TripleShift(25)); // reversible + h ^= (h << 8) | (h >>> 25); // reversible //TODO: is this right? h ^= payloadEqualityComparer.GetHashCode(m_payloadToMatch); // LUCENENET NOTE: Need to use the structural equality comparer to compare equality of all contained values h ^= J2N.BitConversion.SingleToRawInt32Bits(Boost); return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs b/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs index 6b838c5b44..bec513c918 100644 --- a/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Util; using System.Text; @@ -103,9 +102,9 @@ public override bool Equals(object o) public override int GetHashCode() { int h = m_match.GetHashCode(); - h ^= (h << 8) | (h.TripleShift(25)); // reversible + h ^= (h << 8) | (h >>> 25); // reversible h ^= J2N.BitConversion.SingleToRawInt32Bits(Boost) ^ m_end ^ m_start; return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/ByteBufferIndexInput.cs b/src/Lucene.Net/Store/ByteBufferIndexInput.cs index 1346b833a8..3be542a61f 100644 --- a/src/Lucene.Net/Store/ByteBufferIndexInput.cs +++ b/src/Lucene.Net/Store/ByteBufferIndexInput.cs @@ -1,8 +1,6 @@ using J2N.IO; -using J2N.Numerics; using Lucene.Net.Diagnostics; using System; -using System.IO; using System.Runtime.CompilerServices; namespace Lucene.Net.Store @@ -89,7 +87,7 @@ private protected ByteBufferIndexInput(string resourceDescription, ByteBuffer[] if (Debugging.AssertsEnabled) { Debugging.Assert(chunkSizePower >= 0 && chunkSizePower <= 30); - Debugging.Assert(length.TripleShift(chunkSizePower) < int.MaxValue); + Debugging.Assert((length >>> chunkSizePower) < int.MaxValue); } // LUCENENET specific: MMapIndexInput calls SetBuffers() to populate @@ -236,7 +234,7 @@ public override sealed void Seek(long pos) // when reading from buffers. if (bi < 0 || bi >= buffers.Length) throw EOFException.Create("seek past EOF: " + this); - + ByteBuffer b = buffers[bi]; int newPosition = (int)(pos & chunkSizeMask); @@ -341,8 +339,8 @@ private ByteBuffer[] BuildSlice(ByteBuffer[] buffers, long offset, long length) { long sliceEnd = offset + length; - int startIndex = (int)(offset.TripleShift(chunkSizePower)); - int endIndex = (int)(sliceEnd.TripleShift(chunkSizePower)); + int startIndex = (int)(offset >>> chunkSizePower); + int endIndex = (int)(sliceEnd >>> chunkSizePower); // we always allocate one more slice, the last one may be a 0 byte one ByteBuffer[] slices = new ByteBuffer[endIndex - startIndex + 1]; @@ -365,7 +363,7 @@ private void UnsetBuffers() curBufIndex = 0; } - // LUCENENET specific - rather than using all of this exception catching nonsense + // LUCENENET specific - rather than using all of this exception catching nonsense // for control flow, we check whether we are disposed first. private void EnsureOpen() { @@ -442,4 +440,4 @@ public override sealed string ToString() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/CompoundFileDirectory.cs b/src/Lucene.Net/Store/CompoundFileDirectory.cs index 72d25082b7..562eb8eaf4 100644 --- a/src/Lucene.Net/Store/CompoundFileDirectory.cs +++ b/src/Lucene.Net/Store/CompoundFileDirectory.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Support; using Lucene.Net.Support.Threading; @@ -132,9 +131,9 @@ public CompoundFileDirectory(Directory directory, string fileName, IOContext con } // LUCENENET NOTE: These MUST be sbyte because they can be negative - private static readonly sbyte CODEC_MAGIC_BYTE1 = (sbyte)CodecUtil.CODEC_MAGIC.TripleShift(24); - private static readonly sbyte CODEC_MAGIC_BYTE2 = (sbyte)CodecUtil.CODEC_MAGIC.TripleShift(16); - private static readonly sbyte CODEC_MAGIC_BYTE3 = (sbyte)CodecUtil.CODEC_MAGIC.TripleShift(8); + private static readonly sbyte CODEC_MAGIC_BYTE1 = (sbyte)(CodecUtil.CODEC_MAGIC >>> 24); + private static readonly sbyte CODEC_MAGIC_BYTE2 = (sbyte)(CodecUtil.CODEC_MAGIC >>> 16); + private static readonly sbyte CODEC_MAGIC_BYTE3 = (sbyte)(CodecUtil.CODEC_MAGIC >>> 8); private static readonly sbyte CODEC_MAGIC_BYTE4 = (sbyte)CodecUtil.CODEC_MAGIC; /// @@ -166,7 +165,7 @@ private static IDictionary ReadEntries(IndexInputSlicer handl } int version = CodecUtil.CheckHeaderNoMagic(stream, CompoundFileWriter.DATA_CODEC, CompoundFileWriter.VERSION_START, CompoundFileWriter.VERSION_CURRENT); string entriesFileName = IndexFileNames.SegmentFileName( - IndexFileNames.StripExtension(name), "", + IndexFileNames.StripExtension(name), "", IndexFileNames.COMPOUND_FILE_ENTRIES_EXTENSION); entriesStream = dir.OpenChecksumInput(entriesFileName, IOContext.READ_ONCE); CodecUtil.CheckHeader(entriesStream, CompoundFileWriter.ENTRY_CODEC, CompoundFileWriter.VERSION_START, CompoundFileWriter.VERSION_CURRENT); @@ -223,7 +222,7 @@ private static IDictionary ReadLegacyEntries(IndexInput strea { if (firstInt < CompoundFileWriter.FORMAT_NO_SEGMENT_PREFIX) { - throw new CorruptIndexException("Incompatible format version: " + throw new CorruptIndexException("Incompatible format version: " + firstInt + " expected >= " + CompoundFileWriter.FORMAT_NO_SEGMENT_PREFIX + " (resource: " + stream + ")"); } // It's a post-3.1 index, read the count. @@ -432,8 +431,8 @@ public override IndexInputSlicer CreateSlicer(string name, IOContext context) string id = IndexFileNames.StripSegmentName(name); if (!entries.TryGetValue(id, out FileEntry entry) || entry is null) { - throw new FileNotFoundException("No sub-file with id " + id + - " found (fileName=" + name + " files: " + + throw new FileNotFoundException("No sub-file with id " + id + + " found (fileName=" + name + " files: " + string.Format(J2N.Text.StringFormatter.InvariantCulture, "{0}", entries.Keys) + ")"); } return new IndexInputSlicerAnonymousClass(this, entry); @@ -473,4 +472,4 @@ public override string ToString() return "CompoundFileDirectory(file=\"" + fileName + "\" in dir=" + directory + ")"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/DataOutput.cs b/src/Lucene.Net/Store/DataOutput.cs index a48b6a1e42..331bf93b05 100644 --- a/src/Lucene.Net/Store/DataOutput.cs +++ b/src/Lucene.Net/Store/DataOutput.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System.Collections.Generic; using System.IO; @@ -80,7 +79,7 @@ public virtual void WriteInt32(int i) } /// - /// Writes a short as two bytes. + /// Writes a short as two bytes. /// /// NOTE: this was writeShort() in Lucene /// @@ -187,7 +186,7 @@ public virtual void WriteInt16(short i) /// /// /// - /// + /// /// this provides compression while still being efficient to decode. /// /// NOTE: this was writeVInt() in Lucene @@ -201,7 +200,7 @@ public void WriteVInt32(int i) while ((i & ~0x7F) != 0) { WriteByte((byte)((i & 0x7F) | 0x80)); - i = i.TripleShift(7); + i >>>= 7; } WriteByte((byte)i); } @@ -225,7 +224,7 @@ public virtual void WriteInt64(long i) /// bytes. Smaller values take fewer bytes. Negative numbers are not /// supported. /// - /// The format is described further in . + /// The format is described further in . /// /// NOTE: this was writeVLong() in Lucene /// @@ -236,7 +235,7 @@ public void WriteVInt64(long i) while ((i & ~0x7FL) != 0L) { WriteByte((byte)((i & 0x7FL) | 0x80L)); - i = i.TripleShift(7); + i >>>= 7; } WriteByte((byte)i); } @@ -335,4 +334,4 @@ public virtual void WriteStringSet(ISet set) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/FlushInfo.cs b/src/Lucene.Net/Store/FlushInfo.cs index 9605033f68..7835b7cb63 100644 --- a/src/Lucene.Net/Store/FlushInfo.cs +++ b/src/Lucene.Net/Store/FlushInfo.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; - -namespace Lucene.Net.Store +namespace Lucene.Net.Store { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,7 +43,7 @@ public override int GetHashCode() { const int prime = 31; int result = 1; - result = prime * result + (int)(EstimatedSegmentSize ^ (EstimatedSegmentSize.TripleShift(32))); + result = prime * result + (int)(EstimatedSegmentSize ^ (EstimatedSegmentSize >>> 32)); result = prime * result + NumDocs; return result; } @@ -81,4 +79,4 @@ public override string ToString() return "FlushInfo [numDocs=" + NumDocs + ", estimatedSegmentSize=" + EstimatedSegmentSize + "]"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/MMapDirectory.cs b/src/Lucene.Net/Store/MMapDirectory.cs index ea5e6a0f9d..59e1cccf88 100644 --- a/src/Lucene.Net/Store/MMapDirectory.cs +++ b/src/Lucene.Net/Store/MMapDirectory.cs @@ -292,7 +292,7 @@ protected override void FreeBuffer(ByteBuffer buffer) /// Maps a file into a set of buffers internal virtual ByteBuffer[] Map(MMapIndexInput input, FileStream fc, long offset, long length) { - if (length.TripleShift(chunkSizePower) >= int.MaxValue) + if ((length >>> chunkSizePower) >= int.MaxValue) throw new ArgumentException("RandomAccessFile too big for chunk size: " + fc.ToString()); // LUCENENET specific: Return empty buffer if length is 0, rather than attempting to create a MemoryMappedFile. @@ -305,21 +305,21 @@ internal virtual ByteBuffer[] Map(MMapIndexInput input, FileStream fc, long offs long chunkSize = 1L << chunkSizePower; // we always allocate one more buffer, the last one may be a 0 byte one - int nrBuffers = (int)length.TripleShift(chunkSizePower) + 1; + int nrBuffers = (int)(length >>> chunkSizePower) + 1; ByteBuffer[] buffers = new ByteBuffer[nrBuffers]; if (input.memoryMappedFile is null) { input.memoryMappedFile = MemoryMappedFile.CreateFromFile( - fileStream: fc, - mapName: null, - capacity: length, + fileStream: fc, + mapName: null, + capacity: length, access: MemoryMappedFileAccess.Read, #if FEATURE_MEMORYMAPPEDFILESECURITY memoryMappedFileSecurity: null, #endif - inheritability: HandleInheritability.Inheritable, + inheritability: HandleInheritability.Inheritable, leaveOpen: true); // LUCENENET: We explicitly dispose the FileStream separately. } @@ -347,4 +347,4 @@ internal virtual ByteBuffer[] Map(MMapIndexInput input, FileStream fc, long offs return buffers; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/MergeInfo.cs b/src/Lucene.Net/Store/MergeInfo.cs index 9be3d620f4..5d95aca276 100644 --- a/src/Lucene.Net/Store/MergeInfo.cs +++ b/src/Lucene.Net/Store/MergeInfo.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; - -namespace Lucene.Net.Store +namespace Lucene.Net.Store { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -51,8 +49,8 @@ public override int GetHashCode() { const int prime = 31; int result = 1; - result = prime * result - + (int)(EstimatedMergeBytes ^ (EstimatedMergeBytes.TripleShift(32))); + result = prime * result + + (int)(EstimatedMergeBytes ^ (EstimatedMergeBytes >>> 32)); result = prime * result + (IsExternal ? 1231 : 1237); result = prime * result + MergeMaxNumSegments; result = prime * result + TotalDocCount; @@ -95,9 +93,9 @@ public override bool Equals(object obj) public override string ToString() { - return "MergeInfo [totalDocCount=" + TotalDocCount - + ", estimatedMergeBytes=" + EstimatedMergeBytes + ", isExternal=" + return "MergeInfo [totalDocCount=" + TotalDocCount + + ", estimatedMergeBytes=" + EstimatedMergeBytes + ", isExternal=" + IsExternal + ", mergeMaxNumSegments=" + MergeMaxNumSegments + "]"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Automaton/SpecialOperations.cs b/src/Lucene.Net/Util/Automaton/SpecialOperations.cs index 1d8b8cb3ac..860d9bfc2b 100644 --- a/src/Lucene.Net/Util/Automaton/SpecialOperations.cs +++ b/src/Lucene.Net/Util/Automaton/SpecialOperations.cs @@ -1,5 +1,4 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using J2N.Text; using System.Collections.Generic; using System.Linq; @@ -58,7 +57,7 @@ internal static int FindIndex(int c, int[] points) int b = points.Length; while (b - a > 1) { - int d = (a + b).TripleShift(1); + int d = (a + b) >>> 1; if (points[d] > c) { b = d; @@ -339,4 +338,4 @@ private static bool GetFiniteStrings(State s, JCG.HashSet pathstates, JCG return true; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/BroadWord.cs b/src/Lucene.Net/Util/BroadWord.cs index 3ae1823e93..68401c32d4 100644 --- a/src/Lucene.Net/Util/BroadWord.cs +++ b/src/Lucene.Net/Util/BroadWord.cs @@ -46,13 +46,13 @@ public static class BroadWord // LUCENENET specific - made static internal static int BitCount(long x) { // Step 0 leaves in each pair of bits the number of ones originally contained in that pair: - x = x - ((x & unchecked((long)0xAAAAAAAAAAAAAAAAL)).TripleShift(1)); + x = x - ((x & unchecked((long)0xAAAAAAAAAAAAAAAAL)) >>> 1); // Step 1, idem for each nibble: - x = (x & 0x3333333333333333L) + ((x.TripleShift(2)) & 0x3333333333333333L); + x = (x & 0x3333333333333333L) + ((x >>> 2) & 0x3333333333333333L); // Step 2, idem for each byte: - x = (x + (x.TripleShift(4))) & 0x0F0F0F0F0F0F0F0FL; + x = (x + (x >>> 4)) & 0x0F0F0F0F0F0F0F0FL; // Multiply to sum them all into the high byte, and return the high byte: - return (int)((x * L8_L).TripleShift(56)); + return (int)((x * L8_L) >>> 56); } /// @@ -60,29 +60,29 @@ internal static int BitCount(long x) /// The index of the r-th 1 bit in x, or if no such bit exists, 72. public static int Select(long x, int r) { - long s = x - ((x & unchecked((long)0xAAAAAAAAAAAAAAAAL)).TripleShift(1)); // Step 0, pairwise bitsums + long s = x - ((x & unchecked((long)0xAAAAAAAAAAAAAAAAL)) >>> 1); // Step 0, pairwise bitsums // Correct a small mistake in algorithm 2: // Use s instead of x the second time in right shift 2, compare to Algorithm 1 in rank9 above. - s = (s & 0x3333333333333333L) + ((s.TripleShift(2)) & 0x3333333333333333L); // Step 1, nibblewise bitsums + s = (s & 0x3333333333333333L) + ((s >>> 2) & 0x3333333333333333L); // Step 1, nibblewise bitsums - s = ((s + (s.TripleShift(4))) & 0x0F0F0F0F0F0F0F0FL) * L8_L; // Step 2, bytewise bitsums + s = ((s + (s >>> 4)) & 0x0F0F0F0F0F0F0F0FL) * L8_L; // Step 2, bytewise bitsums - long b = ((SmallerUpTo7_8(s, (r * L8_L)).TripleShift(7)) * L8_L).TripleShift(53); // & (~7L); // Step 3, side ways addition for byte number times 8 + long b = ((SmallerUpTo7_8(s, (r * L8_L)) >>> 7) * L8_L) >>> 53; // & (~7L); // Step 3, side ways addition for byte number times 8 - long l = r - (((s << 8).TripleShift((int)b)) & 0xFFL); // Step 4, byte wise rank, subtract the rank with byte at b-8, or zero for b=0; + long l = r - (((s << 8) >>> (int)b) & 0xFFL); // Step 4, byte wise rank, subtract the rank with byte at b-8, or zero for b=0; if (Debugging.AssertsEnabled) Debugging.Assert(0L <= 1, "{0}", l); //assert l < 8 : l; //fails when bit r is not available. // Select bit l from byte (x >>> b): - long spr = (((x.TripleShift((int)b)) & 0xFFL) * L8_L) & L9_L; // spread the 8 bits of the byte at b over the long at L9 positions + long spr = (((x >>> (int)b) & 0xFFL) * L8_L) & L9_L; // spread the 8 bits of the byte at b over the long at L9 positions // long spr_bigger8_zero = smaller8(0L, spr); // inlined smaller8 with 0L argument: // FIXME: replace by biggerequal8_one formula from article page 6, line 9. four operators instead of five here. long spr_bigger8_zero = ((H8_L - (spr & (~H8_L))) ^ (~spr)) & H8_L; - s = (spr_bigger8_zero.TripleShift(7)) * L8_L; // Step 5, sideways byte add the 8 bits towards the high byte + s = (spr_bigger8_zero >>> 7) * L8_L; // Step 5, sideways byte add the 8 bits towards the high byte - int res = (int)(b + (((SmallerUpTo7_8(s, (l * L8_L)).TripleShift(7)) * L8_L).TripleShift(56))); // Step 6 + int res = (int)(b + (((SmallerUpTo7_8(s, (l * L8_L)) >>> 7) * L8_L) >>> 56)); // Step 6 return res; } @@ -159,7 +159,7 @@ public static int SelectNaive(long x, int r) while ((x != 0L) && (r > 0)) { int ntz = x.TrailingZeroCount(); - x = x.TripleShift(ntz + 1); + x >>>= (ntz + 1); s += (ntz + 1); r -= 1; } @@ -167,4 +167,4 @@ public static int SelectNaive(long x, int r) return res; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/ByteBlockPool.cs b/src/Lucene.Net/Util/ByteBlockPool.cs index e11c134060..898eaf077a 100644 --- a/src/Lucene.Net/Util/ByteBlockPool.cs +++ b/src/Lucene.Net/Util/ByteBlockPool.cs @@ -1,8 +1,6 @@ using J2N.Collections.Generic.Extensions; -using J2N.Numerics; using Lucene.Net.Diagnostics; using Lucene.Net.Support; -using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -331,9 +329,9 @@ public int AllocSlice(byte[] slice, int upto) buffer[newUpto + 2] = slice[upto - 1]; // Write forwarding address at end of last slice: - slice[upto - 3] = (byte)offset.TripleShift(24); - slice[upto - 2] = (byte)offset.TripleShift(16); - slice[upto - 1] = (byte)offset.TripleShift(8); + slice[upto - 3] = (byte)(offset >>> 24); + slice[upto - 2] = (byte)(offset >>> 16); + slice[upto - 1] = (byte)(offset >>> 8); slice[upto] = (byte)offset; // Write new level: @@ -436,4 +434,4 @@ public void ReadBytes(long offset, byte[] bytes, int off, int length) } while (true); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/FixedBitSet.cs b/src/Lucene.Net/Util/FixedBitSet.cs index d564ee87d1..9ae368bd92 100644 --- a/src/Lucene.Net/Util/FixedBitSet.cs +++ b/src/Lucene.Net/Util/FixedBitSet.cs @@ -157,7 +157,7 @@ public static FixedBitSet EnsureCapacity(FixedBitSet bits, int numBits) /// Returns the number of 64 bit words it would take to hold public static int Bits2words(int numBits) { - int numLong = numBits.TripleShift(6); + int numLong = numBits >>> 6; if ((numBits & 63) != 0) { numLong++; @@ -602,7 +602,7 @@ public void Flip(int startIndex, int endIndex) */ long startmask = -1L << startIndex; - long endmask = (-1L).TripleShift(-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { @@ -641,7 +641,7 @@ public void Set(int startIndex, int endIndex) int endWord = (endIndex - 1) >> 6; long startmask = -1L << startIndex; - long endmask = (-1L).TripleShift(-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { @@ -728,11 +728,11 @@ public override int GetHashCode() for (int i = numWords; --i >= 0; ) { h ^= bits[i]; - h = (h << 1) | (h.TripleShift(63)); // rotate left + h = (h << 1) | (h >>> 63); // rotate left } // fold leftmost bits into right and add a constant to prevent // empty sets from returning 0, which is too common. return (int)((h >> 32) ^ h) + unchecked((int)0x98761234); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Fst/FST.cs b/src/Lucene.Net/Util/Fst/FST.cs index 2b9661d0ed..551f65c7db 100644 --- a/src/Lucene.Net/Util/Fst/FST.cs +++ b/src/Lucene.Net/Util/Fst/FST.cs @@ -1,7 +1,5 @@ using J2N.Collections; -using J2N.Numerics; using Lucene.Net.Diagnostics; -using Lucene.Net.Support; using System; using System.Buffers; using System.Collections.Generic; @@ -1359,7 +1357,7 @@ public FST.Arc FindTargetArc(int labelToMatch, FST.Arc follow, FST.Arc while (low <= high) { //System.out.println(" cycle"); - int mid = (low + high).TripleShift(1); + int mid = (low + high) >>> 1; @in.Position = arc.PosArcsStart; @in.SkipBytes(arc.BytesPerArc * mid + 1); int midLabel = ReadLabel(@in); diff --git a/src/Lucene.Net/Util/Fst/FSTEnum.cs b/src/Lucene.Net/Util/Fst/FSTEnum.cs index 8c88fa3056..ce640c697e 100644 --- a/src/Lucene.Net/Util/Fst/FSTEnum.cs +++ b/src/Lucene.Net/Util/Fst/FSTEnum.cs @@ -1,7 +1,5 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; -using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Fst @@ -175,7 +173,7 @@ protected virtual void DoSeekCeil() bool found = false; while (low <= high) { - mid = (low + high).TripleShift(1); + mid = (low + high) >>> 1; @in.Position = arc.PosArcsStart; @in.SkipBytes(arc.BytesPerArc * mid + 1); int midLabel = m_fst.ReadLabel(@in); @@ -348,7 +346,7 @@ protected virtual void DoSeekFloor() bool found = false; while (low <= high) { - mid = (low + high).TripleShift(1); + mid = (low + high) >>> 1; @in.Position = arc.PosArcsStart; @in.SkipBytes(arc.BytesPerArc * mid + 1); int midLabel = m_fst.ReadLabel(@in); @@ -641,4 +639,4 @@ private FST.Arc GetArc(int idx) return m_arcs[idx]; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Fst/Util.cs b/src/Lucene.Net/Util/Fst/Util.cs index 313e0d1429..489250014f 100644 --- a/src/Lucene.Net/Util/Fst/Util.cs +++ b/src/Lucene.Net/Util/Fst/Util.cs @@ -1,9 +1,7 @@ using J2N; -using J2N.Numerics; using J2N.Text; using Lucene.Net.Diagnostics; using Lucene.Net.Support; -using Lucene.Net.Support.Threading; using System; using System.Collections.Generic; using System.Globalization; @@ -185,7 +183,7 @@ public static Int32sRef GetByOutput(FST fst, long targetOutput, FST.Bytes bool exact = false; while (low <= high) { - mid = (low + high).TripleShift(1); + mid = (low + high) >>> 1; @in.Position = arc.PosArcsStart; @in.SkipBytes(arc.BytesPerArc * mid); var flags = (sbyte)@in.ReadByte(); @@ -947,11 +945,11 @@ public static void ToDot(FST fst, TextWriter @out, bool sameRank, bool lab [MethodImpl(MethodImplOptions.AggressiveInlining)] private static void EmitDotState(TextWriter @out, string name, string shape, string color, string label) { - @out.Write(" " + name - + " [" - + (shape != null ? "shape=" + shape : "") + " " - + (color != null ? "color=" + color : "") + " " - + (label != null ? "label=\"" + label + "\"" : "label=\"\"") + " " + @out.Write(" " + name + + " [" + + (shape != null ? "shape=" + shape : "") + " " + + (color != null ? "color=" + color : "") + " " + + (label != null ? "label=\"" + label + "\"" : "label=\"\"") + " " + "]\n"); } @@ -1130,7 +1128,7 @@ public static FST.Arc ReadCeilArc(int label, FST fst, FST.Arc follow // " targetLabel=" + targetLabel); while (low <= high) { - mid = (low + high).TripleShift(1); + mid = (low + high) >>> 1; @in.Position = arc.PosArcsStart; @in.SkipBytes(arc.BytesPerArc * mid + 1); int midLabel = fst.ReadLabel(@in); @@ -1186,4 +1184,4 @@ public static FST.Arc ReadCeilArc(int label, FST fst, FST.Arc follow } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/InPlaceMergeSorter.cs b/src/Lucene.Net/Util/InPlaceMergeSorter.cs index 5f414df7dc..6dafda5d27 100644 --- a/src/Lucene.Net/Util/InPlaceMergeSorter.cs +++ b/src/Lucene.Net/Util/InPlaceMergeSorter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace Lucene.Net.Util { @@ -54,11 +53,11 @@ internal virtual void MergeSort(int from, int to) } else { - int mid = (from + to).TripleShift(1); + int mid = (from + to) >>> 1; MergeSort(from, mid); MergeSort(mid, to); MergeInPlace(from, mid, to); } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/IndexableBinaryStringTools.cs b/src/Lucene.Net/Util/IndexableBinaryStringTools.cs index d986709130..68e8f5c122 100644 --- a/src/Lucene.Net/Util/IndexableBinaryStringTools.cs +++ b/src/Lucene.Net/Util/IndexableBinaryStringTools.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Runtime.CompilerServices; @@ -39,7 +38,7 @@ namespace Lucene.Net.Util /// problem, a char is appended, indicating the number of encoded bytes in the /// final content char. /// - /// @lucene.experimental + /// @lucene.experimental /// [Obsolete("Implement Analysis.TokenAttributes.ITermToBytesRefAttribute and store bytes directly instead. this class will be removed in Lucene 5.0")] public static class IndexableBinaryStringTools // LUCENENET specific - made static @@ -160,13 +159,13 @@ public static void Encode(sbyte[] inputArray, int inputOffset, int inputLength, if (2 == codingCase.numBytes) { outputArray[outputCharNum] = (char)(((inputArray[inputByteNum] & 0xFF) << codingCase.initialShift) - + (((inputArray[inputByteNum + 1] & 0xFF).TripleShift(codingCase.finalShift)) & codingCase.finalMask) & /*(short)*/0x7FFF); // LUCENENET: Removed unnecessary cast + + (((inputArray[inputByteNum + 1] & 0xFF) >>> codingCase.finalShift) & codingCase.finalMask) & /*(short)*/0x7FFF); // LUCENENET: Removed unnecessary cast } // numBytes is 3 else { outputArray[outputCharNum] = (char)(((inputArray[inputByteNum] & 0xFF) << codingCase.initialShift) + ((inputArray[inputByteNum + 1] & 0xFF) << codingCase.middleShift) - + (((inputArray[inputByteNum + 2] & 0xFF).TripleShift(codingCase.finalShift)) & codingCase.finalMask) & /*(short)*/0x7FFF); // LUCENENET: Removed unnecessary cast + + (((inputArray[inputByteNum + 2] & 0xFF) >>> codingCase.finalShift) & codingCase.finalMask) & /*(short)*/0x7FFF); // LUCENENET: Removed unnecessary cast } inputByteNum += codingCase.advanceBytes; if (++caseNum == CODING_CASES.Length) @@ -251,18 +250,18 @@ public static void Decode(char[] inputArray, int inputOffset, int inputLength, s { if (0 == caseNum) { - outputArray[outputByteNum] = (sbyte)(inputChar.TripleShift(codingCase.initialShift)); + outputArray[outputByteNum] = (sbyte)(inputChar >>> codingCase.initialShift); } else { - outputArray[outputByteNum] += (sbyte)(inputChar.TripleShift(codingCase.initialShift)); + outputArray[outputByteNum] += (sbyte)(inputChar >>> codingCase.initialShift); } outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.finalMask) << codingCase.finalShift); } // numBytes is 3 else { - outputArray[outputByteNum] += (sbyte)(inputChar.TripleShift(codingCase.initialShift)); - outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.middleMask).TripleShift(codingCase.middleShift)); + outputArray[outputByteNum] += (sbyte)(inputChar >>> codingCase.initialShift); + outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.middleMask) >>> codingCase.middleShift); outputArray[outputByteNum + 2] = (sbyte)((inputChar & codingCase.finalMask) << codingCase.finalShift); } outputByteNum += codingCase.advanceBytes; @@ -278,17 +277,17 @@ public static void Decode(char[] inputArray, int inputOffset, int inputLength, s { outputArray[outputByteNum] = 0; } - outputArray[outputByteNum] += (sbyte)(inputChar.TripleShift(codingCase.initialShift)); + outputArray[outputByteNum] += (sbyte)(inputChar >>> codingCase.initialShift); int bytesLeft = numOutputBytes - outputByteNum; if (bytesLeft > 1) { if (2 == codingCase.numBytes) { - outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.finalMask).TripleShift(codingCase.finalShift)); + outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.finalMask) >>> codingCase.finalShift); } // numBytes is 3 else { - outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.middleMask).TripleShift(codingCase.middleShift)); + outputArray[outputByteNum + 1] = (sbyte)((inputChar & codingCase.middleMask) >>> codingCase.middleShift); if (bytesLeft > 2) { outputArray[outputByteNum + 2] = (sbyte)((inputChar & codingCase.finalMask) << codingCase.finalShift); @@ -309,7 +308,7 @@ internal CodingCase(int initialShift, int middleShift, int finalShift) this.initialShift = initialShift; this.middleShift = middleShift; this.finalShift = finalShift; - this.finalMask = /*(short)*/((short)0xFF.TripleShift(finalShift)); // LUCENENET: Removed unnecessary cast + this.finalMask = (short)(/*(short)*/0xFF >>> finalShift); // LUCENENET: Removed unnecessary cast this.middleMask = (short)(/*(short)*/0xFF << middleShift); // LUCENENET: Removed unnecessary cast } @@ -318,7 +317,7 @@ internal CodingCase(int initialShift, int finalShift) this.numBytes = 2; this.initialShift = initialShift; this.finalShift = finalShift; - this.finalMask = /*(short)*/((short)0xFF.TripleShift(finalShift)); // LUCENENET: Removed unnecessary cast + this.finalMask = (short)(/*(short)*/0xFF >>> finalShift); // LUCENENET: Removed unnecessary cast if (finalShift != 0) { advanceBytes = 1; @@ -326,4 +325,4 @@ internal CodingCase(int initialShift, int finalShift) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/IntroSorter.cs b/src/Lucene.Net/Util/IntroSorter.cs index a5ebd0506c..0ab66bb0fb 100644 --- a/src/Lucene.Net/Util/IntroSorter.cs +++ b/src/Lucene.Net/Util/IntroSorter.cs @@ -69,7 +69,7 @@ internal virtual void Quicksort(int from, int to, int maxDepth) return; } - int mid = (from + to).TripleShift(1); + int mid = (from + to) >>> 1; if (Compare(from, mid) > 0) { @@ -128,4 +128,4 @@ internal virtual void Quicksort(int from, int to, int maxDepth) /// protected abstract int ComparePivot(int j); } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/LongBitSet.cs b/src/Lucene.Net/Util/LongBitSet.cs index 66ddf8ac71..d0c01835ac 100644 --- a/src/Lucene.Net/Util/LongBitSet.cs +++ b/src/Lucene.Net/Util/LongBitSet.cs @@ -73,7 +73,7 @@ public static Int64BitSet EnsureCapacity(Int64BitSet bits, long numBits) /// Returns the number of 64 bit words it would take to hold . public static int Bits2words(long numBits) { - int numLong = (int)numBits.TripleShift(6); + int numLong = (int)(numBits >>> 6); if ((numBits & 63) != 0) { numLong++; @@ -329,7 +329,7 @@ public void Flip(long startIndex, long endIndex) */ long startmask = -1L << (int)startIndex; - long endmask = (-1L).TripleShift((int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = (-1L) >>> (int)-endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { @@ -368,7 +368,7 @@ public void Set(long startIndex, long endIndex) int endWord = (int)((endIndex - 1) >> 6); long startmask = -1L << (int)startIndex; - long endmask = (-1L).TripleShift((int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> (int)-endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { @@ -456,11 +456,11 @@ public override int GetHashCode() for (int i = numWords; --i >= 0; ) { h ^= bits[i]; - h = (h << 1) | (h.TripleShift(63)); // rotate left + h = (h << 1) | (h >>> 63); // rotate left } // fold leftmost bits into right and add a constant to prevent // empty sets from returning 0, which is too common. return (int)((h >> 32) ^ h) + unchecked((int)0x98761234); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/LongsRef.cs b/src/Lucene.Net/Util/LongsRef.cs index b111bbbfd2..94cf2f873a 100644 --- a/src/Lucene.Net/Util/LongsRef.cs +++ b/src/Lucene.Net/Util/LongsRef.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Diagnostics.CodeAnalysis; @@ -118,7 +117,7 @@ public override int GetHashCode() long end = Offset + Length; for (int i = Offset; i < end; i++) { - result = prime * result + (int)(longs[i] ^ (longs[i].TripleShift(32))); + result = prime * result + (int)(longs[i] ^ (longs[i] >>> 32)); } return result; } diff --git a/src/Lucene.Net/Util/MathUtil.cs b/src/Lucene.Net/Util/MathUtil.cs index 799e23515a..bd39cf01bb 100644 --- a/src/Lucene.Net/Util/MathUtil.cs +++ b/src/Lucene.Net/Util/MathUtil.cs @@ -78,10 +78,10 @@ public static long Gcd(long a, long b) return a; } int commonTrailingZeros = (a | b).TrailingZeroCount(); - a = a.TripleShift(a.TrailingZeroCount()); + a >>>= a.TrailingZeroCount(); while (true) { - b = b.TripleShift(b.TrailingZeroCount()); + b >>>= b.TrailingZeroCount(); if (a == b) { break; @@ -175,4 +175,4 @@ public static double Atanh(double a) return mult * Math.Log((1.0d + a) / (1.0d - a)); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Mutable/MutableValueDouble.cs b/src/Lucene.Net/Util/Mutable/MutableValueDouble.cs index c846f1db6a..a6c3b555f5 100644 --- a/src/Lucene.Net/Util/Mutable/MutableValueDouble.cs +++ b/src/Lucene.Net/Util/Mutable/MutableValueDouble.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Mutable { @@ -84,7 +83,7 @@ public override int CompareSameType(object other) public override int GetHashCode() { long x = J2N.BitConversion.DoubleToInt64Bits(Value); - return (int)x + (int)x.TripleShift(32); + return (int)x + (int)(x >>> 32); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/NumericUtils.cs b/src/Lucene.Net/Util/NumericUtils.cs index fd8721d859..8e868cf299 100644 --- a/src/Lucene.Net/Util/NumericUtils.cs +++ b/src/Lucene.Net/Util/NumericUtils.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System; +using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Util @@ -65,7 +64,7 @@ public static class NumericUtils // LUCENENET specific - changed to static { /// /// The default precision step used by , - /// , , + /// , , /// , , /// , and . /// @@ -108,7 +107,7 @@ public static class NumericUtils // LUCENENET specific - changed to static /// /// Returns prefix coded bits after reducing the precision by bits. /// This is method is used by . - /// After encoding, bytes.Offset will always be 0. + /// After encoding, bytes.Offset will always be 0. /// /// NOTE: This was longToPrefixCoded() in Lucene /// @@ -124,7 +123,7 @@ public static void Int64ToPrefixCoded(long val, int shift, BytesRef bytes) /// /// Returns prefix coded bits after reducing the precision by bits. /// This is method is used by . - /// After encoding, bytes.Offset will always be 0. + /// After encoding, bytes.Offset will always be 0. /// /// NOTE: This was intToPrefixCoded() in Lucene /// @@ -140,7 +139,7 @@ public static void Int32ToPrefixCoded(int val, int shift, BytesRef bytes) /// /// Returns prefix coded bits after reducing the precision by bits. /// This is method is used by . - /// After encoding, bytes.Offset will always be 0. + /// After encoding, bytes.Offset will always be 0. /// /// NOTE: This was longToPrefixCodedBytes() in Lucene /// @@ -175,7 +174,7 @@ public static void Int64ToPrefixCodedBytes(long val, int shift, BytesRef bytes) /// /// Returns prefix coded bits after reducing the precision by bits. /// This is method is used by . - /// After encoding, bytes.Offset will always be 0. + /// After encoding, bytes.Offset will always be 0. /// /// NOTE: This was intToPrefixCodedBytes() in Lucene /// @@ -197,18 +196,18 @@ public static void Int32ToPrefixCodedBytes(int val, int shift, BytesRef bytes) } bytes.Bytes[0] = (byte)(SHIFT_START_INT32 + shift); int sortableBits = val ^ unchecked((int)0x80000000); - sortableBits = sortableBits.TripleShift(shift); + sortableBits >>>= shift; while (nChars > 0) { // Store 7 bits per byte for compatibility // with UTF-8 encoding of terms bytes.Bytes[nChars--] = (byte)(sortableBits & 0x7f); - sortableBits = sortableBits.TripleShift(7); + sortableBits >>>= 7; } } /// - /// Returns the shift value from a prefix encoded . + /// Returns the shift value from a prefix encoded . /// /// NOTE: This was getPrefixCodedLongShift() in Lucene /// @@ -226,7 +225,7 @@ public static int GetPrefixCodedInt64Shift(BytesRef val) } /// - /// Returns the shift value from a prefix encoded . + /// Returns the shift value from a prefix encoded . /// /// NOTE: This was getPrefixCodedIntShift() in Lucene /// @@ -246,7 +245,7 @@ public static int GetPrefixCodedInt32Shift(BytesRef val) /// /// Returns a from prefixCoded bytes. /// Rightmost bits will be zero for lower precision codes. - /// This method can be used to decode a term's value. + /// This method can be used to decode a term's value. /// /// NOTE: This was prefixCodedToLong() in Lucene /// @@ -272,7 +271,7 @@ public static long PrefixCodedToInt64(BytesRef val) /// /// Returns an from prefixCoded bytes. /// Rightmost bits will be zero for lower precision codes. - /// This method can be used to decode a term's value. + /// This method can be used to decode a term's value. /// /// NOTE: This was prefixCodedToInt() in Lucene /// @@ -301,7 +300,7 @@ public static int PrefixCodedToInt32(BytesRef val) /// bit layout and then some bits are swapped, to be able to compare the result as . /// By this the precision is not reduced, but the value can easily used as a . /// The sort order (including ) is defined by - /// ; NaN is greater than positive infinity. + /// ; NaN is greater than positive infinity. /// /// NOTE: This was doubleToSortableLong() in Lucene /// @@ -318,7 +317,7 @@ public static long DoubleToSortableInt64(double val) } /// - /// Converts a sortable back to a . + /// Converts a sortable back to a . /// /// NOTE: This was sortableLongToDouble() in Lucene /// @@ -339,7 +338,7 @@ public static double SortableInt64ToDouble(long val) /// bit layout and then some bits are swapped, to be able to compare the result as . /// By this the precision is not reduced, but the value can easily used as an . /// The sort order (including ) is defined by - /// ; NaN is greater than positive infinity. + /// ; NaN is greater than positive infinity. /// /// NOTE: This was floatToSortableInt() in Lucene /// @@ -356,7 +355,7 @@ public static int SingleToSortableInt32(float val) } /// - /// Converts a sortable back to a . + /// Converts a sortable back to a . /// /// NOTE: This was sortableIntToFloat() in Lucene /// @@ -512,7 +511,7 @@ public virtual void AddRange(long min, long max, int shift) /// You need to override only one of the methods. /// /// NOTE: This was IntRangeBuilder in Lucene - /// + /// /// @lucene.internal /// @since 2.9, API changed non backwards-compliant in 4.0 /// @@ -599,4 +598,4 @@ protected override AcceptStatus Accept(BytesRef term) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs index cda676133d..a95c5a6eac 100644 --- a/src/Lucene.Net/Util/OpenBitSet.cs +++ b/src/Lucene.Net/Util/OpenBitSet.cs @@ -259,7 +259,7 @@ public virtual int GetBit(int index) if (Debugging.AssertsEnabled) Debugging.Assert(index >= 0 && index < numBits); int i = index >> 6; // div 64 int bit = index & 0x3f; // mod 64 - return ((int)m_bits[i].TripleShift(bit)) & 0x01; + return ((int)(m_bits[i] >>> bit)) & 0x01; } /* @@ -418,8 +418,8 @@ public virtual void Clear(int startIndex, int endIndex) // LUCENENET TODO: API: // word to be changed. int endWord = ((endIndex - 1) >> 6); - long startmask = (-1L) << startIndex; // -1 << (startIndex mod 64) - long endmask = (-1L) << endIndex; // -1 << (endIndex mod 64) + long startmask = -1L << startIndex; // -1 << (startIndex mod 64) + long endmask = -1L << endIndex; // -1 << (endIndex mod 64) if ((endIndex & 0x3f) == 0) { endmask = 0; @@ -466,7 +466,7 @@ public virtual void Clear(long startIndex, long endIndex) // LUCENENET TODO: API int endWord = (int)((endIndex - 1) >> 6); long startmask = -1L << (int)startIndex; - long endmask = (-1L).TripleShift((int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> (int)-endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap // invert masks since we are clearing startmask = ~startmask; @@ -757,13 +757,13 @@ public virtual int NextSetBit(int index) /// public virtual long NextSetBit(long index) { - int i = (int)index.TripleShift(6); + int i = (int)(index >>> 6); if (i >= m_wlen) { return -1; } int subIndex = (int)index & 0x3f; // index within the word - long word = m_bits[i].TripleShift(subIndex); // skip all the bits to the right of index + long word = m_bits[i] >>> subIndex; // skip all the bits to the right of index if (word != 0) { @@ -1110,11 +1110,11 @@ public override int GetHashCode() for (int i = m_bits.Length; --i >= 0; ) { h ^= m_bits[i]; - h = (h << 1) | (h.TripleShift(63)); // rotate left + h = (h << 1) | (h >>> 63); // rotate left } // fold leftmost bits into right and add a constant to prevent // empty sets from returning 0, which is too common. return (int)((h >> 32) ^ h) + unchecked((int)0x98761234); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/OpenBitSetIterator.cs b/src/Lucene.Net/Util/OpenBitSetIterator.cs index 0bf27e8fa4..ee4e820137 100644 --- a/src/Lucene.Net/Util/OpenBitSetIterator.cs +++ b/src/Lucene.Net/Util/OpenBitSetIterator.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; namespace Lucene.Net.Util { @@ -59,17 +58,17 @@ private void Shift() if ((int)word == 0) { wordShift += 32; - word = word.TripleShift(32); + word >>>= 32; } if ((word & 0x0000FFFF) == 0) { wordShift += 16; - word = word.TripleShift(16); + word >>>= 16; } if ((word & 0x000000FF) == 0) { wordShift += 8; - word = word.TripleShift(8); + word >>>= 8; } indexArray = BitUtil.BitList((byte)word); } @@ -102,7 +101,7 @@ public override int NextDoc() { if (word != 0) { - word = word.TripleShift(8); + word >>>= 8; wordShift += 8; } @@ -122,7 +121,7 @@ public override int NextDoc() } int bitIndex = (indexArray & 0x0f) + wordShift; - indexArray = indexArray.TripleShift(4); + indexArray >>>= 4; // should i<<6 be cached as a separate variable? // it would only save one cycle in the best circumstances. return curDocId = (i << 6) + bitIndex; @@ -138,7 +137,7 @@ public override int Advance(int target) return curDocId = NO_MORE_DOCS; } wordShift = target & 0x3f; - word = arr[i].TripleShift(wordShift); + word = arr[i] >>> wordShift; if (word != 0) { wordShift--; // compensate for 1 based arrIndex @@ -159,7 +158,7 @@ public override int Advance(int target) Shift(); int bitIndex = (indexArray & 0x0f) + wordShift; - indexArray = indexArray.TripleShift(4); + indexArray >>>= 4; // should i<<6 be cached as a separate variable? // it would only save one cycle in the best circumstances. return curDocId = (i << 6) + bitIndex; @@ -173,4 +172,4 @@ public override long GetCost() return words / 64; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/PForDeltaDocIdSet.cs b/src/Lucene.Net/Util/PForDeltaDocIdSet.cs index 3629092b7f..996a3c6dfd 100644 --- a/src/Lucene.Net/Util/PForDeltaDocIdSet.cs +++ b/src/Lucene.Net/Util/PForDeltaDocIdSet.cs @@ -183,7 +183,7 @@ internal virtual int UnaryBlockSize() { deltaSum += 1 + buffer[i]; } - int blockSize = (deltaSum + 0x07).TripleShift(3); // round to the next byte + int blockSize = (deltaSum + 0x07) >>> 3; // round to the next byte ++blockSize; // header if (bufferSize < BLOCK_SIZE) { @@ -233,7 +233,7 @@ internal virtual void PforEncode() if (buffer[i] > mask) { exceptionIndices[ex] = i; - exceptions[ex++] = buffer[i].TripleShift(bitsPerValue); + exceptions[ex++] = buffer[i] >>> bitsPerValue; buffer[i] &= mask; } } @@ -483,7 +483,7 @@ internal virtual void UnaryDecompress(byte token) for (int i = 0; i < BLOCK_SIZE; ) { var b = data[offset++]; - for (int bitList = BitUtil.BitList(b); bitList != 0; ++i, bitList = bitList.TripleShift(4)) + for (int bitList = BitUtil.BitList(b); bitList != 0; ++i, bitList >>>= 4) { nextDocs[i] = docID + (bitList & 0x0F); } @@ -561,7 +561,7 @@ internal virtual int ForwardBinarySearch(int target) // we found a window containing our target, let's binary search now while (lo <= hi) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midDocID = (int)docIDs.Get(mid); if (midDocID <= target) { @@ -627,4 +627,4 @@ public long RamBytesUsed() return RamUsageEstimator.AlignObjectSize(3 * RamUsageEstimator.NUM_BYTES_OBJECT_REF) + docIDs.RamBytesUsed() + offsets.RamBytesUsed(); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/AbstractBlockPackedWriter.cs b/src/Lucene.Net/Util/Packed/AbstractBlockPackedWriter.cs index 3ad541d0b3..4859c6dbbf 100644 --- a/src/Lucene.Net/Util/Packed/AbstractBlockPackedWriter.cs +++ b/src/Lucene.Net/Util/Packed/AbstractBlockPackedWriter.cs @@ -1,7 +1,5 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; -using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Packed @@ -49,7 +47,7 @@ internal static void WriteVInt64(DataOutput @out, long i) while ((i & ~0x7FL) != 0L && k++ < 8) { @out.WriteByte((byte)((i & 0x7FL) | 0x80L)); - i = i.TripleShift(7); + i >>>= 7; } @out.WriteByte((byte)i); } @@ -74,7 +72,7 @@ protected AbstractBlockPackedWriter(DataOutput @out, int blockSize) // LUCENENET /// /// Reset this writer to wrap . The block size remains unchanged. /// - /// NOTE: When overriding this method, be aware that the constructor of this class calls + /// NOTE: When overriding this method, be aware that the constructor of this class calls /// a private method and not this virtual method. So if you need to override /// the behavior during the initialization, call your own private method from the constructor /// with whatever custom behavior you need. @@ -171,4 +169,4 @@ protected void WriteValues(int bitsRequired) m_out.WriteBytes(m_blocks, blockCount); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/AbstractPagedMutable.cs b/src/Lucene.Net/Util/Packed/AbstractPagedMutable.cs index b783815fbf..359334179a 100644 --- a/src/Lucene.Net/Util/Packed/AbstractPagedMutable.cs +++ b/src/Lucene.Net/Util/Packed/AbstractPagedMutable.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Runtime.CompilerServices; @@ -80,7 +79,7 @@ internal int LastPageSize(long size) [MethodImpl(MethodImplOptions.AggressiveInlining)] internal int PageIndex(long index) { - return (int)index.TripleShift(pageShift); + return (int)(index >>> pageShift); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -161,7 +160,7 @@ public T Grow(long minSize) T result = (T)this; return result; } - long extra = minSize.TripleShift(3); + long extra = minSize >>> 3; if (extra < 3) { extra = 3; @@ -183,4 +182,4 @@ public override sealed string ToString() return this.GetType().Name + "(size=" + Count + ",pageSize=" + PageSize + ")"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BlockPackedReader.cs b/src/Lucene.Net/Util/Packed/BlockPackedReader.cs index b16c7f3abf..9264227d26 100644 --- a/src/Lucene.Net/Util/Packed/BlockPackedReader.cs +++ b/src/Lucene.Net/Util/Packed/BlockPackedReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Store; using System; using System.IO; @@ -48,7 +47,7 @@ public BlockPackedReader(IndexInput @in, int packedIntsVersion, int blockSize, l for (int i = 0; i < numBlocks; ++i) { int token = @in.ReadByte() & 0xFF; - int bitsPerValue = token.TripleShift(AbstractBlockPackedWriter.BPV_SHIFT); + int bitsPerValue = token >>> AbstractBlockPackedWriter.BPV_SHIFT; if (bitsPerValue > 64) { throw new IOException("Corrupted"); @@ -86,7 +85,7 @@ public BlockPackedReader(IndexInput @in, int packedIntsVersion, int blockSize, l public override long Get(long index) { if (Debugging.AssertsEnabled) Debugging.Assert(index >= 0 && index < valueCount); - int block = (int)(index.TripleShift(blockShift)); + int block = (int)(index >>> blockShift); int idx = (int)(index & blockMask); return (minValues is null ? 0 : minValues[block]) + subReaders[block].Get(idx); } @@ -103,4 +102,4 @@ public long RamBytesUsed() return size; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BlockPackedReaderIterator.cs b/src/Lucene.Net/Util/Packed/BlockPackedReaderIterator.cs index 2a428e2eb9..060122531a 100644 --- a/src/Lucene.Net/Util/Packed/BlockPackedReaderIterator.cs +++ b/src/Lucene.Net/Util/Packed/BlockPackedReaderIterator.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.IO; @@ -28,7 +27,7 @@ namespace Lucene.Net.Util.Packed using IndexInput = Lucene.Net.Store.IndexInput; /// - /// Reader for sequences of s written with . + /// Reader for sequences of s written with . /// /// @lucene.internal /// @@ -38,7 +37,7 @@ public sealed class BlockPackedReaderIterator [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static long ZigZagDecode(long n) { - return ((n.TripleShift(1)) ^ -(n & 1)); + return ((n >>> 1) ^ -(n & 1)); } // same as DataInput.ReadVInt64 but supports negative values @@ -164,7 +163,7 @@ public void Skip(long count) while (count >= blockSize) { int token = @in.ReadByte() & 0xFF; - int bitsPerValue = token.TripleShift(AbstractBlockPackedWriter.BPV_SHIFT); + int bitsPerValue = token >>> AbstractBlockPackedWriter.BPV_SHIFT; if (bitsPerValue > 64) { throw new IOException("Corrupted"); @@ -258,7 +257,7 @@ private void Refill() { int token = @in.ReadByte() & 0xFF; bool minEquals0 = (token & AbstractBlockPackedWriter.MIN_VALUE_EQUALS_0) != 0; - int bitsPerValue = token.TripleShift(AbstractBlockPackedWriter.BPV_SHIFT); + int bitsPerValue = token >>> AbstractBlockPackedWriter.BPV_SHIFT; if (bitsPerValue > 64) { throw new IOException("Corrupted"); @@ -301,4 +300,4 @@ private void Refill() /// Return the offset of the next value to read. public long Ord => ord; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperation.cs b/src/Lucene.Net/Util/Packed/BulkOperation.cs index 713d21037a..6dc0f49c5e 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperation.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperation.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; // this file has been automatically generated, DO NOT EDIT @@ -186,7 +185,7 @@ protected virtual int WriteInt64(long block, byte[] blocks, int blocksOffset) { for (int j = 1; j <= 8; ++j) { - blocks[blocksOffset++] = (byte)block.TripleShift(64 - (j << 3)); + blocks[blocksOffset++] = (byte)(block >>> (64 - (j << 3))); } return blocksOffset; } @@ -228,4 +227,4 @@ public int ComputeIterations(int valueCount, int ramBudget) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked.cs index 156401162b..a144ebc5a2 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; -using System; +using Lucene.Net.Diagnostics; namespace Lucene.Net.Util.Packed { @@ -41,7 +39,7 @@ public BulkOperationPacked(int bitsPerValue) int blocks = bitsPerValue; while ((blocks & 1) == 0) { - blocks = blocks.TripleShift(1); + blocks >>>= 1; } this.longBlockCount = blocks; this.longValueCount = 64 * longBlockCount / bitsPerValue; @@ -49,8 +47,8 @@ public BulkOperationPacked(int bitsPerValue) int byteValueCount = longValueCount; while ((byteBlockCount & 1) == 0 && (byteValueCount & 1) == 0) { - byteBlockCount = byteBlockCount.TripleShift(1); - byteValueCount = byteValueCount.TripleShift(1); + byteBlockCount >>>= 1; + byteValueCount >>>= 1; } this.byteBlockCount = byteBlockCount; this.byteValueCount = byteValueCount; @@ -88,12 +86,12 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int bitsLeft -= bitsPerValue; if (bitsLeft < 0) { - values[valuesOffset++] = ((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) | (blocks[blocksOffset].TripleShift(64 + bitsLeft)); + values[valuesOffset++] = ((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) | (blocks[blocksOffset] >>> (64 + bitsLeft)); bitsLeft += 64; } else { - values[valuesOffset++] = (blocks[blocksOffset].TripleShift(bitsLeft)) & mask; + values[valuesOffset++] = (blocks[blocksOffset] >>> bitsLeft) & mask; } } } @@ -115,11 +113,11 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { // flush int bits = 8 - bitsLeft; - values[valuesOffset++] = nextValue | (bytes.TripleShift(bits)); + values[valuesOffset++] = nextValue | (bytes >>> bits); while (bits >= bitsPerValue) { bits -= bitsPerValue; - values[valuesOffset++] = (bytes.TripleShift(bits)) & mask; + values[valuesOffset++] = (bytes >>> bits) & mask; } // then buffer bitsLeft = bitsPerValue - bits; @@ -141,12 +139,12 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v bitsLeft -= bitsPerValue; if (bitsLeft < 0) { - values[valuesOffset++] = (int)(((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) | (blocks[blocksOffset].TripleShift(64 + bitsLeft))); + values[valuesOffset++] = (int)(((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) | (blocks[blocksOffset] >>> (64 + bitsLeft))); bitsLeft += 64; } else { - values[valuesOffset++] = (int)((blocks[blocksOffset].TripleShift(bitsLeft)) & mask); + values[valuesOffset++] = (int)((blocks[blocksOffset] >>> bitsLeft) & mask); } } } @@ -168,11 +166,11 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { // flush int bits = 8 - bitsLeft; - values[valuesOffset++] = nextValue | (bytes.TripleShift(bits)); + values[valuesOffset++] = nextValue | (bytes >>> bits); while (bits >= bitsPerValue) { bits -= bitsPerValue; - values[valuesOffset++] = (bytes.TripleShift(bits)) & intMask; + values[valuesOffset++] = (bytes >>> bits) & intMask; } // then buffer bitsLeft = bitsPerValue - bits; @@ -202,7 +200,7 @@ public override void Encode(long[] values, int valuesOffset, long[] blocks, int } // bitsLeft < 0 else { - nextBlock |= values[valuesOffset].TripleShift(-bitsLeft); + nextBlock |= values[valuesOffset] >>> -bitsLeft; blocks[blocksOffset++] = nextBlock; nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); bitsLeft += 64; @@ -230,7 +228,7 @@ public override void Encode(int[] values, int valuesOffset, long[] blocks, int b } // bitsLeft < 0 else { - nextBlock |= (values[valuesOffset] & 0xFFFFFFFFL).TripleShift(-bitsLeft); + nextBlock |= (values[valuesOffset] & 0xFFFFFFFFL) >>> -bitsLeft; blocks[blocksOffset++] = nextBlock; nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); bitsLeft += 64; @@ -256,11 +254,11 @@ public override void Encode(long[] values, int valuesOffset, byte[] blocks, int { // flush as many blocks as possible int bits = bitsPerValue - bitsLeft; - blocks[blocksOffset++] = (byte)((uint)nextBlock | (v.TripleShift(bits))); + blocks[blocksOffset++] = (byte)((uint)nextBlock | (v >>> bits)); while (bits >= 8) { bits -= 8; - blocks[blocksOffset++] = (byte)(v.TripleShift(bits)); + blocks[blocksOffset++] = (byte)(v >>> bits); } // then buffer bitsLeft = 8 - bits; @@ -288,11 +286,11 @@ public override void Encode(int[] values, int valuesOffset, byte[] blocks, int b { // flush as many blocks as possible int bits = bitsPerValue - bitsLeft; - blocks[blocksOffset++] = (byte)(nextBlock | (v.TripleShift(bits))); + blocks[blocksOffset++] = (byte)(nextBlock | (v >>> bits)); while (bits >= 8) { bits -= 8; - blocks[blocksOffset++] = (byte)(v.TripleShift(bits)); + blocks[blocksOffset++] = (byte)(v >>> bits); } // then buffer bitsLeft = 8 - bits; @@ -302,4 +300,4 @@ public override void Encode(int[] values, int valuesOffset, byte[] blocks, int b if (Debugging.AssertsEnabled) Debugging.Assert(bitsLeft == 8); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked1.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked1.cs index 38dbe3e9aa..49f8870580 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked1.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked1.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -38,7 +36,7 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v long block = blocks[blocksOffset++]; for (int shift = 63; shift >= 0; shift -= 1) { - values[valuesOffset++] = (int)((block.TripleShift(shift)) & 1); + values[valuesOffset++] = (int)((block >>> shift) & 1); } } } @@ -48,13 +46,13 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = block.TripleShift(7) & 1; - values[valuesOffset++] = block.TripleShift(6) & 1; - values[valuesOffset++] = block.TripleShift(5) & 1; - values[valuesOffset++] = block.TripleShift(4) & 1; - values[valuesOffset++] = block.TripleShift(3) & 1; - values[valuesOffset++] = block.TripleShift(2) & 1; - values[valuesOffset++] = block.TripleShift(1) & 1; + values[valuesOffset++] = (block >>> 7) & 1; + values[valuesOffset++] = (block >>> 6) & 1; + values[valuesOffset++] = (block >>> 5) & 1; + values[valuesOffset++] = (block >>> 4) & 1; + values[valuesOffset++] = (block >>> 3) & 1; + values[valuesOffset++] = (block >>> 2) & 1; + values[valuesOffset++] = (block >>> 1) & 1; values[valuesOffset++] = block & 1; } } @@ -66,7 +64,7 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int long block = blocks[blocksOffset++]; for (int shift = 63; shift >= 0; shift -= 1) { - values[valuesOffset++] = (block.TripleShift(shift)) & 1; + values[valuesOffset++] = ((block >>> shift)) & 1; } } } @@ -76,15 +74,15 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = block.TripleShift(7) & 1; - values[valuesOffset++] = block.TripleShift(6) & 1; - values[valuesOffset++] = block.TripleShift(5) & 1; - values[valuesOffset++] = block.TripleShift(4) & 1; - values[valuesOffset++] = block.TripleShift(3) & 1; - values[valuesOffset++] = block.TripleShift(2) & 1; - values[valuesOffset++] = block.TripleShift(1) & 1; + values[valuesOffset++] = (block >>> 7) & 1; + values[valuesOffset++] = (block >>> 6) & 1; + values[valuesOffset++] = (block >>> 5) & 1; + values[valuesOffset++] = (block >>> 4) & 1; + values[valuesOffset++] = (block >>> 3) & 1; + values[valuesOffset++] = (block >>> 2) & 1; + values[valuesOffset++] = (block >>> 1) & 1; values[valuesOffset++] = block & 1; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked10.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked10.cs index 92adcca862..c1caa2396f 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked10.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked10.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,41 +34,41 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(54)); - values[valuesOffset++] = (int)((block0.TripleShift(44)) & 1023L); - values[valuesOffset++] = (int)((block0.TripleShift(34)) & 1023L); - values[valuesOffset++] = (int)((block0.TripleShift(24)) & 1023L); - values[valuesOffset++] = (int)((block0.TripleShift(14)) & 1023L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 1023L); + values[valuesOffset++] = (int)(block0 >>> 54); + values[valuesOffset++] = (int)((block0 >>> 44) & 1023L); + values[valuesOffset++] = (int)((block0 >>> 34) & 1023L); + values[valuesOffset++] = (int)((block0 >>> 24) & 1023L); + values[valuesOffset++] = (int)((block0 >>> 14) & 1023L); + values[valuesOffset++] = (int)((block0 >>> 4) & 1023L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 6) | (block1.TripleShift(58))); - values[valuesOffset++] = (int)((block1.TripleShift(48)) & 1023L); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 1023L); - values[valuesOffset++] = (int)((block1.TripleShift(28)) & 1023L); - values[valuesOffset++] = (int)((block1.TripleShift(18)) & 1023L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 1023L); + values[valuesOffset++] = (int)(((block0 & 15L) << 6) | (block1 >>> 58)); + values[valuesOffset++] = (int)((block1 >>> 48) & 1023L); + values[valuesOffset++] = (int)((block1 >>> 38) & 1023L); + values[valuesOffset++] = (int)((block1 >>> 28) & 1023L); + values[valuesOffset++] = (int)((block1 >>> 18) & 1023L); + values[valuesOffset++] = (int)((block1 >>> 8) & 1023L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 255L) << 2) | (block2.TripleShift(62))); - values[valuesOffset++] = (int)((block2.TripleShift(52)) & 1023L); - values[valuesOffset++] = (int)((block2.TripleShift(42)) & 1023L); - values[valuesOffset++] = (int)((block2.TripleShift(32)) & 1023L); - values[valuesOffset++] = (int)((block2.TripleShift(22)) & 1023L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 1023L); - values[valuesOffset++] = (int)((block2.TripleShift(2)) & 1023L); + values[valuesOffset++] = (int)(((block1 & 255L) << 2) | (block2 >>> 62)); + values[valuesOffset++] = (int)((block2 >>> 52) & 1023L); + values[valuesOffset++] = (int)((block2 >>> 42) & 1023L); + values[valuesOffset++] = (int)((block2 >>> 32) & 1023L); + values[valuesOffset++] = (int)((block2 >>> 22) & 1023L); + values[valuesOffset++] = (int)((block2 >>> 12) & 1023L); + values[valuesOffset++] = (int)((block2 >>> 2) & 1023L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 3L) << 8) | (block3.TripleShift(56))); - values[valuesOffset++] = (int)((block3.TripleShift(46)) & 1023L); - values[valuesOffset++] = (int)((block3.TripleShift(36)) & 1023L); - values[valuesOffset++] = (int)((block3.TripleShift(26)) & 1023L); - values[valuesOffset++] = (int)((block3.TripleShift(16)) & 1023L); - values[valuesOffset++] = (int)((block3.TripleShift(6)) & 1023L); + values[valuesOffset++] = (int)(((block2 & 3L) << 8) | (block3 >>> 56)); + values[valuesOffset++] = (int)((block3 >>> 46) & 1023L); + values[valuesOffset++] = (int)((block3 >>> 36) & 1023L); + values[valuesOffset++] = (int)((block3 >>> 26) & 1023L); + values[valuesOffset++] = (int)((block3 >>> 16) & 1023L); + values[valuesOffset++] = (int)((block3 >>> 6) & 1023L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 63L) << 4) | (block4.TripleShift(60))); - values[valuesOffset++] = (int)((block4.TripleShift(50)) & 1023L); - values[valuesOffset++] = (int)((block4.TripleShift(40)) & 1023L); - values[valuesOffset++] = (int)((block4.TripleShift(30)) & 1023L); - values[valuesOffset++] = (int)((block4.TripleShift(20)) & 1023L); - values[valuesOffset++] = (int)((block4.TripleShift(10)) & 1023L); + values[valuesOffset++] = (int)(((block3 & 63L) << 4) | (block4 >>> 60)); + values[valuesOffset++] = (int)((block4 >>> 50) & 1023L); + values[valuesOffset++] = (int)((block4 >>> 40) & 1023L); + values[valuesOffset++] = (int)((block4 >>> 30) & 1023L); + values[valuesOffset++] = (int)((block4 >>> 20) & 1023L); + values[valuesOffset++] = (int)((block4 >>> 10) & 1023L); values[valuesOffset++] = (int)(block4 & 1023L); } } @@ -81,11 +79,11 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 2) | (byte1.TripleShift(6)); + values[valuesOffset++] = (byte0 << 2) | (byte1 >>> 6); int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4); int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2); int byte4 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte3 & 3) << 8) | byte4; } @@ -96,41 +94,41 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (block0.TripleShift(54)); - values[valuesOffset++] = (block0.TripleShift(44)) & 1023L; - values[valuesOffset++] = (block0.TripleShift(34)) & 1023L; - values[valuesOffset++] = (block0.TripleShift(24)) & 1023L; - values[valuesOffset++] = (block0.TripleShift(14)) & 1023L; - values[valuesOffset++] = (block0.TripleShift(4)) & 1023L; + values[valuesOffset++] = (block0 >>> 54); + values[valuesOffset++] = (block0 >>> 44) & 1023L; + values[valuesOffset++] = (block0 >>> 34) & 1023L; + values[valuesOffset++] = (block0 >>> 24) & 1023L; + values[valuesOffset++] = (block0 >>> 14) & 1023L; + values[valuesOffset++] = (block0 >>> 4) & 1023L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 6) | (block1.TripleShift(58)); - values[valuesOffset++] = (block1.TripleShift(48)) & 1023L; - values[valuesOffset++] = (block1.TripleShift(38)) & 1023L; - values[valuesOffset++] = (block1.TripleShift(28)) & 1023L; - values[valuesOffset++] = (block1.TripleShift(18)) & 1023L; - values[valuesOffset++] = (block1.TripleShift(8)) & 1023L; + values[valuesOffset++] = ((block0 & 15L) << 6) | (block1 >>> 58); + values[valuesOffset++] = (block1 >>> 48) & 1023L; + values[valuesOffset++] = (block1 >>> 38) & 1023L; + values[valuesOffset++] = (block1 >>> 28) & 1023L; + values[valuesOffset++] = (block1 >>> 18) & 1023L; + values[valuesOffset++] = (block1 >>> 8) & 1023L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 2) | (block2.TripleShift(62)); - values[valuesOffset++] = (block2.TripleShift(52)) & 1023L; - values[valuesOffset++] = (block2.TripleShift(42)) & 1023L; - values[valuesOffset++] = (block2.TripleShift(32)) & 1023L; - values[valuesOffset++] = (block2.TripleShift(22)) & 1023L; - values[valuesOffset++] = (block2.TripleShift(12)) & 1023L; - values[valuesOffset++] = (block2.TripleShift(2)) & 1023L; + values[valuesOffset++] = ((block1 & 255L) << 2) | (block2 >>> 62); + values[valuesOffset++] = (block2 >>> 52) & 1023L; + values[valuesOffset++] = (block2 >>> 42) & 1023L; + values[valuesOffset++] = (block2 >>> 32) & 1023L; + values[valuesOffset++] = (block2 >>> 22) & 1023L; + values[valuesOffset++] = (block2 >>> 12) & 1023L; + values[valuesOffset++] = (block2 >>> 2) & 1023L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 3L) << 8) | (block3.TripleShift(56)); - values[valuesOffset++] = (block3.TripleShift(46)) & 1023L; - values[valuesOffset++] = (block3.TripleShift(36)) & 1023L; - values[valuesOffset++] = (block3.TripleShift(26)) & 1023L; - values[valuesOffset++] = (block3.TripleShift(16)) & 1023L; - values[valuesOffset++] = (block3.TripleShift(6)) & 1023L; + values[valuesOffset++] = ((block2 & 3L) << 8) | (block3 >>> 56); + values[valuesOffset++] = (block3 >>> 46) & 1023L; + values[valuesOffset++] = (block3 >>> 36) & 1023L; + values[valuesOffset++] = (block3 >>> 26) & 1023L; + values[valuesOffset++] = (block3 >>> 16) & 1023L; + values[valuesOffset++] = (block3 >>> 6) & 1023L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 63L) << 4) | (block4.TripleShift(60)); - values[valuesOffset++] = (block4.TripleShift(50)) & 1023L; - values[valuesOffset++] = (block4.TripleShift(40)) & 1023L; - values[valuesOffset++] = (block4.TripleShift(30)) & 1023L; - values[valuesOffset++] = (block4.TripleShift(20)) & 1023L; - values[valuesOffset++] = (block4.TripleShift(10)) & 1023L; + values[valuesOffset++] = ((block3 & 63L) << 4) | (block4 >>> 60); + values[valuesOffset++] = (block4 >>> 50) & 1023L; + values[valuesOffset++] = (block4 >>> 40) & 1023L; + values[valuesOffset++] = (block4 >>> 30) & 1023L; + values[valuesOffset++] = (block4 >>> 20) & 1023L; + values[valuesOffset++] = (block4 >>> 10) & 1023L; values[valuesOffset++] = block4 & 1023L; } } @@ -141,14 +139,14 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 2) | (byte1.TripleShift(6)); + values[valuesOffset++] = (byte0 << 2) | (byte1 >>> 6); long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4); long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2); long byte4 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte3 & 3) << 8) | byte4; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked11.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked11.cs index c945cc19c8..d840038aa3 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked11.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked11.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,79 +34,79 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(53)); - values[valuesOffset++] = (int)((block0.TripleShift(42)) & 2047L); - values[valuesOffset++] = (int)((block0.TripleShift(31)) & 2047L); - values[valuesOffset++] = (int)((block0.TripleShift(20)) & 2047L); - values[valuesOffset++] = (int)((block0.TripleShift(9)) & 2047L); + values[valuesOffset++] = (int)(block0 >>> 53); + values[valuesOffset++] = (int)((block0 >>> 42) & 2047L); + values[valuesOffset++] = (int)((block0 >>> 31) & 2047L); + values[valuesOffset++] = (int)((block0 >>> 20) & 2047L); + values[valuesOffset++] = (int)((block0 >>> 9) & 2047L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 511L) << 2) | (block1.TripleShift(62))); - values[valuesOffset++] = (int)((block1.TripleShift(51)) & 2047L); - values[valuesOffset++] = (int)((block1.TripleShift(40)) & 2047L); - values[valuesOffset++] = (int)((block1.TripleShift(29)) & 2047L); - values[valuesOffset++] = (int)((block1.TripleShift(18)) & 2047L); - values[valuesOffset++] = (int)((block1.TripleShift(7)) & 2047L); + values[valuesOffset++] = (int)(((block0 & 511L) << 2) | (block1 >>> 62)); + values[valuesOffset++] = (int)((block1 >>> 51) & 2047L); + values[valuesOffset++] = (int)((block1 >>> 40) & 2047L); + values[valuesOffset++] = (int)((block1 >>> 29) & 2047L); + values[valuesOffset++] = (int)((block1 >>> 18) & 2047L); + values[valuesOffset++] = (int)((block1 >>> 7) & 2047L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 127L) << 4) | (block2.TripleShift(60))); - values[valuesOffset++] = (int)((block2.TripleShift(49)) & 2047L); - values[valuesOffset++] = (int)((block2.TripleShift(38)) & 2047L); - values[valuesOffset++] = (int)((block2.TripleShift(27)) & 2047L); - values[valuesOffset++] = (int)((block2.TripleShift(16)) & 2047L); - values[valuesOffset++] = (int)((block2.TripleShift(5)) & 2047L); + values[valuesOffset++] = (int)(((block1 & 127L) << 4) | (block2 >>> 60)); + values[valuesOffset++] = (int)((block2 >>> 49) & 2047L); + values[valuesOffset++] = (int)((block2 >>> 38) & 2047L); + values[valuesOffset++] = (int)((block2 >>> 27) & 2047L); + values[valuesOffset++] = (int)((block2 >>> 16) & 2047L); + values[valuesOffset++] = (int)((block2 >>> 5) & 2047L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 31L) << 6) | (block3.TripleShift(58))); - values[valuesOffset++] = (int)((block3.TripleShift(47)) & 2047L); - values[valuesOffset++] = (int)((block3.TripleShift(36)) & 2047L); - values[valuesOffset++] = (int)((block3.TripleShift(25)) & 2047L); - values[valuesOffset++] = (int)((block3.TripleShift(14)) & 2047L); - values[valuesOffset++] = (int)((block3.TripleShift(3)) & 2047L); + values[valuesOffset++] = (int)(((block2 & 31L) << 6) | (block3 >>> 58)); + values[valuesOffset++] = (int)((block3 >>> 47) & 2047L); + values[valuesOffset++] = (int)((block3 >>> 36) & 2047L); + values[valuesOffset++] = (int)((block3 >>> 25) & 2047L); + values[valuesOffset++] = (int)((block3 >>> 14) & 2047L); + values[valuesOffset++] = (int)((block3 >>> 3) & 2047L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 7L) << 8) | (block4.TripleShift(56))); - values[valuesOffset++] = (int)((block4.TripleShift(45)) & 2047L); - values[valuesOffset++] = (int)((block4.TripleShift(34)) & 2047L); - values[valuesOffset++] = (int)((block4.TripleShift(23)) & 2047L); - values[valuesOffset++] = (int)((block4.TripleShift(12)) & 2047L); - values[valuesOffset++] = (int)((block4.TripleShift(1)) & 2047L); + values[valuesOffset++] = (int)(((block3 & 7L) << 8) | (block4 >>> 56)); + values[valuesOffset++] = (int)((block4 >>> 45) & 2047L); + values[valuesOffset++] = (int)((block4 >>> 34) & 2047L); + values[valuesOffset++] = (int)((block4 >>> 23) & 2047L); + values[valuesOffset++] = (int)((block4 >>> 12) & 2047L); + values[valuesOffset++] = (int)((block4 >>> 1) & 2047L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 1L) << 10) | (block5.TripleShift(54))); - values[valuesOffset++] = (int)((block5.TripleShift(43)) & 2047L); - values[valuesOffset++] = (int)((block5.TripleShift(32)) & 2047L); - values[valuesOffset++] = (int)((block5.TripleShift(21)) & 2047L); - values[valuesOffset++] = (int)((block5.TripleShift(10)) & 2047L); + values[valuesOffset++] = (int)(((block4 & 1L) << 10) | (block5 >>> 54)); + values[valuesOffset++] = (int)((block5 >>> 43) & 2047L); + values[valuesOffset++] = (int)((block5 >>> 32) & 2047L); + values[valuesOffset++] = (int)((block5 >>> 21) & 2047L); + values[valuesOffset++] = (int)((block5 >>> 10) & 2047L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 1023L) << 1) | (block6.TripleShift(63))); - values[valuesOffset++] = (int)((block6.TripleShift(52)) & 2047L); - values[valuesOffset++] = (int)((block6.TripleShift(41)) & 2047L); - values[valuesOffset++] = (int)((block6.TripleShift(30)) & 2047L); - values[valuesOffset++] = (int)((block6.TripleShift(19)) & 2047L); - values[valuesOffset++] = (int)((block6.TripleShift(8)) & 2047L); + values[valuesOffset++] = (int)(((block5 & 1023L) << 1) | (block6 >>> 63)); + values[valuesOffset++] = (int)((block6 >>> 52) & 2047L); + values[valuesOffset++] = (int)((block6 >>> 41) & 2047L); + values[valuesOffset++] = (int)((block6 >>> 30) & 2047L); + values[valuesOffset++] = (int)((block6 >>> 19) & 2047L); + values[valuesOffset++] = (int)((block6 >>> 8) & 2047L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 255L) << 3) | (block7.TripleShift(61))); - values[valuesOffset++] = (int)((block7.TripleShift(50)) & 2047L); - values[valuesOffset++] = (int)((block7.TripleShift(39)) & 2047L); - values[valuesOffset++] = (int)((block7.TripleShift(28)) & 2047L); - values[valuesOffset++] = (int)((block7.TripleShift(17)) & 2047L); - values[valuesOffset++] = (int)((block7.TripleShift(6)) & 2047L); + values[valuesOffset++] = (int)(((block6 & 255L) << 3) | (block7 >>> 61)); + values[valuesOffset++] = (int)((block7 >>> 50) & 2047L); + values[valuesOffset++] = (int)((block7 >>> 39) & 2047L); + values[valuesOffset++] = (int)((block7 >>> 28) & 2047L); + values[valuesOffset++] = (int)((block7 >>> 17) & 2047L); + values[valuesOffset++] = (int)((block7 >>> 6) & 2047L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 63L) << 5) | (block8.TripleShift(59))); - values[valuesOffset++] = (int)((block8.TripleShift(48)) & 2047L); - values[valuesOffset++] = (int)((block8.TripleShift(37)) & 2047L); - values[valuesOffset++] = (int)((block8.TripleShift(26)) & 2047L); - values[valuesOffset++] = (int)((block8.TripleShift(15)) & 2047L); - values[valuesOffset++] = (int)((block8.TripleShift(4)) & 2047L); + values[valuesOffset++] = (int)(((block7 & 63L) << 5) | (block8 >>> 59)); + values[valuesOffset++] = (int)((block8 >>> 48) & 2047L); + values[valuesOffset++] = (int)((block8 >>> 37) & 2047L); + values[valuesOffset++] = (int)((block8 >>> 26) & 2047L); + values[valuesOffset++] = (int)((block8 >>> 15) & 2047L); + values[valuesOffset++] = (int)((block8 >>> 4) & 2047L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 15L) << 7) | (block9.TripleShift(57))); - values[valuesOffset++] = (int)((block9.TripleShift(46)) & 2047L); - values[valuesOffset++] = (int)((block9.TripleShift(35)) & 2047L); - values[valuesOffset++] = (int)((block9.TripleShift(24)) & 2047L); - values[valuesOffset++] = (int)((block9.TripleShift(13)) & 2047L); - values[valuesOffset++] = (int)((block9.TripleShift(2)) & 2047L); + values[valuesOffset++] = (int)(((block8 & 15L) << 7) | (block9 >>> 57)); + values[valuesOffset++] = (int)((block9 >>> 46) & 2047L); + values[valuesOffset++] = (int)((block9 >>> 35) & 2047L); + values[valuesOffset++] = (int)((block9 >>> 24) & 2047L); + values[valuesOffset++] = (int)((block9 >>> 13) & 2047L); + values[valuesOffset++] = (int)((block9 >>> 2) & 2047L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 3L) << 9) | (block10.TripleShift(55))); - values[valuesOffset++] = (int)((block10.TripleShift(44)) & 2047L); - values[valuesOffset++] = (int)((block10.TripleShift(33)) & 2047L); - values[valuesOffset++] = (int)((block10.TripleShift(22)) & 2047L); - values[valuesOffset++] = (int)((block10.TripleShift(11)) & 2047L); + values[valuesOffset++] = (int)(((block9 & 3L) << 9) | (block10 >>> 55)); + values[valuesOffset++] = (int)((block10 >>> 44) & 2047L); + values[valuesOffset++] = (int)((block10 >>> 33) & 2047L); + values[valuesOffset++] = (int)((block10 >>> 22) & 2047L); + values[valuesOffset++] = (int)((block10 >>> 11) & 2047L); values[valuesOffset++] = (int)(block10 & 2047L); } } @@ -119,21 +117,21 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 3) | (byte1.TripleShift(5)); + values[valuesOffset++] = (byte0 << 3) | (byte1 >>> 5); int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2.TripleShift(2)); + values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4.TripleShift(7)); + values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7); int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5.TripleShift(4)); + values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4); int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6.TripleShift(1)); + values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1); int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8.TripleShift(6)); + values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6); int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9.TripleShift(3)); + values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3); int byte10 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte9 & 7) << 8) | byte10; } @@ -144,79 +142,79 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(53); - values[valuesOffset++] = (block0.TripleShift(42)) & 2047L; - values[valuesOffset++] = (block0.TripleShift(31)) & 2047L; - values[valuesOffset++] = (block0.TripleShift(20)) & 2047L; - values[valuesOffset++] = (block0.TripleShift(9)) & 2047L; + values[valuesOffset++] = block0 >>> 53; + values[valuesOffset++] = (block0 >>> 42) & 2047L; + values[valuesOffset++] = (block0 >>> 31) & 2047L; + values[valuesOffset++] = (block0 >>> 20) & 2047L; + values[valuesOffset++] = (block0 >>> 9) & 2047L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 511L) << 2) | (block1.TripleShift(62)); - values[valuesOffset++] = (block1.TripleShift(51)) & 2047L; - values[valuesOffset++] = (block1.TripleShift(40)) & 2047L; - values[valuesOffset++] = (block1.TripleShift(29)) & 2047L; - values[valuesOffset++] = (block1.TripleShift(18)) & 2047L; - values[valuesOffset++] = (block1.TripleShift(7)) & 2047L; + values[valuesOffset++] = ((block0 & 511L) << 2) | (block1 >>> 62); + values[valuesOffset++] = (block1 >>> 51) & 2047L; + values[valuesOffset++] = (block1 >>> 40) & 2047L; + values[valuesOffset++] = (block1 >>> 29) & 2047L; + values[valuesOffset++] = (block1 >>> 18) & 2047L; + values[valuesOffset++] = (block1 >>> 7) & 2047L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 127L) << 4) | (block2.TripleShift(60)); - values[valuesOffset++] = (block2.TripleShift(49)) & 2047L; - values[valuesOffset++] = (block2.TripleShift(38)) & 2047L; - values[valuesOffset++] = (block2.TripleShift(27)) & 2047L; - values[valuesOffset++] = (block2.TripleShift(16)) & 2047L; - values[valuesOffset++] = (block2.TripleShift(5)) & 2047L; + values[valuesOffset++] = ((block1 & 127L) << 4) | (block2 >>> 60); + values[valuesOffset++] = (block2 >>> 49) & 2047L; + values[valuesOffset++] = (block2 >>> 38) & 2047L; + values[valuesOffset++] = (block2 >>> 27) & 2047L; + values[valuesOffset++] = (block2 >>> 16) & 2047L; + values[valuesOffset++] = (block2 >>> 5) & 2047L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 31L) << 6) | (block3.TripleShift(58)); - values[valuesOffset++] = (block3.TripleShift(47)) & 2047L; - values[valuesOffset++] = (block3.TripleShift(36)) & 2047L; - values[valuesOffset++] = (block3.TripleShift(25)) & 2047L; - values[valuesOffset++] = (block3.TripleShift(14)) & 2047L; - values[valuesOffset++] = (block3.TripleShift(3)) & 2047L; + values[valuesOffset++] = ((block2 & 31L) << 6) | (block3 >>> 58); + values[valuesOffset++] = (block3 >>> 47) & 2047L; + values[valuesOffset++] = (block3 >>> 36) & 2047L; + values[valuesOffset++] = (block3 >>> 25) & 2047L; + values[valuesOffset++] = (block3 >>> 14) & 2047L; + values[valuesOffset++] = (block3 >>> 3) & 2047L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 7L) << 8) | (block4.TripleShift(56)); - values[valuesOffset++] = (block4.TripleShift(45)) & 2047L; - values[valuesOffset++] = (block4.TripleShift(34)) & 2047L; - values[valuesOffset++] = (block4.TripleShift(23)) & 2047L; - values[valuesOffset++] = (block4.TripleShift(12)) & 2047L; - values[valuesOffset++] = (block4.TripleShift(1)) & 2047L; + values[valuesOffset++] = ((block3 & 7L) << 8) | (block4 >>> 56); + values[valuesOffset++] = (block4 >>> 45) & 2047L; + values[valuesOffset++] = (block4 >>> 34) & 2047L; + values[valuesOffset++] = (block4 >>> 23) & 2047L; + values[valuesOffset++] = (block4 >>> 12) & 2047L; + values[valuesOffset++] = (block4 >>> 1) & 2047L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1L) << 10) | (block5.TripleShift(54)); - values[valuesOffset++] = (block5.TripleShift(43)) & 2047L; - values[valuesOffset++] = (block5.TripleShift(32)) & 2047L; - values[valuesOffset++] = (block5.TripleShift(21)) & 2047L; - values[valuesOffset++] = (block5.TripleShift(10)) & 2047L; + values[valuesOffset++] = ((block4 & 1L) << 10) | (block5 >>> 54); + values[valuesOffset++] = (block5 >>> 43) & 2047L; + values[valuesOffset++] = (block5 >>> 32) & 2047L; + values[valuesOffset++] = (block5 >>> 21) & 2047L; + values[valuesOffset++] = (block5 >>> 10) & 2047L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1023L) << 1) | (block6.TripleShift(63)); - values[valuesOffset++] = (block6.TripleShift(52)) & 2047L; - values[valuesOffset++] = (block6.TripleShift(41)) & 2047L; - values[valuesOffset++] = (block6.TripleShift(30)) & 2047L; - values[valuesOffset++] = (block6.TripleShift(19)) & 2047L; - values[valuesOffset++] = (block6.TripleShift(8)) & 2047L; + values[valuesOffset++] = ((block5 & 1023L) << 1) | (block6 >>> 63); + values[valuesOffset++] = (block6 >>> 52) & 2047L; + values[valuesOffset++] = (block6 >>> 41) & 2047L; + values[valuesOffset++] = (block6 >>> 30) & 2047L; + values[valuesOffset++] = (block6 >>> 19) & 2047L; + values[valuesOffset++] = (block6 >>> 8) & 2047L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 255L) << 3) | (block7.TripleShift(61)); - values[valuesOffset++] = (block7.TripleShift(50)) & 2047L; - values[valuesOffset++] = (block7.TripleShift(39)) & 2047L; - values[valuesOffset++] = (block7.TripleShift(28)) & 2047L; - values[valuesOffset++] = (block7.TripleShift(17)) & 2047L; - values[valuesOffset++] = (block7.TripleShift(6)) & 2047L; + values[valuesOffset++] = ((block6 & 255L) << 3) | (block7 >>> 61); + values[valuesOffset++] = (block7 >>> 50) & 2047L; + values[valuesOffset++] = (block7 >>> 39) & 2047L; + values[valuesOffset++] = (block7 >>> 28) & 2047L; + values[valuesOffset++] = (block7 >>> 17) & 2047L; + values[valuesOffset++] = (block7 >>> 6) & 2047L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 63L) << 5) | (block8.TripleShift(59)); - values[valuesOffset++] = (block8.TripleShift(48)) & 2047L; - values[valuesOffset++] = (block8.TripleShift(37)) & 2047L; - values[valuesOffset++] = (block8.TripleShift(26)) & 2047L; - values[valuesOffset++] = (block8.TripleShift(15)) & 2047L; - values[valuesOffset++] = (block8.TripleShift(4)) & 2047L; + values[valuesOffset++] = ((block7 & 63L) << 5) | (block8 >>> 59); + values[valuesOffset++] = (block8 >>> 48) & 2047L; + values[valuesOffset++] = (block8 >>> 37) & 2047L; + values[valuesOffset++] = (block8 >>> 26) & 2047L; + values[valuesOffset++] = (block8 >>> 15) & 2047L; + values[valuesOffset++] = (block8 >>> 4) & 2047L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 7) | (block9.TripleShift(57)); - values[valuesOffset++] = (block9.TripleShift(46)) & 2047L; - values[valuesOffset++] = (block9.TripleShift(35)) & 2047L; - values[valuesOffset++] = (block9.TripleShift(24)) & 2047L; - values[valuesOffset++] = (block9.TripleShift(13)) & 2047L; - values[valuesOffset++] = (block9.TripleShift(2)) & 2047L; + values[valuesOffset++] = ((block8 & 15L) << 7) | (block9 >>> 57); + values[valuesOffset++] = (block9 >>> 46) & 2047L; + values[valuesOffset++] = (block9 >>> 35) & 2047L; + values[valuesOffset++] = (block9 >>> 24) & 2047L; + values[valuesOffset++] = (block9 >>> 13) & 2047L; + values[valuesOffset++] = (block9 >>> 2) & 2047L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 3L) << 9) | (block10.TripleShift(55)); - values[valuesOffset++] = (block10.TripleShift(44)) & 2047L; - values[valuesOffset++] = (block10.TripleShift(33)) & 2047L; - values[valuesOffset++] = (block10.TripleShift(22)) & 2047L; - values[valuesOffset++] = (block10.TripleShift(11)) & 2047L; + values[valuesOffset++] = ((block9 & 3L) << 9) | (block10 >>> 55); + values[valuesOffset++] = (block10 >>> 44) & 2047L; + values[valuesOffset++] = (block10 >>> 33) & 2047L; + values[valuesOffset++] = (block10 >>> 22) & 2047L; + values[valuesOffset++] = (block10 >>> 11) & 2047L; values[valuesOffset++] = block10 & 2047L; } } @@ -227,24 +225,24 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 3) | (byte1.TripleShift(5)); + values[valuesOffset++] = (byte0 << 3) | (byte1 >>> 5); long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2.TripleShift(2)); + values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4.TripleShift(7)); + values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7); long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5.TripleShift(4)); + values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4); long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6.TripleShift(1)); + values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1); long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8.TripleShift(6)); + values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6); long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9.TripleShift(3)); + values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3); long byte10 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte9 & 7) << 8) | byte10; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked12.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked12.cs index 41b4ab298f..9e81409705 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked12.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked12.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,23 +34,23 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(52)); - values[valuesOffset++] = (int)((block0.TripleShift(40)) & 4095L); - values[valuesOffset++] = (int)((block0.TripleShift(28)) & 4095L); - values[valuesOffset++] = (int)((block0.TripleShift(16)) & 4095L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 4095L); + values[valuesOffset++] = (int)(block0 >>> 52); + values[valuesOffset++] = (int)((block0 >>> 40) & 4095L); + values[valuesOffset++] = (int)((block0 >>> 28) & 4095L); + values[valuesOffset++] = (int)((block0 >>> 16) & 4095L); + values[valuesOffset++] = (int)((block0 >>> 4) & 4095L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 8) | (block1.TripleShift(56))); - values[valuesOffset++] = (int)((block1.TripleShift(44)) & 4095L); - values[valuesOffset++] = (int)((block1.TripleShift(32)) & 4095L); - values[valuesOffset++] = (int)((block1.TripleShift(20)) & 4095L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 4095L); + values[valuesOffset++] = (int)(((block0 & 15L) << 8) | (block1 >>> 56)); + values[valuesOffset++] = (int)((block1 >>> 44) & 4095L); + values[valuesOffset++] = (int)((block1 >>> 32) & 4095L); + values[valuesOffset++] = (int)((block1 >>> 20) & 4095L); + values[valuesOffset++] = (int)((block1 >>> 8) & 4095L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 255L) << 4) | (block2.TripleShift(60))); - values[valuesOffset++] = (int)((block2.TripleShift(48)) & 4095L); - values[valuesOffset++] = (int)((block2.TripleShift(36)) & 4095L); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 4095L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 4095L); + values[valuesOffset++] = (int)(((block1 & 255L) << 4) | (block2 >>> 60)); + values[valuesOffset++] = (int)((block2 >>> 48) & 4095L); + values[valuesOffset++] = (int)((block2 >>> 36) & 4095L); + values[valuesOffset++] = (int)((block2 >>> 24) & 4095L); + values[valuesOffset++] = (int)((block2 >>> 12) & 4095L); values[valuesOffset++] = (int)(block2 & 4095L); } } @@ -63,7 +61,7 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 4) | (byte1.TripleShift(4)); + values[valuesOffset++] = (byte0 << 4) | (byte1 >>> 4); int byte2 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte1 & 15) << 8) | byte2; } @@ -74,23 +72,23 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(52); - values[valuesOffset++] = (block0.TripleShift(40)) & 4095L; - values[valuesOffset++] = (block0.TripleShift(28)) & 4095L; - values[valuesOffset++] = (block0.TripleShift(16)) & 4095L; - values[valuesOffset++] = (block0.TripleShift(4)) & 4095L; + values[valuesOffset++] = block0 >>> 52; + values[valuesOffset++] = (block0 >>> 40) & 4095L; + values[valuesOffset++] = (block0 >>> 28) & 4095L; + values[valuesOffset++] = (block0 >>> 16) & 4095L; + values[valuesOffset++] = (block0 >>> 4) & 4095L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 8) | (block1.TripleShift(56)); - values[valuesOffset++] = (block1.TripleShift(44)) & 4095L; - values[valuesOffset++] = (block1.TripleShift(32)) & 4095L; - values[valuesOffset++] = (block1.TripleShift(20)) & 4095L; - values[valuesOffset++] = (block1.TripleShift(8)) & 4095L; + values[valuesOffset++] = ((block0 & 15L) << 8) | (block1 >>> 56); + values[valuesOffset++] = (block1 >>> 44) & 4095L; + values[valuesOffset++] = (block1 >>> 32) & 4095L; + values[valuesOffset++] = (block1 >>> 20) & 4095L; + values[valuesOffset++] = (block1 >>> 8) & 4095L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 4) | (block2.TripleShift(60)); - values[valuesOffset++] = (block2.TripleShift(48)) & 4095L; - values[valuesOffset++] = (block2.TripleShift(36)) & 4095L; - values[valuesOffset++] = (block2.TripleShift(24)) & 4095L; - values[valuesOffset++] = (block2.TripleShift(12)) & 4095L; + values[valuesOffset++] = ((block1 & 255L) << 4) | (block2 >>> 60); + values[valuesOffset++] = (block2 >>> 48) & 4095L; + values[valuesOffset++] = (block2 >>> 36) & 4095L; + values[valuesOffset++] = (block2 >>> 24) & 4095L; + values[valuesOffset++] = (block2 >>> 12) & 4095L; values[valuesOffset++] = block2 & 4095L; } } @@ -101,10 +99,10 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 4) | (byte1.TripleShift(4)); + values[valuesOffset++] = (byte0 << 4) | (byte1 >>> 4); long byte2 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte1 & 15) << 8) | byte2; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked13.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked13.cs index cafecee73f..dd912fec73 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked13.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked13.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,81 +34,81 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(51)); - values[valuesOffset++] = (int)((block0.TripleShift(38)) & 8191L); - values[valuesOffset++] = (int)((block0.TripleShift(25)) & 8191L); - values[valuesOffset++] = (int)((block0.TripleShift(12)) & 8191L); + values[valuesOffset++] = (int)(block0 >>> 51); + values[valuesOffset++] = (int)((block0 >>> 38) & 8191L); + values[valuesOffset++] = (int)((block0 >>> 25) & 8191L); + values[valuesOffset++] = (int)((block0 >>> 12) & 8191L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 4095L) << 1) | (block1.TripleShift(63))); - values[valuesOffset++] = (int)((block1.TripleShift(50)) & 8191L); - values[valuesOffset++] = (int)((block1.TripleShift(37)) & 8191L); - values[valuesOffset++] = (int)((block1.TripleShift(24)) & 8191L); - values[valuesOffset++] = (int)((block1.TripleShift(11)) & 8191L); + values[valuesOffset++] = (int)(((block0 & 4095L) << 1) | (block1 >>> 63)); + values[valuesOffset++] = (int)((block1 >>> 50) & 8191L); + values[valuesOffset++] = (int)((block1 >>> 37) & 8191L); + values[valuesOffset++] = (int)((block1 >>> 24) & 8191L); + values[valuesOffset++] = (int)((block1 >>> 11) & 8191L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 2047L) << 2) | (block2.TripleShift(62))); - values[valuesOffset++] = (int)((block2.TripleShift(49)) & 8191L); - values[valuesOffset++] = (int)((block2.TripleShift(36)) & 8191L); - values[valuesOffset++] = (int)((block2.TripleShift(23)) & 8191L); - values[valuesOffset++] = (int)((block2.TripleShift(10)) & 8191L); + values[valuesOffset++] = (int)(((block1 & 2047L) << 2) | (block2 >>> 62)); + values[valuesOffset++] = (int)((block2 >>> 49) & 8191L); + values[valuesOffset++] = (int)((block2 >>> 36) & 8191L); + values[valuesOffset++] = (int)((block2 >>> 23) & 8191L); + values[valuesOffset++] = (int)((block2 >>> 10) & 8191L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 1023L) << 3) | (block3.TripleShift(61))); - values[valuesOffset++] = (int)((block3.TripleShift(48)) & 8191L); - values[valuesOffset++] = (int)((block3.TripleShift(35)) & 8191L); - values[valuesOffset++] = (int)((block3.TripleShift(22)) & 8191L); - values[valuesOffset++] = (int)((block3.TripleShift(9)) & 8191L); + values[valuesOffset++] = (int)(((block2 & 1023L) << 3) | (block3 >>> 61)); + values[valuesOffset++] = (int)((block3 >>> 48) & 8191L); + values[valuesOffset++] = (int)((block3 >>> 35) & 8191L); + values[valuesOffset++] = (int)((block3 >>> 22) & 8191L); + values[valuesOffset++] = (int)((block3 >>> 9) & 8191L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 511L) << 4) | (block4.TripleShift(60))); - values[valuesOffset++] = (int)((block4.TripleShift(47)) & 8191L); - values[valuesOffset++] = (int)((block4.TripleShift(34)) & 8191L); - values[valuesOffset++] = (int)((block4.TripleShift(21)) & 8191L); - values[valuesOffset++] = (int)((block4.TripleShift(8)) & 8191L); + values[valuesOffset++] = (int)(((block3 & 511L) << 4) | (block4 >>> 60)); + values[valuesOffset++] = (int)((block4 >>> 47) & 8191L); + values[valuesOffset++] = (int)((block4 >>> 34) & 8191L); + values[valuesOffset++] = (int)((block4 >>> 21) & 8191L); + values[valuesOffset++] = (int)((block4 >>> 8) & 8191L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 255L) << 5) | (block5.TripleShift(59))); - values[valuesOffset++] = (int)((block5.TripleShift(46)) & 8191L); - values[valuesOffset++] = (int)((block5.TripleShift(33)) & 8191L); - values[valuesOffset++] = (int)((block5.TripleShift(20)) & 8191L); - values[valuesOffset++] = (int)((block5.TripleShift(7)) & 8191L); + values[valuesOffset++] = (int)(((block4 & 255L) << 5) | (block5 >>> 59)); + values[valuesOffset++] = (int)((block5 >>> 46) & 8191L); + values[valuesOffset++] = (int)((block5 >>> 33) & 8191L); + values[valuesOffset++] = (int)((block5 >>> 20) & 8191L); + values[valuesOffset++] = (int)((block5 >>> 7) & 8191L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 127L) << 6) | (block6.TripleShift(58))); - values[valuesOffset++] = (int)((block6.TripleShift(45)) & 8191L); - values[valuesOffset++] = (int)((block6.TripleShift(32)) & 8191L); - values[valuesOffset++] = (int)((block6.TripleShift(19)) & 8191L); - values[valuesOffset++] = (int)((block6.TripleShift(6)) & 8191L); + values[valuesOffset++] = (int)(((block5 & 127L) << 6) | (block6 >>> 58)); + values[valuesOffset++] = (int)((block6 >>> 45) & 8191L); + values[valuesOffset++] = (int)((block6 >>> 32) & 8191L); + values[valuesOffset++] = (int)((block6 >>> 19) & 8191L); + values[valuesOffset++] = (int)((block6 >>> 6) & 8191L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 63L) << 7) | (block7.TripleShift(57))); - values[valuesOffset++] = (int)((block7.TripleShift(44)) & 8191L); - values[valuesOffset++] = (int)((block7.TripleShift(31)) & 8191L); - values[valuesOffset++] = (int)((block7.TripleShift(18)) & 8191L); - values[valuesOffset++] = (int)((block7.TripleShift(5)) & 8191L); + values[valuesOffset++] = (int)(((block6 & 63L) << 7) | (block7 >>> 57)); + values[valuesOffset++] = (int)((block7 >>> 44) & 8191L); + values[valuesOffset++] = (int)((block7 >>> 31) & 8191L); + values[valuesOffset++] = (int)((block7 >>> 18) & 8191L); + values[valuesOffset++] = (int)((block7 >>> 5) & 8191L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 31L) << 8) | (block8.TripleShift(56))); - values[valuesOffset++] = (int)((block8.TripleShift(43)) & 8191L); - values[valuesOffset++] = (int)((block8.TripleShift(30)) & 8191L); - values[valuesOffset++] = (int)((block8.TripleShift(17)) & 8191L); - values[valuesOffset++] = (int)((block8.TripleShift(4)) & 8191L); + values[valuesOffset++] = (int)(((block7 & 31L) << 8) | (block8 >>> 56)); + values[valuesOffset++] = (int)((block8 >>> 43) & 8191L); + values[valuesOffset++] = (int)((block8 >>> 30) & 8191L); + values[valuesOffset++] = (int)((block8 >>> 17) & 8191L); + values[valuesOffset++] = (int)((block8 >>> 4) & 8191L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 15L) << 9) | (block9.TripleShift(55))); - values[valuesOffset++] = (int)((block9.TripleShift(42)) & 8191L); - values[valuesOffset++] = (int)((block9.TripleShift(29)) & 8191L); - values[valuesOffset++] = (int)((block9.TripleShift(16)) & 8191L); - values[valuesOffset++] = (int)((block9.TripleShift(3)) & 8191L); + values[valuesOffset++] = (int)(((block8 & 15L) << 9) | (block9 >>> 55)); + values[valuesOffset++] = (int)((block9 >>> 42) & 8191L); + values[valuesOffset++] = (int)((block9 >>> 29) & 8191L); + values[valuesOffset++] = (int)((block9 >>> 16) & 8191L); + values[valuesOffset++] = (int)((block9 >>> 3) & 8191L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 7L) << 10) | (block10.TripleShift(54))); - values[valuesOffset++] = (int)((block10.TripleShift(41)) & 8191L); - values[valuesOffset++] = (int)((block10.TripleShift(28)) & 8191L); - values[valuesOffset++] = (int)((block10.TripleShift(15)) & 8191L); - values[valuesOffset++] = (int)((block10.TripleShift(2)) & 8191L); + values[valuesOffset++] = (int)(((block9 & 7L) << 10) | (block10 >>> 54)); + values[valuesOffset++] = (int)((block10 >>> 41) & 8191L); + values[valuesOffset++] = (int)((block10 >>> 28) & 8191L); + values[valuesOffset++] = (int)((block10 >>> 15) & 8191L); + values[valuesOffset++] = (int)((block10 >>> 2) & 8191L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 3L) << 11) | (block11.TripleShift(53))); - values[valuesOffset++] = (int)((block11.TripleShift(40)) & 8191L); - values[valuesOffset++] = (int)((block11.TripleShift(27)) & 8191L); - values[valuesOffset++] = (int)((block11.TripleShift(14)) & 8191L); - values[valuesOffset++] = (int)((block11.TripleShift(1)) & 8191L); + values[valuesOffset++] = (int)(((block10 & 3L) << 11) | (block11 >>> 53)); + values[valuesOffset++] = (int)((block11 >>> 40) & 8191L); + values[valuesOffset++] = (int)((block11 >>> 27) & 8191L); + values[valuesOffset++] = (int)((block11 >>> 14) & 8191L); + values[valuesOffset++] = (int)((block11 >>> 1) & 8191L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 1L) << 12) | (block12.TripleShift(52))); - values[valuesOffset++] = (int)((block12.TripleShift(39)) & 8191L); - values[valuesOffset++] = (int)((block12.TripleShift(26)) & 8191L); - values[valuesOffset++] = (int)((block12.TripleShift(13)) & 8191L); + values[valuesOffset++] = (int)(((block11 & 1L) << 12) | (block12 >>> 52)); + values[valuesOffset++] = (int)((block12 >>> 39) & 8191L); + values[valuesOffset++] = (int)((block12 >>> 26) & 8191L); + values[valuesOffset++] = (int)((block12 >>> 13) & 8191L); values[valuesOffset++] = (int)(block12 & 8191L); } } @@ -121,23 +119,23 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 5) | (byte1.TripleShift(3)); + values[valuesOffset++] = (byte0 << 5) | (byte1 >>> 3); int byte2 = blocks[blocksOffset++] & 0xFF; int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6); int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4.TripleShift(1)); + values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1); int byte5 = blocks[blocksOffset++] & 0xFF; int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6.TripleShift(4)); + values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4); int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8.TripleShift(7)); + values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7); int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9.TripleShift(2)); + values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2); int byte10 = blocks[blocksOffset++] & 0xFF; int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11.TripleShift(5)); + values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5); int byte12 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte11 & 31) << 8) | byte12; } @@ -148,81 +146,81 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(51); - values[valuesOffset++] = (block0.TripleShift(38)) & 8191L; - values[valuesOffset++] = (block0.TripleShift(25)) & 8191L; - values[valuesOffset++] = (block0.TripleShift(12)) & 8191L; + values[valuesOffset++] = block0 >>> 51; + values[valuesOffset++] = (block0 >>> 38) & 8191L; + values[valuesOffset++] = (block0 >>> 25) & 8191L; + values[valuesOffset++] = (block0 >>> 12) & 8191L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 4095L) << 1) | (block1.TripleShift(63)); - values[valuesOffset++] = (block1.TripleShift(50)) & 8191L; - values[valuesOffset++] = (block1.TripleShift(37)) & 8191L; - values[valuesOffset++] = (block1.TripleShift(24)) & 8191L; - values[valuesOffset++] = (block1.TripleShift(11)) & 8191L; + values[valuesOffset++] = ((block0 & 4095L) << 1) | (block1 >>> 63); + values[valuesOffset++] = (block1 >>> 50) & 8191L; + values[valuesOffset++] = (block1 >>> 37) & 8191L; + values[valuesOffset++] = (block1 >>> 24) & 8191L; + values[valuesOffset++] = (block1 >>> 11) & 8191L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 2047L) << 2) | (block2.TripleShift(62)); - values[valuesOffset++] = (block2.TripleShift(49)) & 8191L; - values[valuesOffset++] = (block2.TripleShift(36)) & 8191L; - values[valuesOffset++] = (block2.TripleShift(23)) & 8191L; - values[valuesOffset++] = (block2.TripleShift(10)) & 8191L; + values[valuesOffset++] = ((block1 & 2047L) << 2) | (block2 >>> 62); + values[valuesOffset++] = (block2 >>> 49) & 8191L; + values[valuesOffset++] = (block2 >>> 36) & 8191L; + values[valuesOffset++] = (block2 >>> 23) & 8191L; + values[valuesOffset++] = (block2 >>> 10) & 8191L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 1023L) << 3) | (block3.TripleShift(61)); - values[valuesOffset++] = (block3.TripleShift(48)) & 8191L; - values[valuesOffset++] = (block3.TripleShift(35)) & 8191L; - values[valuesOffset++] = (block3.TripleShift(22)) & 8191L; - values[valuesOffset++] = (block3.TripleShift(9)) & 8191L; + values[valuesOffset++] = ((block2 & 1023L) << 3) | (block3 >>> 61); + values[valuesOffset++] = (block3 >>> 48) & 8191L; + values[valuesOffset++] = (block3 >>> 35) & 8191L; + values[valuesOffset++] = (block3 >>> 22) & 8191L; + values[valuesOffset++] = (block3 >>> 9) & 8191L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 511L) << 4) | (block4.TripleShift(60)); - values[valuesOffset++] = (block4.TripleShift(47)) & 8191L; - values[valuesOffset++] = (block4.TripleShift(34)) & 8191L; - values[valuesOffset++] = (block4.TripleShift(21)) & 8191L; - values[valuesOffset++] = (block4.TripleShift(8)) & 8191L; + values[valuesOffset++] = ((block3 & 511L) << 4) | (block4 >>> 60); + values[valuesOffset++] = (block4 >>> 47) & 8191L; + values[valuesOffset++] = (block4 >>> 34) & 8191L; + values[valuesOffset++] = (block4 >>> 21) & 8191L; + values[valuesOffset++] = (block4 >>> 8) & 8191L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 255L) << 5) | (block5.TripleShift(59)); - values[valuesOffset++] = (block5.TripleShift(46)) & 8191L; - values[valuesOffset++] = (block5.TripleShift(33)) & 8191L; - values[valuesOffset++] = (block5.TripleShift(20)) & 8191L; - values[valuesOffset++] = (block5.TripleShift(7)) & 8191L; + values[valuesOffset++] = ((block4 & 255L) << 5) | (block5 >>> 59); + values[valuesOffset++] = (block5 >>> 46) & 8191L; + values[valuesOffset++] = (block5 >>> 33) & 8191L; + values[valuesOffset++] = (block5 >>> 20) & 8191L; + values[valuesOffset++] = (block5 >>> 7) & 8191L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 127L) << 6) | (block6.TripleShift(58)); - values[valuesOffset++] = (block6.TripleShift(45)) & 8191L; - values[valuesOffset++] = (block6.TripleShift(32)) & 8191L; - values[valuesOffset++] = (block6.TripleShift(19)) & 8191L; - values[valuesOffset++] = (block6.TripleShift(6)) & 8191L; + values[valuesOffset++] = ((block5 & 127L) << 6) | (block6 >>> 58); + values[valuesOffset++] = (block6 >>> 45) & 8191L; + values[valuesOffset++] = (block6 >>> 32) & 8191L; + values[valuesOffset++] = (block6 >>> 19) & 8191L; + values[valuesOffset++] = (block6 >>> 6) & 8191L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 63L) << 7) | (block7.TripleShift(57)); - values[valuesOffset++] = (block7.TripleShift(44)) & 8191L; - values[valuesOffset++] = (block7.TripleShift(31)) & 8191L; - values[valuesOffset++] = (block7.TripleShift(18)) & 8191L; - values[valuesOffset++] = (block7.TripleShift(5)) & 8191L; + values[valuesOffset++] = ((block6 & 63L) << 7) | (block7 >>> 57); + values[valuesOffset++] = (block7 >>> 44) & 8191L; + values[valuesOffset++] = (block7 >>> 31) & 8191L; + values[valuesOffset++] = (block7 >>> 18) & 8191L; + values[valuesOffset++] = (block7 >>> 5) & 8191L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 31L) << 8) | (block8.TripleShift(56)); - values[valuesOffset++] = (block8.TripleShift(43)) & 8191L; - values[valuesOffset++] = (block8.TripleShift(30)) & 8191L; - values[valuesOffset++] = (block8.TripleShift(17)) & 8191L; - values[valuesOffset++] = (block8.TripleShift(4)) & 8191L; + values[valuesOffset++] = ((block7 & 31L) << 8) | (block8 >>> 56); + values[valuesOffset++] = (block8 >>> 43) & 8191L; + values[valuesOffset++] = (block8 >>> 30) & 8191L; + values[valuesOffset++] = (block8 >>> 17) & 8191L; + values[valuesOffset++] = (block8 >>> 4) & 8191L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 9) | (block9.TripleShift(55)); - values[valuesOffset++] = (block9.TripleShift(42)) & 8191L; - values[valuesOffset++] = (block9.TripleShift(29)) & 8191L; - values[valuesOffset++] = (block9.TripleShift(16)) & 8191L; - values[valuesOffset++] = (block9.TripleShift(3)) & 8191L; + values[valuesOffset++] = ((block8 & 15L) << 9) | (block9 >>> 55); + values[valuesOffset++] = (block9 >>> 42) & 8191L; + values[valuesOffset++] = (block9 >>> 29) & 8191L; + values[valuesOffset++] = (block9 >>> 16) & 8191L; + values[valuesOffset++] = (block9 >>> 3) & 8191L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 7L) << 10) | (block10.TripleShift(54)); - values[valuesOffset++] = (block10.TripleShift(41)) & 8191L; - values[valuesOffset++] = (block10.TripleShift(28)) & 8191L; - values[valuesOffset++] = (block10.TripleShift(15)) & 8191L; - values[valuesOffset++] = (block10.TripleShift(2)) & 8191L; + values[valuesOffset++] = ((block9 & 7L) << 10) | (block10 >>> 54); + values[valuesOffset++] = (block10 >>> 41) & 8191L; + values[valuesOffset++] = (block10 >>> 28) & 8191L; + values[valuesOffset++] = (block10 >>> 15) & 8191L; + values[valuesOffset++] = (block10 >>> 2) & 8191L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 3L) << 11) | (block11.TripleShift(53)); - values[valuesOffset++] = (block11.TripleShift(40)) & 8191L; - values[valuesOffset++] = (block11.TripleShift(27)) & 8191L; - values[valuesOffset++] = (block11.TripleShift(14)) & 8191L; - values[valuesOffset++] = (block11.TripleShift(1)) & 8191L; + values[valuesOffset++] = ((block10 & 3L) << 11) | (block11 >>> 53); + values[valuesOffset++] = (block11 >>> 40) & 8191L; + values[valuesOffset++] = (block11 >>> 27) & 8191L; + values[valuesOffset++] = (block11 >>> 14) & 8191L; + values[valuesOffset++] = (block11 >>> 1) & 8191L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 1L) << 12) | (block12.TripleShift(52)); - values[valuesOffset++] = (block12.TripleShift(39)) & 8191L; - values[valuesOffset++] = (block12.TripleShift(26)) & 8191L; - values[valuesOffset++] = (block12.TripleShift(13)) & 8191L; + values[valuesOffset++] = ((block11 & 1L) << 12) | (block12 >>> 52); + values[valuesOffset++] = (block12 >>> 39) & 8191L; + values[valuesOffset++] = (block12 >>> 26) & 8191L; + values[valuesOffset++] = (block12 >>> 13) & 8191L; values[valuesOffset++] = block12 & 8191L; } } @@ -233,26 +231,26 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 5) | (byte1.TripleShift(3)); + values[valuesOffset++] = (byte0 << 5) | (byte1 >>> 3); long byte2 = blocks[blocksOffset++] & 0xFF; long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6); long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4.TripleShift(1)); + values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1); long byte5 = blocks[blocksOffset++] & 0xFF; long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6.TripleShift(4)); + values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4); long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8.TripleShift(7)); + values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7); long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9.TripleShift(2)); + values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2); long byte10 = blocks[blocksOffset++] & 0xFF; long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11.TripleShift(5)); + values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5); long byte12 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte11 & 31) << 8) | byte12; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked14.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked14.cs index 277f7f2446..1afe982c63 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked14.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked14.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,43 +34,43 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(50)); - values[valuesOffset++] = (int)((block0.TripleShift(36)) & 16383L); - values[valuesOffset++] = (int)((block0.TripleShift(22)) & 16383L); - values[valuesOffset++] = (int)((block0.TripleShift(8)) & 16383L); + values[valuesOffset++] = (int)(block0 >>> 50); + values[valuesOffset++] = (int)((block0 >>> 36) & 16383L); + values[valuesOffset++] = (int)((block0 >>> 22) & 16383L); + values[valuesOffset++] = (int)((block0 >>> 8) & 16383L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 255L) << 6) | (block1.TripleShift(58))); - values[valuesOffset++] = (int)((block1.TripleShift(44)) & 16383L); - values[valuesOffset++] = (int)((block1.TripleShift(30)) & 16383L); - values[valuesOffset++] = (int)((block1.TripleShift(16)) & 16383L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 16383L); + values[valuesOffset++] = (int)(((block0 & 255L) << 6) | (block1 >>> 58)); + values[valuesOffset++] = (int)((block1 >>> 44) & 16383L); + values[valuesOffset++] = (int)((block1 >>> 30) & 16383L); + values[valuesOffset++] = (int)((block1 >>> 16) & 16383L); + values[valuesOffset++] = (int)((block1 >>> 2) & 16383L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 12) | (block2.TripleShift(52))); - values[valuesOffset++] = (int)((block2.TripleShift(38)) & 16383L); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 16383L); - values[valuesOffset++] = (int)((block2.TripleShift(10)) & 16383L); + values[valuesOffset++] = (int)(((block1 & 3L) << 12) | (block2 >>> 52)); + values[valuesOffset++] = (int)((block2 >>> 38) & 16383L); + values[valuesOffset++] = (int)((block2 >>> 24) & 16383L); + values[valuesOffset++] = (int)((block2 >>> 10) & 16383L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 1023L) << 4) | (block3.TripleShift(60))); - values[valuesOffset++] = (int)((block3.TripleShift(46)) & 16383L); - values[valuesOffset++] = (int)((block3.TripleShift(32)) & 16383L); - values[valuesOffset++] = (int)((block3.TripleShift(18)) & 16383L); - values[valuesOffset++] = (int)((block3.TripleShift(4)) & 16383L); + values[valuesOffset++] = (int)(((block2 & 1023L) << 4) | (block3 >>> 60)); + values[valuesOffset++] = (int)((block3 >>> 46) & 16383L); + values[valuesOffset++] = (int)((block3 >>> 32) & 16383L); + values[valuesOffset++] = (int)((block3 >>> 18) & 16383L); + values[valuesOffset++] = (int)((block3 >>> 4) & 16383L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 15L) << 10) | (block4.TripleShift(54))); - values[valuesOffset++] = (int)((block4.TripleShift(40)) & 16383L); - values[valuesOffset++] = (int)((block4.TripleShift(26)) & 16383L); - values[valuesOffset++] = (int)((block4.TripleShift(12)) & 16383L); + values[valuesOffset++] = (int)(((block3 & 15L) << 10) | (block4 >>> 54)); + values[valuesOffset++] = (int)((block4 >>> 40) & 16383L); + values[valuesOffset++] = (int)((block4 >>> 26) & 16383L); + values[valuesOffset++] = (int)((block4 >>> 12) & 16383L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 4095L) << 2) | (block5.TripleShift(62))); - values[valuesOffset++] = (int)((block5.TripleShift(48)) & 16383L); - values[valuesOffset++] = (int)((block5.TripleShift(34)) & 16383L); - values[valuesOffset++] = (int)((block5.TripleShift(20)) & 16383L); - values[valuesOffset++] = (int)((block5.TripleShift(6)) & 16383L); + values[valuesOffset++] = (int)(((block4 & 4095L) << 2) | (block5 >>> 62)); + values[valuesOffset++] = (int)((block5 >>> 48) & 16383L); + values[valuesOffset++] = (int)((block5 >>> 34) & 16383L); + values[valuesOffset++] = (int)((block5 >>> 20) & 16383L); + values[valuesOffset++] = (int)((block5 >>> 6) & 16383L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 63L) << 8) | (block6.TripleShift(56))); - values[valuesOffset++] = (int)((block6.TripleShift(42)) & 16383L); - values[valuesOffset++] = (int)((block6.TripleShift(28)) & 16383L); - values[valuesOffset++] = (int)((block6.TripleShift(14)) & 16383L); + values[valuesOffset++] = (int)(((block5 & 63L) << 8) | (block6 >>> 56)); + values[valuesOffset++] = (int)((block6 >>> 42) & 16383L); + values[valuesOffset++] = (int)((block6 >>> 28) & 16383L); + values[valuesOffset++] = (int)((block6 >>> 14) & 16383L); values[valuesOffset++] = (int)(block6 & 16383L); } } @@ -83,13 +81,13 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 6) | (byte1.TripleShift(2)); + values[valuesOffset++] = (byte0 << 6) | (byte1 >>> 2); int byte2 = blocks[blocksOffset++] & 0xFF; int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4); int byte4 = blocks[blocksOffset++] & 0xFF; int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6); int byte6 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte5 & 63) << 8) | byte6; } @@ -100,43 +98,43 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(50); - values[valuesOffset++] = (block0.TripleShift(36)) & 16383L; - values[valuesOffset++] = (block0.TripleShift(22)) & 16383L; - values[valuesOffset++] = (block0.TripleShift(8)) & 16383L; + values[valuesOffset++] = block0 >>> 50; + values[valuesOffset++] = (block0 >>> 36) & 16383L; + values[valuesOffset++] = (block0 >>> 22) & 16383L; + values[valuesOffset++] = (block0 >>> 8) & 16383L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 255L) << 6) | (block1.TripleShift(58)); - values[valuesOffset++] = (block1.TripleShift(44)) & 16383L; - values[valuesOffset++] = (block1.TripleShift(30)) & 16383L; - values[valuesOffset++] = (block1.TripleShift(16)) & 16383L; - values[valuesOffset++] = (block1.TripleShift(2)) & 16383L; + values[valuesOffset++] = ((block0 & 255L) << 6) | (block1 >>> 58); + values[valuesOffset++] = (block1 >>> 44) & 16383L; + values[valuesOffset++] = (block1 >>> 30) & 16383L; + values[valuesOffset++] = (block1 >>> 16) & 16383L; + values[valuesOffset++] = (block1 >>> 2) & 16383L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 12) | (block2.TripleShift(52)); - values[valuesOffset++] = (block2.TripleShift(38)) & 16383L; - values[valuesOffset++] = (block2.TripleShift(24)) & 16383L; - values[valuesOffset++] = (block2.TripleShift(10)) & 16383L; + values[valuesOffset++] = ((block1 & 3L) << 12) | (block2 >>> 52); + values[valuesOffset++] = (block2 >>> 38) & 16383L; + values[valuesOffset++] = (block2 >>> 24) & 16383L; + values[valuesOffset++] = (block2 >>> 10) & 16383L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 1023L) << 4) | (block3.TripleShift(60)); - values[valuesOffset++] = (block3.TripleShift(46)) & 16383L; - values[valuesOffset++] = (block3.TripleShift(32)) & 16383L; - values[valuesOffset++] = (block3.TripleShift(18)) & 16383L; - values[valuesOffset++] = (block3.TripleShift(4)) & 16383L; + values[valuesOffset++] = ((block2 & 1023L) << 4) | (block3 >>> 60); + values[valuesOffset++] = (block3 >>> 46) & 16383L; + values[valuesOffset++] = (block3 >>> 32) & 16383L; + values[valuesOffset++] = (block3 >>> 18) & 16383L; + values[valuesOffset++] = (block3 >>> 4) & 16383L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 10) | (block4.TripleShift(54)); - values[valuesOffset++] = (block4.TripleShift(40)) & 16383L; - values[valuesOffset++] = (block4.TripleShift(26)) & 16383L; - values[valuesOffset++] = (block4.TripleShift(12)) & 16383L; + values[valuesOffset++] = ((block3 & 15L) << 10) | (block4 >>> 54); + values[valuesOffset++] = (block4 >>> 40) & 16383L; + values[valuesOffset++] = (block4 >>> 26) & 16383L; + values[valuesOffset++] = (block4 >>> 12) & 16383L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 4095L) << 2) | (block5.TripleShift(62)); - values[valuesOffset++] = (block5.TripleShift(48)) & 16383L; - values[valuesOffset++] = (block5.TripleShift(34)) & 16383L; - values[valuesOffset++] = (block5.TripleShift(20)) & 16383L; - values[valuesOffset++] = (block5.TripleShift(6)) & 16383L; + values[valuesOffset++] = ((block4 & 4095L) << 2) | (block5 >>> 62); + values[valuesOffset++] = (block5 >>> 48) & 16383L; + values[valuesOffset++] = (block5 >>> 34) & 16383L; + values[valuesOffset++] = (block5 >>> 20) & 16383L; + values[valuesOffset++] = (block5 >>> 6) & 16383L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 8) | (block6.TripleShift(56)); - values[valuesOffset++] = (block6.TripleShift(42)) & 16383L; - values[valuesOffset++] = (block6.TripleShift(28)) & 16383L; - values[valuesOffset++] = (block6.TripleShift(14)) & 16383L; + values[valuesOffset++] = ((block5 & 63L) << 8) | (block6 >>> 56); + values[valuesOffset++] = (block6 >>> 42) & 16383L; + values[valuesOffset++] = (block6 >>> 28) & 16383L; + values[valuesOffset++] = (block6 >>> 14) & 16383L; values[valuesOffset++] = block6 & 16383L; } } @@ -147,16 +145,16 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 6) | (byte1.TripleShift(2)); + values[valuesOffset++] = (byte0 << 6) | (byte1 >>> 2); long byte2 = blocks[blocksOffset++] & 0xFF; long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4); long byte4 = blocks[blocksOffset++] & 0xFF; long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6); long byte6 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte5 & 63) << 8) | byte6; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked15.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked15.cs index 358ef543af..f22146ac88 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked15.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked15.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,83 +34,83 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(49)); - values[valuesOffset++] = (int)((block0.TripleShift(34)) & 32767L); - values[valuesOffset++] = (int)((block0.TripleShift(19)) & 32767L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 32767L); + values[valuesOffset++] = (int)(block0 >>> 49); + values[valuesOffset++] = (int)((block0 >>> 34) & 32767L); + values[valuesOffset++] = (int)((block0 >>> 19) & 32767L); + values[valuesOffset++] = (int)((block0 >>> 4) & 32767L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 11) | (block1.TripleShift(53))); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 32767L); - values[valuesOffset++] = (int)((block1.TripleShift(23)) & 32767L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 32767L); + values[valuesOffset++] = (int)(((block0 & 15L) << 11) | (block1 >>> 53)); + values[valuesOffset++] = (int)((block1 >>> 38) & 32767L); + values[valuesOffset++] = (int)((block1 >>> 23) & 32767L); + values[valuesOffset++] = (int)((block1 >>> 8) & 32767L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 255L) << 7) | (block2.TripleShift(57))); - values[valuesOffset++] = (int)((block2.TripleShift(42)) & 32767L); - values[valuesOffset++] = (int)((block2.TripleShift(27)) & 32767L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 32767L); + values[valuesOffset++] = (int)(((block1 & 255L) << 7) | (block2 >>> 57)); + values[valuesOffset++] = (int)((block2 >>> 42) & 32767L); + values[valuesOffset++] = (int)((block2 >>> 27) & 32767L); + values[valuesOffset++] = (int)((block2 >>> 12) & 32767L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 4095L) << 3) | (block3.TripleShift(61))); - values[valuesOffset++] = (int)((block3.TripleShift(46)) & 32767L); - values[valuesOffset++] = (int)((block3.TripleShift(31)) & 32767L); - values[valuesOffset++] = (int)((block3.TripleShift(16)) & 32767L); - values[valuesOffset++] = (int)((block3.TripleShift(1)) & 32767L); + values[valuesOffset++] = (int)(((block2 & 4095L) << 3) | (block3 >>> 61)); + values[valuesOffset++] = (int)((block3 >>> 46) & 32767L); + values[valuesOffset++] = (int)((block3 >>> 31) & 32767L); + values[valuesOffset++] = (int)((block3 >>> 16) & 32767L); + values[valuesOffset++] = (int)((block3 >>> 1) & 32767L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 1L) << 14) | (block4.TripleShift(50))); - values[valuesOffset++] = (int)((block4.TripleShift(35)) & 32767L); - values[valuesOffset++] = (int)((block4.TripleShift(20)) & 32767L); - values[valuesOffset++] = (int)((block4.TripleShift(5)) & 32767L); + values[valuesOffset++] = (int)(((block3 & 1L) << 14) | (block4 >>> 50)); + values[valuesOffset++] = (int)((block4 >>> 35) & 32767L); + values[valuesOffset++] = (int)((block4 >>> 20) & 32767L); + values[valuesOffset++] = (int)((block4 >>> 5) & 32767L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 31L) << 10) | (block5.TripleShift(54))); - values[valuesOffset++] = (int)((block5.TripleShift(39)) & 32767L); - values[valuesOffset++] = (int)((block5.TripleShift(24)) & 32767L); - values[valuesOffset++] = (int)((block5.TripleShift(9)) & 32767L); + values[valuesOffset++] = (int)(((block4 & 31L) << 10) | (block5 >>> 54)); + values[valuesOffset++] = (int)((block5 >>> 39) & 32767L); + values[valuesOffset++] = (int)((block5 >>> 24) & 32767L); + values[valuesOffset++] = (int)((block5 >>> 9) & 32767L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 511L) << 6) | (block6.TripleShift(58))); - values[valuesOffset++] = (int)((block6.TripleShift(43)) & 32767L); - values[valuesOffset++] = (int)((block6.TripleShift(28)) & 32767L); - values[valuesOffset++] = (int)((block6.TripleShift(13)) & 32767L); + values[valuesOffset++] = (int)(((block5 & 511L) << 6) | (block6 >>> 58)); + values[valuesOffset++] = (int)((block6 >>> 43) & 32767L); + values[valuesOffset++] = (int)((block6 >>> 28) & 32767L); + values[valuesOffset++] = (int)((block6 >>> 13) & 32767L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 8191L) << 2) | (block7.TripleShift(62))); - values[valuesOffset++] = (int)((block7.TripleShift(47)) & 32767L); - values[valuesOffset++] = (int)((block7.TripleShift(32)) & 32767L); - values[valuesOffset++] = (int)((block7.TripleShift(17)) & 32767L); - values[valuesOffset++] = (int)((block7.TripleShift(2)) & 32767L); + values[valuesOffset++] = (int)(((block6 & 8191L) << 2) | (block7 >>> 62)); + values[valuesOffset++] = (int)((block7 >>> 47) & 32767L); + values[valuesOffset++] = (int)((block7 >>> 32) & 32767L); + values[valuesOffset++] = (int)((block7 >>> 17) & 32767L); + values[valuesOffset++] = (int)((block7 >>> 2) & 32767L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 3L) << 13) | (block8.TripleShift(51))); - values[valuesOffset++] = (int)((block8.TripleShift(36)) & 32767L); - values[valuesOffset++] = (int)((block8.TripleShift(21)) & 32767L); - values[valuesOffset++] = (int)((block8.TripleShift(6)) & 32767L); + values[valuesOffset++] = (int)(((block7 & 3L) << 13) | (block8 >>> 51)); + values[valuesOffset++] = (int)((block8 >>> 36) & 32767L); + values[valuesOffset++] = (int)((block8 >>> 21) & 32767L); + values[valuesOffset++] = (int)((block8 >>> 6) & 32767L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 63L) << 9) | (block9.TripleShift(55))); - values[valuesOffset++] = (int)((block9.TripleShift(40)) & 32767L); - values[valuesOffset++] = (int)((block9.TripleShift(25)) & 32767L); - values[valuesOffset++] = (int)((block9.TripleShift(10)) & 32767L); + values[valuesOffset++] = (int)(((block8 & 63L) << 9) | (block9 >>> 55)); + values[valuesOffset++] = (int)((block9 >>> 40) & 32767L); + values[valuesOffset++] = (int)((block9 >>> 25) & 32767L); + values[valuesOffset++] = (int)((block9 >>> 10) & 32767L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 1023L) << 5) | (block10.TripleShift(59))); - values[valuesOffset++] = (int)((block10.TripleShift(44)) & 32767L); - values[valuesOffset++] = (int)((block10.TripleShift(29)) & 32767L); - values[valuesOffset++] = (int)((block10.TripleShift(14)) & 32767L); + values[valuesOffset++] = (int)(((block9 & 1023L) << 5) | (block10 >>> 59)); + values[valuesOffset++] = (int)((block10 >>> 44) & 32767L); + values[valuesOffset++] = (int)((block10 >>> 29) & 32767L); + values[valuesOffset++] = (int)((block10 >>> 14) & 32767L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 16383L) << 1) | (block11.TripleShift(63))); - values[valuesOffset++] = (int)((block11.TripleShift(48)) & 32767L); - values[valuesOffset++] = (int)((block11.TripleShift(33)) & 32767L); - values[valuesOffset++] = (int)((block11.TripleShift(18)) & 32767L); - values[valuesOffset++] = (int)((block11.TripleShift(3)) & 32767L); + values[valuesOffset++] = (int)(((block10 & 16383L) << 1) | (block11 >>> 63)); + values[valuesOffset++] = (int)((block11 >>> 48) & 32767L); + values[valuesOffset++] = (int)((block11 >>> 33) & 32767L); + values[valuesOffset++] = (int)((block11 >>> 18) & 32767L); + values[valuesOffset++] = (int)((block11 >>> 3) & 32767L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 7L) << 12) | (block12.TripleShift(52))); - values[valuesOffset++] = (int)((block12.TripleShift(37)) & 32767L); - values[valuesOffset++] = (int)((block12.TripleShift(22)) & 32767L); - values[valuesOffset++] = (int)((block12.TripleShift(7)) & 32767L); + values[valuesOffset++] = (int)(((block11 & 7L) << 12) | (block12 >>> 52)); + values[valuesOffset++] = (int)((block12 >>> 37) & 32767L); + values[valuesOffset++] = (int)((block12 >>> 22) & 32767L); + values[valuesOffset++] = (int)((block12 >>> 7) & 32767L); long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block12 & 127L) << 8) | (block13.TripleShift(56))); - values[valuesOffset++] = (int)((block13.TripleShift(41)) & 32767L); - values[valuesOffset++] = (int)((block13.TripleShift(26)) & 32767L); - values[valuesOffset++] = (int)((block13.TripleShift(11)) & 32767L); + values[valuesOffset++] = (int)(((block12 & 127L) << 8) | (block13 >>> 56)); + values[valuesOffset++] = (int)((block13 >>> 41) & 32767L); + values[valuesOffset++] = (int)((block13 >>> 26) & 32767L); + values[valuesOffset++] = (int)((block13 >>> 11) & 32767L); long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block13 & 2047L) << 4) | (block14.TripleShift(60))); - values[valuesOffset++] = (int)((block14.TripleShift(45)) & 32767L); - values[valuesOffset++] = (int)((block14.TripleShift(30)) & 32767L); - values[valuesOffset++] = (int)((block14.TripleShift(15)) & 32767L); + values[valuesOffset++] = (int)(((block13 & 2047L) << 4) | (block14 >>> 60)); + values[valuesOffset++] = (int)((block14 >>> 45) & 32767L); + values[valuesOffset++] = (int)((block14 >>> 30) & 32767L); + values[valuesOffset++] = (int)((block14 >>> 15) & 32767L); values[valuesOffset++] = (int)(block14 & 32767L); } } @@ -123,25 +121,25 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 7) | (byte1.TripleShift(1)); + values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1); int byte2 = blocks[blocksOffset++] & 0xFF; int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3.TripleShift(2)); + values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2); int byte4 = blocks[blocksOffset++] & 0xFF; int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5.TripleShift(3)); + values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3); int byte6 = blocks[blocksOffset++] & 0xFF; int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7.TripleShift(4)); + values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4); int byte8 = blocks[blocksOffset++] & 0xFF; int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9.TripleShift(5)); + values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5); int byte10 = blocks[blocksOffset++] & 0xFF; int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11.TripleShift(6)); + values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6); int byte12 = blocks[blocksOffset++] & 0xFF; int byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13.TripleShift(7)); + values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7); int byte14 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte13 & 127) << 8) | byte14; } @@ -152,83 +150,83 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(49); - values[valuesOffset++] = (block0.TripleShift(34)) & 32767L; - values[valuesOffset++] = (block0.TripleShift(19)) & 32767L; - values[valuesOffset++] = (block0.TripleShift(4)) & 32767L; + values[valuesOffset++] = block0 >>> 49; + values[valuesOffset++] = (block0 >>> 34) & 32767L; + values[valuesOffset++] = (block0 >>> 19) & 32767L; + values[valuesOffset++] = (block0 >>> 4) & 32767L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 11) | (block1.TripleShift(53)); - values[valuesOffset++] = (block1.TripleShift(38)) & 32767L; - values[valuesOffset++] = (block1.TripleShift(23)) & 32767L; - values[valuesOffset++] = (block1.TripleShift(8)) & 32767L; + values[valuesOffset++] = ((block0 & 15L) << 11) | (block1 >>> 53); + values[valuesOffset++] = (block1 >>> 38) & 32767L; + values[valuesOffset++] = (block1 >>> 23) & 32767L; + values[valuesOffset++] = (block1 >>> 8) & 32767L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 7) | (block2.TripleShift(57)); - values[valuesOffset++] = (block2.TripleShift(42)) & 32767L; - values[valuesOffset++] = (block2.TripleShift(27)) & 32767L; - values[valuesOffset++] = (block2.TripleShift(12)) & 32767L; + values[valuesOffset++] = ((block1 & 255L) << 7) | (block2 >>> 57); + values[valuesOffset++] = (block2 >>> 42) & 32767L; + values[valuesOffset++] = (block2 >>> 27) & 32767L; + values[valuesOffset++] = (block2 >>> 12) & 32767L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 3) | (block3.TripleShift(61)); - values[valuesOffset++] = (block3.TripleShift(46)) & 32767L; - values[valuesOffset++] = (block3.TripleShift(31)) & 32767L; - values[valuesOffset++] = (block3.TripleShift(16)) & 32767L; - values[valuesOffset++] = (block3.TripleShift(1)) & 32767L; + values[valuesOffset++] = ((block2 & 4095L) << 3) | (block3 >>> 61); + values[valuesOffset++] = (block3 >>> 46) & 32767L; + values[valuesOffset++] = (block3 >>> 31) & 32767L; + values[valuesOffset++] = (block3 >>> 16) & 32767L; + values[valuesOffset++] = (block3 >>> 1) & 32767L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1L) << 14) | (block4.TripleShift(50)); - values[valuesOffset++] = (block4.TripleShift(35)) & 32767L; - values[valuesOffset++] = (block4.TripleShift(20)) & 32767L; - values[valuesOffset++] = (block4.TripleShift(5)) & 32767L; + values[valuesOffset++] = ((block3 & 1L) << 14) | (block4 >>> 50); + values[valuesOffset++] = (block4 >>> 35) & 32767L; + values[valuesOffset++] = (block4 >>> 20) & 32767L; + values[valuesOffset++] = (block4 >>> 5) & 32767L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 10) | (block5.TripleShift(54)); - values[valuesOffset++] = (block5.TripleShift(39)) & 32767L; - values[valuesOffset++] = (block5.TripleShift(24)) & 32767L; - values[valuesOffset++] = (block5.TripleShift(9)) & 32767L; + values[valuesOffset++] = ((block4 & 31L) << 10) | (block5 >>> 54); + values[valuesOffset++] = (block5 >>> 39) & 32767L; + values[valuesOffset++] = (block5 >>> 24) & 32767L; + values[valuesOffset++] = (block5 >>> 9) & 32767L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 511L) << 6) | (block6.TripleShift(58)); - values[valuesOffset++] = (block6.TripleShift(43)) & 32767L; - values[valuesOffset++] = (block6.TripleShift(28)) & 32767L; - values[valuesOffset++] = (block6.TripleShift(13)) & 32767L; + values[valuesOffset++] = ((block5 & 511L) << 6) | (block6 >>> 58); + values[valuesOffset++] = (block6 >>> 43) & 32767L; + values[valuesOffset++] = (block6 >>> 28) & 32767L; + values[valuesOffset++] = (block6 >>> 13) & 32767L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 8191L) << 2) | (block7.TripleShift(62)); - values[valuesOffset++] = (block7.TripleShift(47)) & 32767L; - values[valuesOffset++] = (block7.TripleShift(32)) & 32767L; - values[valuesOffset++] = (block7.TripleShift(17)) & 32767L; - values[valuesOffset++] = (block7.TripleShift(2)) & 32767L; + values[valuesOffset++] = ((block6 & 8191L) << 2) | (block7 >>> 62); + values[valuesOffset++] = (block7 >>> 47) & 32767L; + values[valuesOffset++] = (block7 >>> 32) & 32767L; + values[valuesOffset++] = (block7 >>> 17) & 32767L; + values[valuesOffset++] = (block7 >>> 2) & 32767L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 3L) << 13) | (block8.TripleShift(51)); - values[valuesOffset++] = (block8.TripleShift(36)) & 32767L; - values[valuesOffset++] = (block8.TripleShift(21)) & 32767L; - values[valuesOffset++] = (block8.TripleShift(6)) & 32767L; + values[valuesOffset++] = ((block7 & 3L) << 13) | (block8 >>> 51); + values[valuesOffset++] = (block8 >>> 36) & 32767L; + values[valuesOffset++] = (block8 >>> 21) & 32767L; + values[valuesOffset++] = (block8 >>> 6) & 32767L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 63L) << 9) | (block9.TripleShift(55)); - values[valuesOffset++] = (block9.TripleShift(40)) & 32767L; - values[valuesOffset++] = (block9.TripleShift(25)) & 32767L; - values[valuesOffset++] = (block9.TripleShift(10)) & 32767L; + values[valuesOffset++] = ((block8 & 63L) << 9) | (block9 >>> 55); + values[valuesOffset++] = (block9 >>> 40) & 32767L; + values[valuesOffset++] = (block9 >>> 25) & 32767L; + values[valuesOffset++] = (block9 >>> 10) & 32767L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 5) | (block10.TripleShift(59)); - values[valuesOffset++] = (block10.TripleShift(44)) & 32767L; - values[valuesOffset++] = (block10.TripleShift(29)) & 32767L; - values[valuesOffset++] = (block10.TripleShift(14)) & 32767L; + values[valuesOffset++] = ((block9 & 1023L) << 5) | (block10 >>> 59); + values[valuesOffset++] = (block10 >>> 44) & 32767L; + values[valuesOffset++] = (block10 >>> 29) & 32767L; + values[valuesOffset++] = (block10 >>> 14) & 32767L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 16383L) << 1) | (block11.TripleShift(63)); - values[valuesOffset++] = (block11.TripleShift(48)) & 32767L; - values[valuesOffset++] = (block11.TripleShift(33)) & 32767L; - values[valuesOffset++] = (block11.TripleShift(18)) & 32767L; - values[valuesOffset++] = (block11.TripleShift(3)) & 32767L; + values[valuesOffset++] = ((block10 & 16383L) << 1) | (block11 >>> 63); + values[valuesOffset++] = (block11 >>> 48) & 32767L; + values[valuesOffset++] = (block11 >>> 33) & 32767L; + values[valuesOffset++] = (block11 >>> 18) & 32767L; + values[valuesOffset++] = (block11 >>> 3) & 32767L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 7L) << 12) | (block12.TripleShift(52)); - values[valuesOffset++] = (block12.TripleShift(37)) & 32767L; - values[valuesOffset++] = (block12.TripleShift(22)) & 32767L; - values[valuesOffset++] = (block12.TripleShift(7)) & 32767L; + values[valuesOffset++] = ((block11 & 7L) << 12) | (block12 >>> 52); + values[valuesOffset++] = (block12 >>> 37) & 32767L; + values[valuesOffset++] = (block12 >>> 22) & 32767L; + values[valuesOffset++] = (block12 >>> 7) & 32767L; long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 127L) << 8) | (block13.TripleShift(56)); - values[valuesOffset++] = (block13.TripleShift(41)) & 32767L; - values[valuesOffset++] = (block13.TripleShift(26)) & 32767L; - values[valuesOffset++] = (block13.TripleShift(11)) & 32767L; + values[valuesOffset++] = ((block12 & 127L) << 8) | (block13 >>> 56); + values[valuesOffset++] = (block13 >>> 41) & 32767L; + values[valuesOffset++] = (block13 >>> 26) & 32767L; + values[valuesOffset++] = (block13 >>> 11) & 32767L; long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2047L) << 4) | (block14.TripleShift(60)); - values[valuesOffset++] = (block14.TripleShift(45)) & 32767L; - values[valuesOffset++] = (block14.TripleShift(30)) & 32767L; - values[valuesOffset++] = (block14.TripleShift(15)) & 32767L; + values[valuesOffset++] = ((block13 & 2047L) << 4) | (block14 >>> 60); + values[valuesOffset++] = (block14 >>> 45) & 32767L; + values[valuesOffset++] = (block14 >>> 30) & 32767L; + values[valuesOffset++] = (block14 >>> 15) & 32767L; values[valuesOffset++] = block14 & 32767L; } } @@ -239,28 +237,28 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 7) | (byte1.TripleShift(1)); + values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1); long byte2 = blocks[blocksOffset++] & 0xFF; long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3.TripleShift(2)); + values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2); long byte4 = blocks[blocksOffset++] & 0xFF; long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5.TripleShift(3)); + values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3); long byte6 = blocks[blocksOffset++] & 0xFF; long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7.TripleShift(4)); + values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4); long byte8 = blocks[blocksOffset++] & 0xFF; long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9.TripleShift(5)); + values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5); long byte10 = blocks[blocksOffset++] & 0xFF; long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11.TripleShift(6)); + values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6); long byte12 = blocks[blocksOffset++] & 0xFF; long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13.TripleShift(7)); + values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7); long byte14 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte13 & 127) << 8) | byte14; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked16.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked16.cs index 0d67d52302..13a4743b87 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked16.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked16.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -38,7 +36,7 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v long block = blocks[blocksOffset++]; for (int shift = 48; shift >= 0; shift -= 16) { - values[valuesOffset++] = (int)((block.TripleShift(shift)) & 65535); + values[valuesOffset++] = (int)((block >>> shift) & 65535); } } } @@ -58,7 +56,7 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int long block = blocks[blocksOffset++]; for (int shift = 48; shift >= 0; shift -= 16) { - values[valuesOffset++] = (block.TripleShift(shift)) & 65535; + values[valuesOffset++] = (block >>> shift) & 65535; } } } @@ -71,4 +69,4 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked17.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked17.cs index 75a04ca45d..33d00ad985 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked17.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked17.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,85 +34,85 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(47)); - values[valuesOffset++] = (int)((block0.TripleShift(30)) & 131071L); - values[valuesOffset++] = (int)((block0.TripleShift(13)) & 131071L); + values[valuesOffset++] = (int)(block0 >>> 47); + values[valuesOffset++] = (int)((block0 >>> 30) & 131071L); + values[valuesOffset++] = (int)((block0 >>> 13) & 131071L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 8191L) << 4) | (block1.TripleShift(60))); - values[valuesOffset++] = (int)((block1.TripleShift(43)) & 131071L); - values[valuesOffset++] = (int)((block1.TripleShift(26)) & 131071L); - values[valuesOffset++] = (int)((block1.TripleShift(9)) & 131071L); + values[valuesOffset++] = (int)(((block0 & 8191L) << 4) | (block1 >>> 60)); + values[valuesOffset++] = (int)((block1 >>> 43) & 131071L); + values[valuesOffset++] = (int)((block1 >>> 26) & 131071L); + values[valuesOffset++] = (int)((block1 >>> 9) & 131071L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 511L) << 8) | (block2.TripleShift(56))); - values[valuesOffset++] = (int)((block2.TripleShift(39)) & 131071L); - values[valuesOffset++] = (int)((block2.TripleShift(22)) & 131071L); - values[valuesOffset++] = (int)((block2.TripleShift(5)) & 131071L); + values[valuesOffset++] = (int)(((block1 & 511L) << 8) | (block2 >>> 56)); + values[valuesOffset++] = (int)((block2 >>> 39) & 131071L); + values[valuesOffset++] = (int)((block2 >>> 22) & 131071L); + values[valuesOffset++] = (int)((block2 >>> 5) & 131071L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 31L) << 12) | (block3.TripleShift(52))); - values[valuesOffset++] = (int)((block3.TripleShift(35)) & 131071L); - values[valuesOffset++] = (int)((block3.TripleShift(18)) & 131071L); - values[valuesOffset++] = (int)((block3.TripleShift(1)) & 131071L); + values[valuesOffset++] = (int)(((block2 & 31L) << 12) | (block3 >>> 52)); + values[valuesOffset++] = (int)((block3 >>> 35) & 131071L); + values[valuesOffset++] = (int)((block3 >>> 18) & 131071L); + values[valuesOffset++] = (int)((block3 >>> 1) & 131071L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 1L) << 16) | (block4.TripleShift(48))); - values[valuesOffset++] = (int)((block4.TripleShift(31)) & 131071L); - values[valuesOffset++] = (int)((block4.TripleShift(14)) & 131071L); + values[valuesOffset++] = (int)(((block3 & 1L) << 16) | (block4 >>> 48)); + values[valuesOffset++] = (int)((block4 >>> 31) & 131071L); + values[valuesOffset++] = (int)((block4 >>> 14) & 131071L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 16383L) << 3) | (block5.TripleShift(61))); - values[valuesOffset++] = (int)((block5.TripleShift(44)) & 131071L); - values[valuesOffset++] = (int)((block5.TripleShift(27)) & 131071L); - values[valuesOffset++] = (int)((block5.TripleShift(10)) & 131071L); + values[valuesOffset++] = (int)(((block4 & 16383L) << 3) | (block5 >>> 61)); + values[valuesOffset++] = (int)((block5 >>> 44) & 131071L); + values[valuesOffset++] = (int)((block5 >>> 27) & 131071L); + values[valuesOffset++] = (int)((block5 >>> 10) & 131071L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 1023L) << 7) | (block6.TripleShift(57))); - values[valuesOffset++] = (int)((block6.TripleShift(40)) & 131071L); - values[valuesOffset++] = (int)((block6.TripleShift(23)) & 131071L); - values[valuesOffset++] = (int)((block6.TripleShift(6)) & 131071L); + values[valuesOffset++] = (int)(((block5 & 1023L) << 7) | (block6 >>> 57)); + values[valuesOffset++] = (int)((block6 >>> 40) & 131071L); + values[valuesOffset++] = (int)((block6 >>> 23) & 131071L); + values[valuesOffset++] = (int)((block6 >>> 6) & 131071L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 63L) << 11) | (block7.TripleShift(53))); - values[valuesOffset++] = (int)((block7.TripleShift(36)) & 131071L); - values[valuesOffset++] = (int)((block7.TripleShift(19)) & 131071L); - values[valuesOffset++] = (int)((block7.TripleShift(2)) & 131071L); + values[valuesOffset++] = (int)(((block6 & 63L) << 11) | (block7 >>> 53)); + values[valuesOffset++] = (int)((block7 >>> 36) & 131071L); + values[valuesOffset++] = (int)((block7 >>> 19) & 131071L); + values[valuesOffset++] = (int)((block7 >>> 2) & 131071L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 3L) << 15) | (block8.TripleShift(49))); - values[valuesOffset++] = (int)((block8.TripleShift(32)) & 131071L); - values[valuesOffset++] = (int)((block8.TripleShift(15)) & 131071L); + values[valuesOffset++] = (int)(((block7 & 3L) << 15) | (block8 >>> 49)); + values[valuesOffset++] = (int)((block8 >>> 32) & 131071L); + values[valuesOffset++] = (int)((block8 >>> 15) & 131071L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 32767L) << 2) | (block9.TripleShift(62))); - values[valuesOffset++] = (int)((block9.TripleShift(45)) & 131071L); - values[valuesOffset++] = (int)((block9.TripleShift(28)) & 131071L); - values[valuesOffset++] = (int)((block9.TripleShift(11)) & 131071L); + values[valuesOffset++] = (int)(((block8 & 32767L) << 2) | (block9 >>> 62)); + values[valuesOffset++] = (int)((block9 >>> 45) & 131071L); + values[valuesOffset++] = (int)((block9 >>> 28) & 131071L); + values[valuesOffset++] = (int)((block9 >>> 11) & 131071L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 2047L) << 6) | (block10.TripleShift(58))); - values[valuesOffset++] = (int)((block10.TripleShift(41)) & 131071L); - values[valuesOffset++] = (int)((block10.TripleShift(24)) & 131071L); - values[valuesOffset++] = (int)((block10.TripleShift(7)) & 131071L); + values[valuesOffset++] = (int)(((block9 & 2047L) << 6) | (block10 >>> 58)); + values[valuesOffset++] = (int)((block10 >>> 41) & 131071L); + values[valuesOffset++] = (int)((block10 >>> 24) & 131071L); + values[valuesOffset++] = (int)((block10 >>> 7) & 131071L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 127L) << 10) | (block11.TripleShift(54))); - values[valuesOffset++] = (int)((block11.TripleShift(37)) & 131071L); - values[valuesOffset++] = (int)((block11.TripleShift(20)) & 131071L); - values[valuesOffset++] = (int)((block11.TripleShift(3)) & 131071L); + values[valuesOffset++] = (int)(((block10 & 127L) << 10) | (block11 >>> 54)); + values[valuesOffset++] = (int)((block11 >>> 37) & 131071L); + values[valuesOffset++] = (int)((block11 >>> 20) & 131071L); + values[valuesOffset++] = (int)((block11 >>> 3) & 131071L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 7L) << 14) | (block12.TripleShift(50))); - values[valuesOffset++] = (int)((block12.TripleShift(33)) & 131071L); - values[valuesOffset++] = (int)((block12.TripleShift(16)) & 131071L); + values[valuesOffset++] = (int)(((block11 & 7L) << 14) | (block12 >>> 50)); + values[valuesOffset++] = (int)((block12 >>> 33) & 131071L); + values[valuesOffset++] = (int)((block12 >>> 16) & 131071L); long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block12 & 65535L) << 1) | (block13.TripleShift(63))); - values[valuesOffset++] = (int)((block13.TripleShift(46)) & 131071L); - values[valuesOffset++] = (int)((block13.TripleShift(29)) & 131071L); - values[valuesOffset++] = (int)((block13.TripleShift(12)) & 131071L); + values[valuesOffset++] = (int)(((block12 & 65535L) << 1) | (block13 >>> 63)); + values[valuesOffset++] = (int)((block13 >>> 46) & 131071L); + values[valuesOffset++] = (int)((block13 >>> 29) & 131071L); + values[valuesOffset++] = (int)((block13 >>> 12) & 131071L); long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block13 & 4095L) << 5) | (block14.TripleShift(59))); - values[valuesOffset++] = (int)((block14.TripleShift(42)) & 131071L); - values[valuesOffset++] = (int)((block14.TripleShift(25)) & 131071L); - values[valuesOffset++] = (int)((block14.TripleShift(8)) & 131071L); + values[valuesOffset++] = (int)(((block13 & 4095L) << 5) | (block14 >>> 59)); + values[valuesOffset++] = (int)((block14 >>> 42) & 131071L); + values[valuesOffset++] = (int)((block14 >>> 25) & 131071L); + values[valuesOffset++] = (int)((block14 >>> 8) & 131071L); long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block14 & 255L) << 9) | (block15.TripleShift(55))); - values[valuesOffset++] = (int)((block15.TripleShift(38)) & 131071L); - values[valuesOffset++] = (int)((block15.TripleShift(21)) & 131071L); - values[valuesOffset++] = (int)((block15.TripleShift(4)) & 131071L); + values[valuesOffset++] = (int)(((block14 & 255L) << 9) | (block15 >>> 55)); + values[valuesOffset++] = (int)((block15 >>> 38) & 131071L); + values[valuesOffset++] = (int)((block15 >>> 21) & 131071L); + values[valuesOffset++] = (int)((block15 >>> 4) & 131071L); long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block15 & 15L) << 13) | (block16.TripleShift(51))); - values[valuesOffset++] = (int)((block16.TripleShift(34)) & 131071L); - values[valuesOffset++] = (int)((block16.TripleShift(17)) & 131071L); + values[valuesOffset++] = (int)(((block15 & 15L) << 13) | (block16 >>> 51)); + values[valuesOffset++] = (int)((block16 >>> 34) & 131071L); + values[valuesOffset++] = (int)((block16 >>> 17) & 131071L); values[valuesOffset++] = (int)(block16 & 131071L); } } @@ -126,25 +124,25 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2.TripleShift(7)); + values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4.TripleShift(6)); + values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6); int byte5 = blocks[blocksOffset++] & 0xFF; int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6.TripleShift(5)); + values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5); int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8.TripleShift(4)); + values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4); int byte9 = blocks[blocksOffset++] & 0xFF; int byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10.TripleShift(3)); + values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3); int byte11 = blocks[blocksOffset++] & 0xFF; int byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12.TripleShift(2)); + values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2); int byte13 = blocks[blocksOffset++] & 0xFF; int byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14.TripleShift(1)); + values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1); int byte15 = blocks[blocksOffset++] & 0xFF; int byte16 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16; @@ -156,85 +154,85 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(47); - values[valuesOffset++] = (block0.TripleShift(30)) & 131071L; - values[valuesOffset++] = (block0.TripleShift(13)) & 131071L; + values[valuesOffset++] = block0 >>> 47; + values[valuesOffset++] = (block0 >>> 30) & 131071L; + values[valuesOffset++] = (block0 >>> 13) & 131071L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 8191L) << 4) | (block1.TripleShift(60)); - values[valuesOffset++] = (block1.TripleShift(43)) & 131071L; - values[valuesOffset++] = (block1.TripleShift(26)) & 131071L; - values[valuesOffset++] = (block1.TripleShift(9)) & 131071L; + values[valuesOffset++] = ((block0 & 8191L) << 4) | (block1 >>> 60); + values[valuesOffset++] = (block1 >>> 43) & 131071L; + values[valuesOffset++] = (block1 >>> 26) & 131071L; + values[valuesOffset++] = (block1 >>> 9) & 131071L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 511L) << 8) | (block2.TripleShift(56)); - values[valuesOffset++] = (block2.TripleShift(39)) & 131071L; - values[valuesOffset++] = (block2.TripleShift(22)) & 131071L; - values[valuesOffset++] = (block2.TripleShift(5)) & 131071L; + values[valuesOffset++] = ((block1 & 511L) << 8) | (block2 >>> 56); + values[valuesOffset++] = (block2 >>> 39) & 131071L; + values[valuesOffset++] = (block2 >>> 22) & 131071L; + values[valuesOffset++] = (block2 >>> 5) & 131071L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 31L) << 12) | (block3.TripleShift(52)); - values[valuesOffset++] = (block3.TripleShift(35)) & 131071L; - values[valuesOffset++] = (block3.TripleShift(18)) & 131071L; - values[valuesOffset++] = (block3.TripleShift(1)) & 131071L; + values[valuesOffset++] = ((block2 & 31L) << 12) | (block3 >>> 52); + values[valuesOffset++] = (block3 >>> 35) & 131071L; + values[valuesOffset++] = (block3 >>> 18) & 131071L; + values[valuesOffset++] = (block3 >>> 1) & 131071L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1L) << 16) | (block4.TripleShift(48)); - values[valuesOffset++] = (block4.TripleShift(31)) & 131071L; - values[valuesOffset++] = (block4.TripleShift(14)) & 131071L; + values[valuesOffset++] = ((block3 & 1L) << 16) | (block4 >>> 48); + values[valuesOffset++] = (block4 >>> 31) & 131071L; + values[valuesOffset++] = (block4 >>> 14) & 131071L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 16383L) << 3) | (block5.TripleShift(61)); - values[valuesOffset++] = (block5.TripleShift(44)) & 131071L; - values[valuesOffset++] = (block5.TripleShift(27)) & 131071L; - values[valuesOffset++] = (block5.TripleShift(10)) & 131071L; + values[valuesOffset++] = ((block4 & 16383L) << 3) | (block5 >>> 61); + values[valuesOffset++] = (block5 >>> 44) & 131071L; + values[valuesOffset++] = (block5 >>> 27) & 131071L; + values[valuesOffset++] = (block5 >>> 10) & 131071L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1023L) << 7) | (block6.TripleShift(57)); - values[valuesOffset++] = (block6.TripleShift(40)) & 131071L; - values[valuesOffset++] = (block6.TripleShift(23)) & 131071L; - values[valuesOffset++] = (block6.TripleShift(6)) & 131071L; + values[valuesOffset++] = ((block5 & 1023L) << 7) | (block6 >>> 57); + values[valuesOffset++] = (block6 >>> 40) & 131071L; + values[valuesOffset++] = (block6 >>> 23) & 131071L; + values[valuesOffset++] = (block6 >>> 6) & 131071L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 63L) << 11) | (block7.TripleShift(53)); - values[valuesOffset++] = (block7.TripleShift(36)) & 131071L; - values[valuesOffset++] = (block7.TripleShift(19)) & 131071L; - values[valuesOffset++] = (block7.TripleShift(2)) & 131071L; + values[valuesOffset++] = ((block6 & 63L) << 11) | (block7 >>> 53); + values[valuesOffset++] = (block7 >>> 36) & 131071L; + values[valuesOffset++] = (block7 >>> 19) & 131071L; + values[valuesOffset++] = (block7 >>> 2) & 131071L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 3L) << 15) | (block8.TripleShift(49)); - values[valuesOffset++] = (block8.TripleShift(32)) & 131071L; - values[valuesOffset++] = (block8.TripleShift(15)) & 131071L; + values[valuesOffset++] = ((block7 & 3L) << 15) | (block8 >>> 49); + values[valuesOffset++] = (block8 >>> 32) & 131071L; + values[valuesOffset++] = (block8 >>> 15) & 131071L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 32767L) << 2) | (block9.TripleShift(62)); - values[valuesOffset++] = (block9.TripleShift(45)) & 131071L; - values[valuesOffset++] = (block9.TripleShift(28)) & 131071L; - values[valuesOffset++] = (block9.TripleShift(11)) & 131071L; + values[valuesOffset++] = ((block8 & 32767L) << 2) | (block9 >>> 62); + values[valuesOffset++] = (block9 >>> 45) & 131071L; + values[valuesOffset++] = (block9 >>> 28) & 131071L; + values[valuesOffset++] = (block9 >>> 11) & 131071L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 2047L) << 6) | (block10.TripleShift(58)); - values[valuesOffset++] = (block10.TripleShift(41)) & 131071L; - values[valuesOffset++] = (block10.TripleShift(24)) & 131071L; - values[valuesOffset++] = (block10.TripleShift(7)) & 131071L; + values[valuesOffset++] = ((block9 & 2047L) << 6) | (block10 >>> 58); + values[valuesOffset++] = (block10 >>> 41) & 131071L; + values[valuesOffset++] = (block10 >>> 24) & 131071L; + values[valuesOffset++] = (block10 >>> 7) & 131071L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 127L) << 10) | (block11.TripleShift(54)); - values[valuesOffset++] = (block11.TripleShift(37)) & 131071L; - values[valuesOffset++] = (block11.TripleShift(20)) & 131071L; - values[valuesOffset++] = (block11.TripleShift(3)) & 131071L; + values[valuesOffset++] = ((block10 & 127L) << 10) | (block11 >>> 54); + values[valuesOffset++] = (block11 >>> 37) & 131071L; + values[valuesOffset++] = (block11 >>> 20) & 131071L; + values[valuesOffset++] = (block11 >>> 3) & 131071L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 7L) << 14) | (block12.TripleShift(50)); - values[valuesOffset++] = (block12.TripleShift(33)) & 131071L; - values[valuesOffset++] = (block12.TripleShift(16)) & 131071L; + values[valuesOffset++] = ((block11 & 7L) << 14) | (block12 >>> 50); + values[valuesOffset++] = (block12 >>> 33) & 131071L; + values[valuesOffset++] = (block12 >>> 16) & 131071L; long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 65535L) << 1) | (block13.TripleShift(63)); - values[valuesOffset++] = (block13.TripleShift(46)) & 131071L; - values[valuesOffset++] = (block13.TripleShift(29)) & 131071L; - values[valuesOffset++] = (block13.TripleShift(12)) & 131071L; + values[valuesOffset++] = ((block12 & 65535L) << 1) | (block13 >>> 63); + values[valuesOffset++] = (block13 >>> 46) & 131071L; + values[valuesOffset++] = (block13 >>> 29) & 131071L; + values[valuesOffset++] = (block13 >>> 12) & 131071L; long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4095L) << 5) | (block14.TripleShift(59)); - values[valuesOffset++] = (block14.TripleShift(42)) & 131071L; - values[valuesOffset++] = (block14.TripleShift(25)) & 131071L; - values[valuesOffset++] = (block14.TripleShift(8)) & 131071L; + values[valuesOffset++] = ((block13 & 4095L) << 5) | (block14 >>> 59); + values[valuesOffset++] = (block14 >>> 42) & 131071L; + values[valuesOffset++] = (block14 >>> 25) & 131071L; + values[valuesOffset++] = (block14 >>> 8) & 131071L; long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 255L) << 9) | (block15.TripleShift(55)); - values[valuesOffset++] = (block15.TripleShift(38)) & 131071L; - values[valuesOffset++] = (block15.TripleShift(21)) & 131071L; - values[valuesOffset++] = (block15.TripleShift(4)) & 131071L; + values[valuesOffset++] = ((block14 & 255L) << 9) | (block15 >>> 55); + values[valuesOffset++] = (block15 >>> 38) & 131071L; + values[valuesOffset++] = (block15 >>> 21) & 131071L; + values[valuesOffset++] = (block15 >>> 4) & 131071L; long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 15L) << 13) | (block16.TripleShift(51)); - values[valuesOffset++] = (block16.TripleShift(34)) & 131071L; - values[valuesOffset++] = (block16.TripleShift(17)) & 131071L; + values[valuesOffset++] = ((block15 & 15L) << 13) | (block16 >>> 51); + values[valuesOffset++] = (block16 >>> 34) & 131071L; + values[valuesOffset++] = (block16 >>> 17) & 131071L; values[valuesOffset++] = block16 & 131071L; } } @@ -246,29 +244,29 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2.TripleShift(7)); + values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4.TripleShift(6)); + values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6); long byte5 = blocks[blocksOffset++] & 0xFF; long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6.TripleShift(5)); + values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5); long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8.TripleShift(4)); + values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4); long byte9 = blocks[blocksOffset++] & 0xFF; long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10.TripleShift(3)); + values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3); long byte11 = blocks[blocksOffset++] & 0xFF; long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12.TripleShift(2)); + values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2); long byte13 = blocks[blocksOffset++] & 0xFF; long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14.TripleShift(1)); + values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1); long byte15 = blocks[blocksOffset++] & 0xFF; long byte16 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked18.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked18.cs index 209661f770..8f1a5b9552 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked18.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked18.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,45 +34,45 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(46)); - values[valuesOffset++] = (int)((block0.TripleShift(28)) & 262143L); - values[valuesOffset++] = (int)((block0.TripleShift(10)) & 262143L); + values[valuesOffset++] = (int)(block0 >>> 46); + values[valuesOffset++] = (int)((block0 >>> 28) & 262143L); + values[valuesOffset++] = (int)((block0 >>> 10) & 262143L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1023L) << 8) | (block1.TripleShift(56))); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 262143L); - values[valuesOffset++] = (int)((block1.TripleShift(20)) & 262143L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 262143L); + values[valuesOffset++] = (int)(((block0 & 1023L) << 8) | (block1 >>> 56)); + values[valuesOffset++] = (int)((block1 >>> 38) & 262143L); + values[valuesOffset++] = (int)((block1 >>> 20) & 262143L); + values[valuesOffset++] = (int)((block1 >>> 2) & 262143L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 16) | (block2.TripleShift(48))); - values[valuesOffset++] = (int)((block2.TripleShift(30)) & 262143L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 262143L); + values[valuesOffset++] = (int)(((block1 & 3L) << 16) | (block2 >>> 48)); + values[valuesOffset++] = (int)((block2 >>> 30) & 262143L); + values[valuesOffset++] = (int)((block2 >>> 12) & 262143L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 4095L) << 6) | (block3.TripleShift(58))); - values[valuesOffset++] = (int)((block3.TripleShift(40)) & 262143L); - values[valuesOffset++] = (int)((block3.TripleShift(22)) & 262143L); - values[valuesOffset++] = (int)((block3.TripleShift(4)) & 262143L); + values[valuesOffset++] = (int)(((block2 & 4095L) << 6) | (block3 >>> 58)); + values[valuesOffset++] = (int)((block3 >>> 40) & 262143L); + values[valuesOffset++] = (int)((block3 >>> 22) & 262143L); + values[valuesOffset++] = (int)((block3 >>> 4) & 262143L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 15L) << 14) | (block4.TripleShift(50))); - values[valuesOffset++] = (int)((block4.TripleShift(32)) & 262143L); - values[valuesOffset++] = (int)((block4.TripleShift(14)) & 262143L); + values[valuesOffset++] = (int)(((block3 & 15L) << 14) | (block4 >>> 50)); + values[valuesOffset++] = (int)((block4 >>> 32) & 262143L); + values[valuesOffset++] = (int)((block4 >>> 14) & 262143L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 16383L) << 4) | (block5.TripleShift(60))); - values[valuesOffset++] = (int)((block5.TripleShift(42)) & 262143L); - values[valuesOffset++] = (int)((block5.TripleShift(24)) & 262143L); - values[valuesOffset++] = (int)((block5.TripleShift(6)) & 262143L); + values[valuesOffset++] = (int)(((block4 & 16383L) << 4) | (block5 >>> 60)); + values[valuesOffset++] = (int)((block5 >>> 42) & 262143L); + values[valuesOffset++] = (int)((block5 >>> 24) & 262143L); + values[valuesOffset++] = (int)((block5 >>> 6) & 262143L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 63L) << 12) | (block6.TripleShift(52))); - values[valuesOffset++] = (int)((block6.TripleShift(34)) & 262143L); - values[valuesOffset++] = (int)((block6.TripleShift(16)) & 262143L); + values[valuesOffset++] = (int)(((block5 & 63L) << 12) | (block6 >>> 52)); + values[valuesOffset++] = (int)((block6 >>> 34) & 262143L); + values[valuesOffset++] = (int)((block6 >>> 16) & 262143L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 65535L) << 2) | (block7.TripleShift(62))); - values[valuesOffset++] = (int)((block7.TripleShift(44)) & 262143L); - values[valuesOffset++] = (int)((block7.TripleShift(26)) & 262143L); - values[valuesOffset++] = (int)((block7.TripleShift(8)) & 262143L); + values[valuesOffset++] = (int)(((block6 & 65535L) << 2) | (block7 >>> 62)); + values[valuesOffset++] = (int)((block7 >>> 44) & 262143L); + values[valuesOffset++] = (int)((block7 >>> 26) & 262143L); + values[valuesOffset++] = (int)((block7 >>> 8) & 262143L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 255L) << 10) | (block8.TripleShift(54))); - values[valuesOffset++] = (int)((block8.TripleShift(36)) & 262143L); - values[valuesOffset++] = (int)((block8.TripleShift(18)) & 262143L); + values[valuesOffset++] = (int)(((block7 & 255L) << 10) | (block8 >>> 54)); + values[valuesOffset++] = (int)((block8 >>> 36) & 262143L); + values[valuesOffset++] = (int)((block8 >>> 18) & 262143L); values[valuesOffset++] = (int)(block8 & 262143L); } } @@ -86,13 +84,13 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4); int byte5 = blocks[blocksOffset++] & 0xFF; int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6.TripleShift(2)); + values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2); int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8; @@ -104,45 +102,45 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(46); - values[valuesOffset++] = (block0.TripleShift(28)) & 262143L; - values[valuesOffset++] = (block0.TripleShift(10)) & 262143L; + values[valuesOffset++] = block0 >>> 46; + values[valuesOffset++] = (block0 >>> 28) & 262143L; + values[valuesOffset++] = (block0 >>> 10) & 262143L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1023L) << 8) | (block1.TripleShift(56)); - values[valuesOffset++] = (block1.TripleShift(38)) & 262143L; - values[valuesOffset++] = (block1.TripleShift(20)) & 262143L; - values[valuesOffset++] = (block1.TripleShift(2)) & 262143L; + values[valuesOffset++] = ((block0 & 1023L) << 8) | (block1 >>> 56); + values[valuesOffset++] = (block1 >>> 38) & 262143L; + values[valuesOffset++] = (block1 >>> 20) & 262143L; + values[valuesOffset++] = (block1 >>> 2) & 262143L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 16) | (block2.TripleShift(48)); - values[valuesOffset++] = (block2.TripleShift(30)) & 262143L; - values[valuesOffset++] = (block2.TripleShift(12)) & 262143L; + values[valuesOffset++] = ((block1 & 3L) << 16) | (block2 >>> 48); + values[valuesOffset++] = (block2 >>> 30) & 262143L; + values[valuesOffset++] = (block2 >>> 12) & 262143L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 6) | (block3.TripleShift(58)); - values[valuesOffset++] = (block3.TripleShift(40)) & 262143L; - values[valuesOffset++] = (block3.TripleShift(22)) & 262143L; - values[valuesOffset++] = (block3.TripleShift(4)) & 262143L; + values[valuesOffset++] = ((block2 & 4095L) << 6) | (block3 >>> 58); + values[valuesOffset++] = (block3 >>> 40) & 262143L; + values[valuesOffset++] = (block3 >>> 22) & 262143L; + values[valuesOffset++] = (block3 >>> 4) & 262143L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 14) | (block4.TripleShift(50)); - values[valuesOffset++] = (block4.TripleShift(32)) & 262143L; - values[valuesOffset++] = (block4.TripleShift(14)) & 262143L; + values[valuesOffset++] = ((block3 & 15L) << 14) | (block4 >>> 50); + values[valuesOffset++] = (block4 >>> 32) & 262143L; + values[valuesOffset++] = (block4 >>> 14) & 262143L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 16383L) << 4) | (block5.TripleShift(60)); - values[valuesOffset++] = (block5.TripleShift(42)) & 262143L; - values[valuesOffset++] = (block5.TripleShift(24)) & 262143L; - values[valuesOffset++] = (block5.TripleShift(6)) & 262143L; + values[valuesOffset++] = ((block4 & 16383L) << 4) | (block5 >>> 60); + values[valuesOffset++] = (block5 >>> 42) & 262143L; + values[valuesOffset++] = (block5 >>> 24) & 262143L; + values[valuesOffset++] = (block5 >>> 6) & 262143L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 12) | (block6.TripleShift(52)); - values[valuesOffset++] = (block6.TripleShift(34)) & 262143L; - values[valuesOffset++] = (block6.TripleShift(16)) & 262143L; + values[valuesOffset++] = ((block5 & 63L) << 12) | (block6 >>> 52); + values[valuesOffset++] = (block6 >>> 34) & 262143L; + values[valuesOffset++] = (block6 >>> 16) & 262143L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 65535L) << 2) | (block7.TripleShift(62)); - values[valuesOffset++] = (block7.TripleShift(44)) & 262143L; - values[valuesOffset++] = (block7.TripleShift(26)) & 262143L; - values[valuesOffset++] = (block7.TripleShift(8)) & 262143L; + values[valuesOffset++] = ((block6 & 65535L) << 2) | (block7 >>> 62); + values[valuesOffset++] = (block7 >>> 44) & 262143L; + values[valuesOffset++] = (block7 >>> 26) & 262143L; + values[valuesOffset++] = (block7 >>> 8) & 262143L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 10) | (block8.TripleShift(54)); - values[valuesOffset++] = (block8.TripleShift(36)) & 262143L; - values[valuesOffset++] = (block8.TripleShift(18)) & 262143L; + values[valuesOffset++] = ((block7 & 255L) << 10) | (block8 >>> 54); + values[valuesOffset++] = (block8 >>> 36) & 262143L; + values[valuesOffset++] = (block8 >>> 18) & 262143L; values[valuesOffset++] = block8 & 262143L; } } @@ -154,17 +152,17 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4); long byte5 = blocks[blocksOffset++] & 0xFF; long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6.TripleShift(2)); + values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2); long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked19.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked19.cs index 8a83fc3fcf..de93d3b886 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked19.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked19.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,87 +34,87 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(45)); - values[valuesOffset++] = (int)((block0.TripleShift(26)) & 524287L); - values[valuesOffset++] = (int)((block0.TripleShift(7)) & 524287L); + values[valuesOffset++] = (int)(block0 >>> 45); + values[valuesOffset++] = (int)((block0 >>> 26) & 524287L); + values[valuesOffset++] = (int)((block0 >>> 7) & 524287L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 127L) << 12) | (block1.TripleShift(52))); - values[valuesOffset++] = (int)((block1.TripleShift(33)) & 524287L); - values[valuesOffset++] = (int)((block1.TripleShift(14)) & 524287L); + values[valuesOffset++] = (int)(((block0 & 127L) << 12) | (block1 >>> 52)); + values[valuesOffset++] = (int)((block1 >>> 33) & 524287L); + values[valuesOffset++] = (int)((block1 >>> 14) & 524287L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 16383L) << 5) | (block2.TripleShift(59))); - values[valuesOffset++] = (int)((block2.TripleShift(40)) & 524287L); - values[valuesOffset++] = (int)((block2.TripleShift(21)) & 524287L); - values[valuesOffset++] = (int)((block2.TripleShift(2)) & 524287L); + values[valuesOffset++] = (int)(((block1 & 16383L) << 5) | (block2 >>> 59)); + values[valuesOffset++] = (int)((block2 >>> 40) & 524287L); + values[valuesOffset++] = (int)((block2 >>> 21) & 524287L); + values[valuesOffset++] = (int)((block2 >>> 2) & 524287L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 3L) << 17) | (block3.TripleShift(47))); - values[valuesOffset++] = (int)((block3.TripleShift(28)) & 524287L); - values[valuesOffset++] = (int)((block3.TripleShift(9)) & 524287L); + values[valuesOffset++] = (int)(((block2 & 3L) << 17) | (block3 >>> 47)); + values[valuesOffset++] = (int)((block3 >>> 28) & 524287L); + values[valuesOffset++] = (int)((block3 >>> 9) & 524287L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 511L) << 10) | (block4.TripleShift(54))); - values[valuesOffset++] = (int)((block4.TripleShift(35)) & 524287L); - values[valuesOffset++] = (int)((block4.TripleShift(16)) & 524287L); + values[valuesOffset++] = (int)(((block3 & 511L) << 10) | (block4 >>> 54)); + values[valuesOffset++] = (int)((block4 >>> 35) & 524287L); + values[valuesOffset++] = (int)((block4 >>> 16) & 524287L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 65535L) << 3) | (block5.TripleShift(61))); - values[valuesOffset++] = (int)((block5.TripleShift(42)) & 524287L); - values[valuesOffset++] = (int)((block5.TripleShift(23)) & 524287L); - values[valuesOffset++] = (int)((block5.TripleShift(4)) & 524287L); + values[valuesOffset++] = (int)(((block4 & 65535L) << 3) | (block5 >>> 61)); + values[valuesOffset++] = (int)((block5 >>> 42) & 524287L); + values[valuesOffset++] = (int)((block5 >>> 23) & 524287L); + values[valuesOffset++] = (int)((block5 >>> 4) & 524287L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 15L) << 15) | (block6.TripleShift(49))); - values[valuesOffset++] = (int)((block6.TripleShift(30)) & 524287L); - values[valuesOffset++] = (int)((block6.TripleShift(11)) & 524287L); + values[valuesOffset++] = (int)(((block5 & 15L) << 15) | (block6 >>> 49)); + values[valuesOffset++] = (int)((block6 >>> 30) & 524287L); + values[valuesOffset++] = (int)((block6 >>> 11) & 524287L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 2047L) << 8) | (block7.TripleShift(56))); - values[valuesOffset++] = (int)((block7.TripleShift(37)) & 524287L); - values[valuesOffset++] = (int)((block7.TripleShift(18)) & 524287L); + values[valuesOffset++] = (int)(((block6 & 2047L) << 8) | (block7 >>> 56)); + values[valuesOffset++] = (int)((block7 >>> 37) & 524287L); + values[valuesOffset++] = (int)((block7 >>> 18) & 524287L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 262143L) << 1) | (block8.TripleShift(63))); - values[valuesOffset++] = (int)((block8.TripleShift(44)) & 524287L); - values[valuesOffset++] = (int)((block8.TripleShift(25)) & 524287L); - values[valuesOffset++] = (int)((block8.TripleShift(6)) & 524287L); + values[valuesOffset++] = (int)(((block7 & 262143L) << 1) | (block8 >>> 63)); + values[valuesOffset++] = (int)((block8 >>> 44) & 524287L); + values[valuesOffset++] = (int)((block8 >>> 25) & 524287L); + values[valuesOffset++] = (int)((block8 >>> 6) & 524287L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 63L) << 13) | (block9.TripleShift(51))); - values[valuesOffset++] = (int)((block9.TripleShift(32)) & 524287L); - values[valuesOffset++] = (int)((block9.TripleShift(13)) & 524287L); + values[valuesOffset++] = (int)(((block8 & 63L) << 13) | (block9 >>> 51)); + values[valuesOffset++] = (int)((block9 >>> 32) & 524287L); + values[valuesOffset++] = (int)((block9 >>> 13) & 524287L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 8191L) << 6) | (block10.TripleShift(58))); - values[valuesOffset++] = (int)((block10.TripleShift(39)) & 524287L); - values[valuesOffset++] = (int)((block10.TripleShift(20)) & 524287L); - values[valuesOffset++] = (int)((block10.TripleShift(1)) & 524287L); + values[valuesOffset++] = (int)(((block9 & 8191L) << 6) | (block10 >>> 58)); + values[valuesOffset++] = (int)((block10 >>> 39) & 524287L); + values[valuesOffset++] = (int)((block10 >>> 20) & 524287L); + values[valuesOffset++] = (int)((block10 >>> 1) & 524287L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 1L) << 18) | (block11.TripleShift(46))); - values[valuesOffset++] = (int)((block11.TripleShift(27)) & 524287L); - values[valuesOffset++] = (int)((block11.TripleShift(8)) & 524287L); + values[valuesOffset++] = (int)(((block10 & 1L) << 18) | (block11 >>> 46)); + values[valuesOffset++] = (int)((block11 >>> 27) & 524287L); + values[valuesOffset++] = (int)((block11 >>> 8) & 524287L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 255L) << 11) | (block12.TripleShift(53))); - values[valuesOffset++] = (int)((block12.TripleShift(34)) & 524287L); - values[valuesOffset++] = (int)((block12.TripleShift(15)) & 524287L); + values[valuesOffset++] = (int)(((block11 & 255L) << 11) | (block12 >>> 53)); + values[valuesOffset++] = (int)((block12 >>> 34) & 524287L); + values[valuesOffset++] = (int)((block12 >>> 15) & 524287L); long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block12 & 32767L) << 4) | (block13.TripleShift(60))); - values[valuesOffset++] = (int)((block13.TripleShift(41)) & 524287L); - values[valuesOffset++] = (int)((block13.TripleShift(22)) & 524287L); - values[valuesOffset++] = (int)((block13.TripleShift(3)) & 524287L); + values[valuesOffset++] = (int)(((block12 & 32767L) << 4) | (block13 >>> 60)); + values[valuesOffset++] = (int)((block13 >>> 41) & 524287L); + values[valuesOffset++] = (int)((block13 >>> 22) & 524287L); + values[valuesOffset++] = (int)((block13 >>> 3) & 524287L); long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block13 & 7L) << 16) | (block14.TripleShift(48))); - values[valuesOffset++] = (int)((block14.TripleShift(29)) & 524287L); - values[valuesOffset++] = (int)((block14.TripleShift(10)) & 524287L); + values[valuesOffset++] = (int)(((block13 & 7L) << 16) | (block14 >>> 48)); + values[valuesOffset++] = (int)((block14 >>> 29) & 524287L); + values[valuesOffset++] = (int)((block14 >>> 10) & 524287L); long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block14 & 1023L) << 9) | (block15.TripleShift(55))); - values[valuesOffset++] = (int)((block15.TripleShift(36)) & 524287L); - values[valuesOffset++] = (int)((block15.TripleShift(17)) & 524287L); + values[valuesOffset++] = (int)(((block14 & 1023L) << 9) | (block15 >>> 55)); + values[valuesOffset++] = (int)((block15 >>> 36) & 524287L); + values[valuesOffset++] = (int)((block15 >>> 17) & 524287L); long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block15 & 131071L) << 2) | (block16.TripleShift(62))); - values[valuesOffset++] = (int)((block16.TripleShift(43)) & 524287L); - values[valuesOffset++] = (int)((block16.TripleShift(24)) & 524287L); - values[valuesOffset++] = (int)((block16.TripleShift(5)) & 524287L); + values[valuesOffset++] = (int)(((block15 & 131071L) << 2) | (block16 >>> 62)); + values[valuesOffset++] = (int)((block16 >>> 43) & 524287L); + values[valuesOffset++] = (int)((block16 >>> 24) & 524287L); + values[valuesOffset++] = (int)((block16 >>> 5) & 524287L); long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block16 & 31L) << 14) | (block17.TripleShift(50))); - values[valuesOffset++] = (int)((block17.TripleShift(31)) & 524287L); - values[valuesOffset++] = (int)((block17.TripleShift(12)) & 524287L); + values[valuesOffset++] = (int)(((block16 & 31L) << 14) | (block17 >>> 50)); + values[valuesOffset++] = (int)((block17 >>> 31) & 524287L); + values[valuesOffset++] = (int)((block17 >>> 12) & 524287L); long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block17 & 4095L) << 7) | (block18.TripleShift(57))); - values[valuesOffset++] = (int)((block18.TripleShift(38)) & 524287L); - values[valuesOffset++] = (int)((block18.TripleShift(19)) & 524287L); + values[valuesOffset++] = (int)(((block17 & 4095L) << 7) | (block18 >>> 57)); + values[valuesOffset++] = (int)((block18 >>> 38) & 524287L); + values[valuesOffset++] = (int)((block18 >>> 19) & 524287L); values[valuesOffset++] = (int)(block18 & 524287L); } } @@ -128,27 +126,27 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2.TripleShift(5)); + values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2); int byte5 = blocks[blocksOffset++] & 0xFF; int byte6 = blocks[blocksOffset++] & 0xFF; int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7.TripleShift(7)); + values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7); int byte8 = blocks[blocksOffset++] & 0xFF; int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9.TripleShift(4)); + values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4); int byte10 = blocks[blocksOffset++] & 0xFF; int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11.TripleShift(1)); + values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1); int byte12 = blocks[blocksOffset++] & 0xFF; int byte13 = blocks[blocksOffset++] & 0xFF; int byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14.TripleShift(6)); + values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6); int byte15 = blocks[blocksOffset++] & 0xFF; int byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16.TripleShift(3)); + values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3); int byte17 = blocks[blocksOffset++] & 0xFF; int byte18 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18; @@ -160,87 +158,87 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(45); - values[valuesOffset++] = (block0.TripleShift(26)) & 524287L; - values[valuesOffset++] = (block0.TripleShift(7)) & 524287L; + values[valuesOffset++] = block0 >>> 45; + values[valuesOffset++] = (block0 >>> 26) & 524287L; + values[valuesOffset++] = (block0 >>> 7) & 524287L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 127L) << 12) | (block1.TripleShift(52)); - values[valuesOffset++] = (block1.TripleShift(33)) & 524287L; - values[valuesOffset++] = (block1.TripleShift(14)) & 524287L; + values[valuesOffset++] = ((block0 & 127L) << 12) | (block1 >>> 52); + values[valuesOffset++] = (block1 >>> 33) & 524287L; + values[valuesOffset++] = (block1 >>> 14) & 524287L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 16383L) << 5) | (block2.TripleShift(59)); - values[valuesOffset++] = (block2.TripleShift(40)) & 524287L; - values[valuesOffset++] = (block2.TripleShift(21)) & 524287L; - values[valuesOffset++] = (block2.TripleShift(2)) & 524287L; + values[valuesOffset++] = ((block1 & 16383L) << 5) | (block2 >>> 59); + values[valuesOffset++] = (block2 >>> 40) & 524287L; + values[valuesOffset++] = (block2 >>> 21) & 524287L; + values[valuesOffset++] = (block2 >>> 2) & 524287L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 3L) << 17) | (block3.TripleShift(47)); - values[valuesOffset++] = (block3.TripleShift(28)) & 524287L; - values[valuesOffset++] = (block3.TripleShift(9)) & 524287L; + values[valuesOffset++] = ((block2 & 3L) << 17) | (block3 >>> 47); + values[valuesOffset++] = (block3 >>> 28) & 524287L; + values[valuesOffset++] = (block3 >>> 9) & 524287L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 511L) << 10) | (block4.TripleShift(54)); - values[valuesOffset++] = (block4.TripleShift(35)) & 524287L; - values[valuesOffset++] = (block4.TripleShift(16)) & 524287L; + values[valuesOffset++] = ((block3 & 511L) << 10) | (block4 >>> 54); + values[valuesOffset++] = (block4 >>> 35) & 524287L; + values[valuesOffset++] = (block4 >>> 16) & 524287L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 65535L) << 3) | (block5.TripleShift(61)); - values[valuesOffset++] = (block5.TripleShift(42)) & 524287L; - values[valuesOffset++] = (block5.TripleShift(23)) & 524287L; - values[valuesOffset++] = (block5.TripleShift(4)) & 524287L; + values[valuesOffset++] = ((block4 & 65535L) << 3) | (block5 >>> 61); + values[valuesOffset++] = (block5 >>> 42) & 524287L; + values[valuesOffset++] = (block5 >>> 23) & 524287L; + values[valuesOffset++] = (block5 >>> 4) & 524287L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 15L) << 15) | (block6.TripleShift(49)); - values[valuesOffset++] = (block6.TripleShift(30)) & 524287L; - values[valuesOffset++] = (block6.TripleShift(11)) & 524287L; + values[valuesOffset++] = ((block5 & 15L) << 15) | (block6 >>> 49); + values[valuesOffset++] = (block6 >>> 30) & 524287L; + values[valuesOffset++] = (block6 >>> 11) & 524287L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 2047L) << 8) | (block7.TripleShift(56)); - values[valuesOffset++] = (block7.TripleShift(37)) & 524287L; - values[valuesOffset++] = (block7.TripleShift(18)) & 524287L; + values[valuesOffset++] = ((block6 & 2047L) << 8) | (block7 >>> 56); + values[valuesOffset++] = (block7 >>> 37) & 524287L; + values[valuesOffset++] = (block7 >>> 18) & 524287L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 262143L) << 1) | (block8.TripleShift(63)); - values[valuesOffset++] = (block8.TripleShift(44)) & 524287L; - values[valuesOffset++] = (block8.TripleShift(25)) & 524287L; - values[valuesOffset++] = (block8.TripleShift(6)) & 524287L; + values[valuesOffset++] = ((block7 & 262143L) << 1) | (block8 >>> 63); + values[valuesOffset++] = (block8 >>> 44) & 524287L; + values[valuesOffset++] = (block8 >>> 25) & 524287L; + values[valuesOffset++] = (block8 >>> 6) & 524287L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 63L) << 13) | (block9.TripleShift(51)); - values[valuesOffset++] = (block9.TripleShift(32)) & 524287L; - values[valuesOffset++] = (block9.TripleShift(13)) & 524287L; + values[valuesOffset++] = ((block8 & 63L) << 13) | (block9 >>> 51); + values[valuesOffset++] = (block9 >>> 32) & 524287L; + values[valuesOffset++] = (block9 >>> 13) & 524287L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 8191L) << 6) | (block10.TripleShift(58)); - values[valuesOffset++] = (block10.TripleShift(39)) & 524287L; - values[valuesOffset++] = (block10.TripleShift(20)) & 524287L; - values[valuesOffset++] = (block10.TripleShift(1)) & 524287L; + values[valuesOffset++] = ((block9 & 8191L) << 6) | (block10 >>> 58); + values[valuesOffset++] = (block10 >>> 39) & 524287L; + values[valuesOffset++] = (block10 >>> 20) & 524287L; + values[valuesOffset++] = (block10 >>> 1) & 524287L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 1L) << 18) | (block11.TripleShift(46)); - values[valuesOffset++] = (block11.TripleShift(27)) & 524287L; - values[valuesOffset++] = (block11.TripleShift(8)) & 524287L; + values[valuesOffset++] = ((block10 & 1L) << 18) | (block11 >>> 46); + values[valuesOffset++] = (block11 >>> 27) & 524287L; + values[valuesOffset++] = (block11 >>> 8) & 524287L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 255L) << 11) | (block12.TripleShift(53)); - values[valuesOffset++] = (block12.TripleShift(34)) & 524287L; - values[valuesOffset++] = (block12.TripleShift(15)) & 524287L; + values[valuesOffset++] = ((block11 & 255L) << 11) | (block12 >>> 53); + values[valuesOffset++] = (block12 >>> 34) & 524287L; + values[valuesOffset++] = (block12 >>> 15) & 524287L; long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 32767L) << 4) | (block13.TripleShift(60)); - values[valuesOffset++] = (block13.TripleShift(41)) & 524287L; - values[valuesOffset++] = (block13.TripleShift(22)) & 524287L; - values[valuesOffset++] = (block13.TripleShift(3)) & 524287L; + values[valuesOffset++] = ((block12 & 32767L) << 4) | (block13 >>> 60); + values[valuesOffset++] = (block13 >>> 41) & 524287L; + values[valuesOffset++] = (block13 >>> 22) & 524287L; + values[valuesOffset++] = (block13 >>> 3) & 524287L; long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 7L) << 16) | (block14.TripleShift(48)); - values[valuesOffset++] = (block14.TripleShift(29)) & 524287L; - values[valuesOffset++] = (block14.TripleShift(10)) & 524287L; + values[valuesOffset++] = ((block13 & 7L) << 16) | (block14 >>> 48); + values[valuesOffset++] = (block14 >>> 29) & 524287L; + values[valuesOffset++] = (block14 >>> 10) & 524287L; long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1023L) << 9) | (block15.TripleShift(55)); - values[valuesOffset++] = (block15.TripleShift(36)) & 524287L; - values[valuesOffset++] = (block15.TripleShift(17)) & 524287L; + values[valuesOffset++] = ((block14 & 1023L) << 9) | (block15 >>> 55); + values[valuesOffset++] = (block15 >>> 36) & 524287L; + values[valuesOffset++] = (block15 >>> 17) & 524287L; long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 131071L) << 2) | (block16.TripleShift(62)); - values[valuesOffset++] = (block16.TripleShift(43)) & 524287L; - values[valuesOffset++] = (block16.TripleShift(24)) & 524287L; - values[valuesOffset++] = (block16.TripleShift(5)) & 524287L; + values[valuesOffset++] = ((block15 & 131071L) << 2) | (block16 >>> 62); + values[valuesOffset++] = (block16 >>> 43) & 524287L; + values[valuesOffset++] = (block16 >>> 24) & 524287L; + values[valuesOffset++] = (block16 >>> 5) & 524287L; long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 31L) << 14) | (block17.TripleShift(50)); - values[valuesOffset++] = (block17.TripleShift(31)) & 524287L; - values[valuesOffset++] = (block17.TripleShift(12)) & 524287L; + values[valuesOffset++] = ((block16 & 31L) << 14) | (block17 >>> 50); + values[valuesOffset++] = (block17 >>> 31) & 524287L; + values[valuesOffset++] = (block17 >>> 12) & 524287L; long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 4095L) << 7) | (block18.TripleShift(57)); - values[valuesOffset++] = (block18.TripleShift(38)) & 524287L; - values[valuesOffset++] = (block18.TripleShift(19)) & 524287L; + values[valuesOffset++] = ((block17 & 4095L) << 7) | (block18 >>> 57); + values[valuesOffset++] = (block18 >>> 38) & 524287L; + values[valuesOffset++] = (block18 >>> 19) & 524287L; values[valuesOffset++] = block18 & 524287L; } } @@ -252,31 +250,31 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2.TripleShift(5)); + values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2); long byte5 = blocks[blocksOffset++] & 0xFF; long byte6 = blocks[blocksOffset++] & 0xFF; long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7.TripleShift(7)); + values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7); long byte8 = blocks[blocksOffset++] & 0xFF; long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9.TripleShift(4)); + values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4); long byte10 = blocks[blocksOffset++] & 0xFF; long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11.TripleShift(1)); + values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1); long byte12 = blocks[blocksOffset++] & 0xFF; long byte13 = blocks[blocksOffset++] & 0xFF; long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14.TripleShift(6)); + values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6); long byte15 = blocks[blocksOffset++] & 0xFF; long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16.TripleShift(3)); + values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3); long byte17 = blocks[blocksOffset++] & 0xFF; long byte18 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked2.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked2.cs index 8d91a99577..da7f3f1854 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked2.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked2.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -38,7 +36,7 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v long block = blocks[blocksOffset++]; for (int shift = 62; shift >= 0; shift -= 2) { - values[valuesOffset++] = (int)((block.TripleShift(shift)) & 3); + values[valuesOffset++] = (int)((block >>> shift) & 3); } } } @@ -48,9 +46,9 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = (block.TripleShift(6)) & 3; - values[valuesOffset++] = (block.TripleShift(4)) & 3; - values[valuesOffset++] = (block.TripleShift(2)) & 3; + values[valuesOffset++] = (block >>> 6) & 3; + values[valuesOffset++] = (block >>> 4) & 3; + values[valuesOffset++] = (block >>> 2) & 3; values[valuesOffset++] = block & 3; } } @@ -62,7 +60,7 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int long block = blocks[blocksOffset++]; for (int shift = 62; shift >= 0; shift -= 2) { - values[valuesOffset++] = (block.TripleShift(shift)) & 3; + values[valuesOffset++] = (block >>> shift) & 3; } } } @@ -72,11 +70,11 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = (block.TripleShift(6)) & 3; - values[valuesOffset++] = (block.TripleShift(4)) & 3; - values[valuesOffset++] = (block.TripleShift(2)) & 3; + values[valuesOffset++] = (block >>> 6) & 3; + values[valuesOffset++] = (block >>> 4) & 3; + values[valuesOffset++] = (block >>> 2) & 3; values[valuesOffset++] = block & 3; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked20.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked20.cs index e826aed072..859e2a1369 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked20.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked20.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,25 +34,25 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(44)); - values[valuesOffset++] = (int)((block0.TripleShift(24)) & 1048575L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 1048575L); + values[valuesOffset++] = (int)(block0 >>> 44); + values[valuesOffset++] = (int)((block0 >>> 24) & 1048575L); + values[valuesOffset++] = (int)((block0 >>> 4) & 1048575L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 16) | (block1.TripleShift(48))); - values[valuesOffset++] = (int)((block1.TripleShift(28)) & 1048575L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 1048575L); + values[valuesOffset++] = (int)(((block0 & 15L) << 16) | (block1 >>> 48)); + values[valuesOffset++] = (int)((block1 >>> 28) & 1048575L); + values[valuesOffset++] = (int)((block1 >>> 8) & 1048575L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 255L) << 12) | (block2.TripleShift(52))); - values[valuesOffset++] = (int)((block2.TripleShift(32)) & 1048575L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 1048575L); + values[valuesOffset++] = (int)(((block1 & 255L) << 12) | (block2 >>> 52)); + values[valuesOffset++] = (int)((block2 >>> 32) & 1048575L); + values[valuesOffset++] = (int)((block2 >>> 12) & 1048575L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 4095L) << 8) | (block3.TripleShift(56))); - values[valuesOffset++] = (int)((block3.TripleShift(36)) & 1048575L); - values[valuesOffset++] = (int)((block3.TripleShift(16)) & 1048575L); + values[valuesOffset++] = (int)(((block2 & 4095L) << 8) | (block3 >>> 56)); + values[valuesOffset++] = (int)((block3 >>> 36) & 1048575L); + values[valuesOffset++] = (int)((block3 >>> 16) & 1048575L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 65535L) << 4) | (block4.TripleShift(60))); - values[valuesOffset++] = (int)((block4.TripleShift(40)) & 1048575L); - values[valuesOffset++] = (int)((block4.TripleShift(20)) & 1048575L); + values[valuesOffset++] = (int)(((block3 & 65535L) << 4) | (block4 >>> 60)); + values[valuesOffset++] = (int)((block4 >>> 40) & 1048575L); + values[valuesOffset++] = (int)((block4 >>> 20) & 1048575L); values[valuesOffset++] = (int)(block4 & 1048575L); } } @@ -66,7 +64,7 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4; @@ -78,25 +76,25 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(44); - values[valuesOffset++] = (block0.TripleShift(24)) & 1048575L; - values[valuesOffset++] = (block0.TripleShift(4)) & 1048575L; + values[valuesOffset++] = block0 >>> 44; + values[valuesOffset++] = (block0 >>> 24) & 1048575L; + values[valuesOffset++] = (block0 >>> 4) & 1048575L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 16) | (block1.TripleShift(48)); - values[valuesOffset++] = (block1.TripleShift(28)) & 1048575L; - values[valuesOffset++] = (block1.TripleShift(8)) & 1048575L; + values[valuesOffset++] = ((block0 & 15L) << 16) | (block1 >>> 48); + values[valuesOffset++] = (block1 >>> 28) & 1048575L; + values[valuesOffset++] = (block1 >>> 8) & 1048575L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 12) | (block2.TripleShift(52)); - values[valuesOffset++] = (block2.TripleShift(32)) & 1048575L; - values[valuesOffset++] = (block2.TripleShift(12)) & 1048575L; + values[valuesOffset++] = ((block1 & 255L) << 12) | (block2 >>> 52); + values[valuesOffset++] = (block2 >>> 32) & 1048575L; + values[valuesOffset++] = (block2 >>> 12) & 1048575L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 8) | (block3.TripleShift(56)); - values[valuesOffset++] = (block3.TripleShift(36)) & 1048575L; - values[valuesOffset++] = (block3.TripleShift(16)) & 1048575L; + values[valuesOffset++] = ((block2 & 4095L) << 8) | (block3 >>> 56); + values[valuesOffset++] = (block3 >>> 36) & 1048575L; + values[valuesOffset++] = (block3 >>> 16) & 1048575L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 65535L) << 4) | (block4.TripleShift(60)); - values[valuesOffset++] = (block4.TripleShift(40)) & 1048575L; - values[valuesOffset++] = (block4.TripleShift(20)) & 1048575L; + values[valuesOffset++] = ((block3 & 65535L) << 4) | (block4 >>> 60); + values[valuesOffset++] = (block4 >>> 40) & 1048575L; + values[valuesOffset++] = (block4 >>> 20) & 1048575L; values[valuesOffset++] = block4 & 1048575L; } } @@ -108,11 +106,11 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked21.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked21.cs index c737d88ea0..b215928dcc 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked21.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked21.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,89 +34,89 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(43)); - values[valuesOffset++] = (int)((block0.TripleShift(22)) & 2097151L); - values[valuesOffset++] = (int)((block0.TripleShift(1)) & 2097151L); + values[valuesOffset++] = (int)(block0 >>> 43); + values[valuesOffset++] = (int)((block0 >>> 22) & 2097151L); + values[valuesOffset++] = (int)((block0 >>> 1) & 2097151L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1L) << 20) | (block1.TripleShift(44))); - values[valuesOffset++] = (int)((block1.TripleShift(23)) & 2097151L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 2097151L); + values[valuesOffset++] = (int)(((block0 & 1L) << 20) | (block1 >>> 44)); + values[valuesOffset++] = (int)((block1 >>> 23) & 2097151L); + values[valuesOffset++] = (int)((block1 >>> 2) & 2097151L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 19) | (block2.TripleShift(45))); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 2097151L); - values[valuesOffset++] = (int)((block2.TripleShift(3)) & 2097151L); + values[valuesOffset++] = (int)(((block1 & 3L) << 19) | (block2 >>> 45)); + values[valuesOffset++] = (int)((block2 >>> 24) & 2097151L); + values[valuesOffset++] = (int)((block2 >>> 3) & 2097151L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 7L) << 18) | (block3.TripleShift(46))); - values[valuesOffset++] = (int)((block3.TripleShift(25)) & 2097151L); - values[valuesOffset++] = (int)((block3.TripleShift(4)) & 2097151L); + values[valuesOffset++] = (int)(((block2 & 7L) << 18) | (block3 >>> 46)); + values[valuesOffset++] = (int)((block3 >>> 25) & 2097151L); + values[valuesOffset++] = (int)((block3 >>> 4) & 2097151L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 15L) << 17) | (block4.TripleShift(47))); - values[valuesOffset++] = (int)((block4.TripleShift(26)) & 2097151L); - values[valuesOffset++] = (int)((block4.TripleShift(5)) & 2097151L); + values[valuesOffset++] = (int)(((block3 & 15L) << 17) | (block4 >>> 47)); + values[valuesOffset++] = (int)((block4 >>> 26) & 2097151L); + values[valuesOffset++] = (int)((block4 >>> 5) & 2097151L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 31L) << 16) | (block5.TripleShift(48))); - values[valuesOffset++] = (int)((block5.TripleShift(27)) & 2097151L); - values[valuesOffset++] = (int)((block5.TripleShift(6)) & 2097151L); + values[valuesOffset++] = (int)(((block4 & 31L) << 16) | (block5 >>> 48)); + values[valuesOffset++] = (int)((block5 >>> 27) & 2097151L); + values[valuesOffset++] = (int)((block5 >>> 6) & 2097151L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 63L) << 15) | (block6.TripleShift(49))); - values[valuesOffset++] = (int)((block6.TripleShift(28)) & 2097151L); - values[valuesOffset++] = (int)((block6.TripleShift(7)) & 2097151L); + values[valuesOffset++] = (int)(((block5 & 63L) << 15) | (block6 >>> 49)); + values[valuesOffset++] = (int)((block6 >>> 28) & 2097151L); + values[valuesOffset++] = (int)((block6 >>> 7) & 2097151L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 127L) << 14) | (block7.TripleShift(50))); - values[valuesOffset++] = (int)((block7.TripleShift(29)) & 2097151L); - values[valuesOffset++] = (int)((block7.TripleShift(8)) & 2097151L); + values[valuesOffset++] = (int)(((block6 & 127L) << 14) | (block7 >>> 50)); + values[valuesOffset++] = (int)((block7 >>> 29) & 2097151L); + values[valuesOffset++] = (int)((block7 >>> 8) & 2097151L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 255L) << 13) | (block8.TripleShift(51))); - values[valuesOffset++] = (int)((block8.TripleShift(30)) & 2097151L); - values[valuesOffset++] = (int)((block8.TripleShift(9)) & 2097151L); + values[valuesOffset++] = (int)(((block7 & 255L) << 13) | (block8 >>> 51)); + values[valuesOffset++] = (int)((block8 >>> 30) & 2097151L); + values[valuesOffset++] = (int)((block8 >>> 9) & 2097151L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 511L) << 12) | (block9.TripleShift(52))); - values[valuesOffset++] = (int)((block9.TripleShift(31)) & 2097151L); - values[valuesOffset++] = (int)((block9.TripleShift(10)) & 2097151L); + values[valuesOffset++] = (int)(((block8 & 511L) << 12) | (block9 >>> 52)); + values[valuesOffset++] = (int)((block9 >>> 31) & 2097151L); + values[valuesOffset++] = (int)((block9 >>> 10) & 2097151L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 1023L) << 11) | (block10.TripleShift(53))); - values[valuesOffset++] = (int)((block10.TripleShift(32)) & 2097151L); - values[valuesOffset++] = (int)((block10.TripleShift(11)) & 2097151L); + values[valuesOffset++] = (int)(((block9 & 1023L) << 11) | (block10 >>> 53)); + values[valuesOffset++] = (int)((block10 >>> 32) & 2097151L); + values[valuesOffset++] = (int)((block10 >>> 11) & 2097151L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 2047L) << 10) | (block11.TripleShift(54))); - values[valuesOffset++] = (int)((block11.TripleShift(33)) & 2097151L); - values[valuesOffset++] = (int)((block11.TripleShift(12)) & 2097151L); + values[valuesOffset++] = (int)(((block10 & 2047L) << 10) | (block11 >>> 54)); + values[valuesOffset++] = (int)((block11 >>> 33) & 2097151L); + values[valuesOffset++] = (int)((block11 >>> 12) & 2097151L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 4095L) << 9) | (block12.TripleShift(55))); - values[valuesOffset++] = (int)((block12.TripleShift(34)) & 2097151L); - values[valuesOffset++] = (int)((block12.TripleShift(13)) & 2097151L); + values[valuesOffset++] = (int)(((block11 & 4095L) << 9) | (block12 >>> 55)); + values[valuesOffset++] = (int)((block12 >>> 34) & 2097151L); + values[valuesOffset++] = (int)((block12 >>> 13) & 2097151L); long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block12 & 8191L) << 8) | (block13.TripleShift(56))); - values[valuesOffset++] = (int)((block13.TripleShift(35)) & 2097151L); - values[valuesOffset++] = (int)((block13.TripleShift(14)) & 2097151L); + values[valuesOffset++] = (int)(((block12 & 8191L) << 8) | (block13 >>> 56)); + values[valuesOffset++] = (int)((block13 >>> 35) & 2097151L); + values[valuesOffset++] = (int)((block13 >>> 14) & 2097151L); long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block13 & 16383L) << 7) | (block14.TripleShift(57))); - values[valuesOffset++] = (int)((block14.TripleShift(36)) & 2097151L); - values[valuesOffset++] = (int)((block14.TripleShift(15)) & 2097151L); + values[valuesOffset++] = (int)(((block13 & 16383L) << 7) | (block14 >>> 57)); + values[valuesOffset++] = (int)((block14 >>> 36) & 2097151L); + values[valuesOffset++] = (int)((block14 >>> 15) & 2097151L); long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block14 & 32767L) << 6) | (block15.TripleShift(58))); - values[valuesOffset++] = (int)((block15.TripleShift(37)) & 2097151L); - values[valuesOffset++] = (int)((block15.TripleShift(16)) & 2097151L); + values[valuesOffset++] = (int)(((block14 & 32767L) << 6) | (block15 >>> 58)); + values[valuesOffset++] = (int)((block15 >>> 37) & 2097151L); + values[valuesOffset++] = (int)((block15 >>> 16) & 2097151L); long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block15 & 65535L) << 5) | (block16.TripleShift(59))); - values[valuesOffset++] = (int)((block16.TripleShift(38)) & 2097151L); - values[valuesOffset++] = (int)((block16.TripleShift(17)) & 2097151L); + values[valuesOffset++] = (int)(((block15 & 65535L) << 5) | (block16 >>> 59)); + values[valuesOffset++] = (int)((block16 >>> 38) & 2097151L); + values[valuesOffset++] = (int)((block16 >>> 17) & 2097151L); long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block16 & 131071L) << 4) | (block17.TripleShift(60))); - values[valuesOffset++] = (int)((block17.TripleShift(39)) & 2097151L); - values[valuesOffset++] = (int)((block17.TripleShift(18)) & 2097151L); + values[valuesOffset++] = (int)(((block16 & 131071L) << 4) | (block17 >>> 60)); + values[valuesOffset++] = (int)((block17 >>> 39) & 2097151L); + values[valuesOffset++] = (int)((block17 >>> 18) & 2097151L); long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block17 & 262143L) << 3) | (block18.TripleShift(61))); - values[valuesOffset++] = (int)((block18.TripleShift(40)) & 2097151L); - values[valuesOffset++] = (int)((block18.TripleShift(19)) & 2097151L); + values[valuesOffset++] = (int)(((block17 & 262143L) << 3) | (block18 >>> 61)); + values[valuesOffset++] = (int)((block18 >>> 40) & 2097151L); + values[valuesOffset++] = (int)((block18 >>> 19) & 2097151L); long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block18 & 524287L) << 2) | (block19.TripleShift(62))); - values[valuesOffset++] = (int)((block19.TripleShift(41)) & 2097151L); - values[valuesOffset++] = (int)((block19.TripleShift(20)) & 2097151L); + values[valuesOffset++] = (int)(((block18 & 524287L) << 2) | (block19 >>> 62)); + values[valuesOffset++] = (int)((block19 >>> 41) & 2097151L); + values[valuesOffset++] = (int)((block19 >>> 20) & 2097151L); long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block19 & 1048575L) << 1) | (block20.TripleShift(63))); - values[valuesOffset++] = (int)((block20.TripleShift(42)) & 2097151L); - values[valuesOffset++] = (int)((block20.TripleShift(21)) & 2097151L); + values[valuesOffset++] = (int)(((block19 & 1048575L) << 1) | (block20 >>> 63)); + values[valuesOffset++] = (int)((block20 >>> 42) & 2097151L); + values[valuesOffset++] = (int)((block20 >>> 21) & 2097151L); values[valuesOffset++] = (int)(block20 & 2097151L); } } @@ -130,29 +128,29 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2.TripleShift(3)); + values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6); int byte6 = blocks[blocksOffset++] & 0xFF; int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7.TripleShift(1)); + values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1); int byte8 = blocks[blocksOffset++] & 0xFF; int byte9 = blocks[blocksOffset++] & 0xFF; int byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10.TripleShift(4)); + values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4); int byte11 = blocks[blocksOffset++] & 0xFF; int byte12 = blocks[blocksOffset++] & 0xFF; int byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13.TripleShift(7)); + values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7); int byte14 = blocks[blocksOffset++] & 0xFF; int byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15.TripleShift(2)); + values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2); int byte16 = blocks[blocksOffset++] & 0xFF; int byte17 = blocks[blocksOffset++] & 0xFF; int byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18.TripleShift(5)); + values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5); int byte19 = blocks[blocksOffset++] & 0xFF; int byte20 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20; @@ -164,89 +162,89 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(43); - values[valuesOffset++] = (block0.TripleShift(22)) & 2097151L; - values[valuesOffset++] = (block0.TripleShift(1)) & 2097151L; + values[valuesOffset++] = block0 >>> 43; + values[valuesOffset++] = (block0 >>> 22) & 2097151L; + values[valuesOffset++] = (block0 >>> 1) & 2097151L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1L) << 20) | (block1.TripleShift(44)); - values[valuesOffset++] = (block1.TripleShift(23)) & 2097151L; - values[valuesOffset++] = (block1.TripleShift(2)) & 2097151L; + values[valuesOffset++] = ((block0 & 1L) << 20) | (block1 >>> 44); + values[valuesOffset++] = (block1 >>> 23) & 2097151L; + values[valuesOffset++] = (block1 >>> 2) & 2097151L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 19) | (block2.TripleShift(45)); - values[valuesOffset++] = (block2.TripleShift(24)) & 2097151L; - values[valuesOffset++] = (block2.TripleShift(3)) & 2097151L; + values[valuesOffset++] = ((block1 & 3L) << 19) | (block2 >>> 45); + values[valuesOffset++] = (block2 >>> 24) & 2097151L; + values[valuesOffset++] = (block2 >>> 3) & 2097151L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 7L) << 18) | (block3.TripleShift(46)); - values[valuesOffset++] = (block3.TripleShift(25)) & 2097151L; - values[valuesOffset++] = (block3.TripleShift(4)) & 2097151L; + values[valuesOffset++] = ((block2 & 7L) << 18) | (block3 >>> 46); + values[valuesOffset++] = (block3 >>> 25) & 2097151L; + values[valuesOffset++] = (block3 >>> 4) & 2097151L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 17) | (block4.TripleShift(47)); - values[valuesOffset++] = (block4.TripleShift(26)) & 2097151L; - values[valuesOffset++] = (block4.TripleShift(5)) & 2097151L; + values[valuesOffset++] = ((block3 & 15L) << 17) | (block4 >>> 47); + values[valuesOffset++] = (block4 >>> 26) & 2097151L; + values[valuesOffset++] = (block4 >>> 5) & 2097151L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 16) | (block5.TripleShift(48)); - values[valuesOffset++] = (block5.TripleShift(27)) & 2097151L; - values[valuesOffset++] = (block5.TripleShift(6)) & 2097151L; + values[valuesOffset++] = ((block4 & 31L) << 16) | (block5 >>> 48); + values[valuesOffset++] = (block5 >>> 27) & 2097151L; + values[valuesOffset++] = (block5 >>> 6) & 2097151L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 15) | (block6.TripleShift(49)); - values[valuesOffset++] = (block6.TripleShift(28)) & 2097151L; - values[valuesOffset++] = (block6.TripleShift(7)) & 2097151L; + values[valuesOffset++] = ((block5 & 63L) << 15) | (block6 >>> 49); + values[valuesOffset++] = (block6 >>> 28) & 2097151L; + values[valuesOffset++] = (block6 >>> 7) & 2097151L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 127L) << 14) | (block7.TripleShift(50)); - values[valuesOffset++] = (block7.TripleShift(29)) & 2097151L; - values[valuesOffset++] = (block7.TripleShift(8)) & 2097151L; + values[valuesOffset++] = ((block6 & 127L) << 14) | (block7 >>> 50); + values[valuesOffset++] = (block7 >>> 29) & 2097151L; + values[valuesOffset++] = (block7 >>> 8) & 2097151L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 13) | (block8.TripleShift(51)); - values[valuesOffset++] = (block8.TripleShift(30)) & 2097151L; - values[valuesOffset++] = (block8.TripleShift(9)) & 2097151L; + values[valuesOffset++] = ((block7 & 255L) << 13) | (block8 >>> 51); + values[valuesOffset++] = (block8 >>> 30) & 2097151L; + values[valuesOffset++] = (block8 >>> 9) & 2097151L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 511L) << 12) | (block9.TripleShift(52)); - values[valuesOffset++] = (block9.TripleShift(31)) & 2097151L; - values[valuesOffset++] = (block9.TripleShift(10)) & 2097151L; + values[valuesOffset++] = ((block8 & 511L) << 12) | (block9 >>> 52); + values[valuesOffset++] = (block9 >>> 31) & 2097151L; + values[valuesOffset++] = (block9 >>> 10) & 2097151L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 11) | (block10.TripleShift(53)); - values[valuesOffset++] = (block10.TripleShift(32)) & 2097151L; - values[valuesOffset++] = (block10.TripleShift(11)) & 2097151L; + values[valuesOffset++] = ((block9 & 1023L) << 11) | (block10 >>> 53); + values[valuesOffset++] = (block10 >>> 32) & 2097151L; + values[valuesOffset++] = (block10 >>> 11) & 2097151L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 2047L) << 10) | (block11.TripleShift(54)); - values[valuesOffset++] = (block11.TripleShift(33)) & 2097151L; - values[valuesOffset++] = (block11.TripleShift(12)) & 2097151L; + values[valuesOffset++] = ((block10 & 2047L) << 10) | (block11 >>> 54); + values[valuesOffset++] = (block11 >>> 33) & 2097151L; + values[valuesOffset++] = (block11 >>> 12) & 2097151L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4095L) << 9) | (block12.TripleShift(55)); - values[valuesOffset++] = (block12.TripleShift(34)) & 2097151L; - values[valuesOffset++] = (block12.TripleShift(13)) & 2097151L; + values[valuesOffset++] = ((block11 & 4095L) << 9) | (block12 >>> 55); + values[valuesOffset++] = (block12 >>> 34) & 2097151L; + values[valuesOffset++] = (block12 >>> 13) & 2097151L; long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 8191L) << 8) | (block13.TripleShift(56)); - values[valuesOffset++] = (block13.TripleShift(35)) & 2097151L; - values[valuesOffset++] = (block13.TripleShift(14)) & 2097151L; + values[valuesOffset++] = ((block12 & 8191L) << 8) | (block13 >>> 56); + values[valuesOffset++] = (block13 >>> 35) & 2097151L; + values[valuesOffset++] = (block13 >>> 14) & 2097151L; long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 16383L) << 7) | (block14.TripleShift(57)); - values[valuesOffset++] = (block14.TripleShift(36)) & 2097151L; - values[valuesOffset++] = (block14.TripleShift(15)) & 2097151L; + values[valuesOffset++] = ((block13 & 16383L) << 7) | (block14 >>> 57); + values[valuesOffset++] = (block14 >>> 36) & 2097151L; + values[valuesOffset++] = (block14 >>> 15) & 2097151L; long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 32767L) << 6) | (block15.TripleShift(58)); - values[valuesOffset++] = (block15.TripleShift(37)) & 2097151L; - values[valuesOffset++] = (block15.TripleShift(16)) & 2097151L; + values[valuesOffset++] = ((block14 & 32767L) << 6) | (block15 >>> 58); + values[valuesOffset++] = (block15 >>> 37) & 2097151L; + values[valuesOffset++] = (block15 >>> 16) & 2097151L; long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 65535L) << 5) | (block16.TripleShift(59)); - values[valuesOffset++] = (block16.TripleShift(38)) & 2097151L; - values[valuesOffset++] = (block16.TripleShift(17)) & 2097151L; + values[valuesOffset++] = ((block15 & 65535L) << 5) | (block16 >>> 59); + values[valuesOffset++] = (block16 >>> 38) & 2097151L; + values[valuesOffset++] = (block16 >>> 17) & 2097151L; long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 131071L) << 4) | (block17.TripleShift(60)); - values[valuesOffset++] = (block17.TripleShift(39)) & 2097151L; - values[valuesOffset++] = (block17.TripleShift(18)) & 2097151L; + values[valuesOffset++] = ((block16 & 131071L) << 4) | (block17 >>> 60); + values[valuesOffset++] = (block17 >>> 39) & 2097151L; + values[valuesOffset++] = (block17 >>> 18) & 2097151L; long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 262143L) << 3) | (block18.TripleShift(61)); - values[valuesOffset++] = (block18.TripleShift(40)) & 2097151L; - values[valuesOffset++] = (block18.TripleShift(19)) & 2097151L; + values[valuesOffset++] = ((block17 & 262143L) << 3) | (block18 >>> 61); + values[valuesOffset++] = (block18 >>> 40) & 2097151L; + values[valuesOffset++] = (block18 >>> 19) & 2097151L; long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 524287L) << 2) | (block19.TripleShift(62)); - values[valuesOffset++] = (block19.TripleShift(41)) & 2097151L; - values[valuesOffset++] = (block19.TripleShift(20)) & 2097151L; + values[valuesOffset++] = ((block18 & 524287L) << 2) | (block19 >>> 62); + values[valuesOffset++] = (block19 >>> 41) & 2097151L; + values[valuesOffset++] = (block19 >>> 20) & 2097151L; long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1048575L) << 1) | (block20.TripleShift(63)); - values[valuesOffset++] = (block20.TripleShift(42)) & 2097151L; - values[valuesOffset++] = (block20.TripleShift(21)) & 2097151L; + values[valuesOffset++] = ((block19 & 1048575L) << 1) | (block20 >>> 63); + values[valuesOffset++] = (block20 >>> 42) & 2097151L; + values[valuesOffset++] = (block20 >>> 21) & 2097151L; values[valuesOffset++] = block20 & 2097151L; } } @@ -258,33 +256,33 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2.TripleShift(3)); + values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6); long byte6 = blocks[blocksOffset++] & 0xFF; long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7.TripleShift(1)); + values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1); long byte8 = blocks[blocksOffset++] & 0xFF; long byte9 = blocks[blocksOffset++] & 0xFF; long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10.TripleShift(4)); + values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4); long byte11 = blocks[blocksOffset++] & 0xFF; long byte12 = blocks[blocksOffset++] & 0xFF; long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13.TripleShift(7)); + values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7); long byte14 = blocks[blocksOffset++] & 0xFF; long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15.TripleShift(2)); + values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2); long byte16 = blocks[blocksOffset++] & 0xFF; long byte17 = blocks[blocksOffset++] & 0xFF; long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18.TripleShift(5)); + values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5); long byte19 = blocks[blocksOffset++] & 0xFF; long byte20 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked22.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked22.cs index d29c76e831..162538fd33 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked22.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked22.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,47 +34,47 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(42)); - values[valuesOffset++] = (int)((block0.TripleShift(20)) & 4194303L); + values[valuesOffset++] = (int)(block0 >>> 42); + values[valuesOffset++] = (int)((block0 >>> 20) & 4194303L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1048575L) << 2) | (block1.TripleShift(62))); - values[valuesOffset++] = (int)((block1.TripleShift(40)) & 4194303L); - values[valuesOffset++] = (int)((block1.TripleShift(18)) & 4194303L); + values[valuesOffset++] = (int)(((block0 & 1048575L) << 2) | (block1 >>> 62)); + values[valuesOffset++] = (int)((block1 >>> 40) & 4194303L); + values[valuesOffset++] = (int)((block1 >>> 18) & 4194303L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 262143L) << 4) | (block2.TripleShift(60))); - values[valuesOffset++] = (int)((block2.TripleShift(38)) & 4194303L); - values[valuesOffset++] = (int)((block2.TripleShift(16)) & 4194303L); + values[valuesOffset++] = (int)(((block1 & 262143L) << 4) | (block2 >>> 60)); + values[valuesOffset++] = (int)((block2 >>> 38) & 4194303L); + values[valuesOffset++] = (int)((block2 >>> 16) & 4194303L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 65535L) << 6) | (block3.TripleShift(58))); - values[valuesOffset++] = (int)((block3.TripleShift(36)) & 4194303L); - values[valuesOffset++] = (int)((block3.TripleShift(14)) & 4194303L); + values[valuesOffset++] = (int)(((block2 & 65535L) << 6) | (block3 >>> 58)); + values[valuesOffset++] = (int)((block3 >>> 36) & 4194303L); + values[valuesOffset++] = (int)((block3 >>> 14) & 4194303L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 16383L) << 8) | (block4.TripleShift(56))); - values[valuesOffset++] = (int)((block4.TripleShift(34)) & 4194303L); - values[valuesOffset++] = (int)((block4.TripleShift(12)) & 4194303L); + values[valuesOffset++] = (int)(((block3 & 16383L) << 8) | (block4 >>> 56)); + values[valuesOffset++] = (int)((block4 >>> 34) & 4194303L); + values[valuesOffset++] = (int)((block4 >>> 12) & 4194303L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 4095L) << 10) | (block5.TripleShift(54))); - values[valuesOffset++] = (int)((block5.TripleShift(32)) & 4194303L); - values[valuesOffset++] = (int)((block5.TripleShift(10)) & 4194303L); + values[valuesOffset++] = (int)(((block4 & 4095L) << 10) | (block5 >>> 54)); + values[valuesOffset++] = (int)((block5 >>> 32) & 4194303L); + values[valuesOffset++] = (int)((block5 >>> 10) & 4194303L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 1023L) << 12) | (block6.TripleShift(52))); - values[valuesOffset++] = (int)((block6.TripleShift(30)) & 4194303L); - values[valuesOffset++] = (int)((block6.TripleShift(8)) & 4194303L); + values[valuesOffset++] = (int)(((block5 & 1023L) << 12) | (block6 >>> 52)); + values[valuesOffset++] = (int)((block6 >>> 30) & 4194303L); + values[valuesOffset++] = (int)((block6 >>> 8) & 4194303L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 255L) << 14) | (block7.TripleShift(50))); - values[valuesOffset++] = (int)((block7.TripleShift(28)) & 4194303L); - values[valuesOffset++] = (int)((block7.TripleShift(6)) & 4194303L); + values[valuesOffset++] = (int)(((block6 & 255L) << 14) | (block7 >>> 50)); + values[valuesOffset++] = (int)((block7 >>> 28) & 4194303L); + values[valuesOffset++] = (int)((block7 >>> 6) & 4194303L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 63L) << 16) | (block8.TripleShift(48))); - values[valuesOffset++] = (int)((block8.TripleShift(26)) & 4194303L); - values[valuesOffset++] = (int)((block8.TripleShift(4)) & 4194303L); + values[valuesOffset++] = (int)(((block7 & 63L) << 16) | (block8 >>> 48)); + values[valuesOffset++] = (int)((block8 >>> 26) & 4194303L); + values[valuesOffset++] = (int)((block8 >>> 4) & 4194303L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 15L) << 18) | (block9.TripleShift(46))); - values[valuesOffset++] = (int)((block9.TripleShift(24)) & 4194303L); - values[valuesOffset++] = (int)((block9.TripleShift(2)) & 4194303L); + values[valuesOffset++] = (int)(((block8 & 15L) << 18) | (block9 >>> 46)); + values[valuesOffset++] = (int)((block9 >>> 24) & 4194303L); + values[valuesOffset++] = (int)((block9 >>> 2) & 4194303L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 3L) << 20) | (block10.TripleShift(44))); - values[valuesOffset++] = (int)((block10.TripleShift(22)) & 4194303L); + values[valuesOffset++] = (int)(((block9 & 3L) << 20) | (block10 >>> 44)); + values[valuesOffset++] = (int)((block10 >>> 22) & 4194303L); values[valuesOffset++] = (int)(block10 & 4194303L); } } @@ -88,15 +86,15 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2.TripleShift(2)); + values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4); int byte6 = blocks[blocksOffset++] & 0xFF; int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8.TripleShift(6)); + values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6); int byte9 = blocks[blocksOffset++] & 0xFF; int byte10 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10; @@ -108,47 +106,47 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(42); - values[valuesOffset++] = (block0.TripleShift(20)) & 4194303L; + values[valuesOffset++] = block0 >>> 42; + values[valuesOffset++] = (block0 >>> 20) & 4194303L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1048575L) << 2) | (block1.TripleShift(62)); - values[valuesOffset++] = (block1.TripleShift(40)) & 4194303L; - values[valuesOffset++] = (block1.TripleShift(18)) & 4194303L; + values[valuesOffset++] = ((block0 & 1048575L) << 2) | (block1 >>> 62); + values[valuesOffset++] = (block1 >>> 40) & 4194303L; + values[valuesOffset++] = (block1 >>> 18) & 4194303L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 262143L) << 4) | (block2.TripleShift(60)); - values[valuesOffset++] = (block2.TripleShift(38)) & 4194303L; - values[valuesOffset++] = (block2.TripleShift(16)) & 4194303L; + values[valuesOffset++] = ((block1 & 262143L) << 4) | (block2 >>> 60); + values[valuesOffset++] = (block2 >>> 38) & 4194303L; + values[valuesOffset++] = (block2 >>> 16) & 4194303L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 65535L) << 6) | (block3.TripleShift(58)); - values[valuesOffset++] = (block3.TripleShift(36)) & 4194303L; - values[valuesOffset++] = (block3.TripleShift(14)) & 4194303L; + values[valuesOffset++] = ((block2 & 65535L) << 6) | (block3 >>> 58); + values[valuesOffset++] = (block3 >>> 36) & 4194303L; + values[valuesOffset++] = (block3 >>> 14) & 4194303L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 16383L) << 8) | (block4.TripleShift(56)); - values[valuesOffset++] = (block4.TripleShift(34)) & 4194303L; - values[valuesOffset++] = (block4.TripleShift(12)) & 4194303L; + values[valuesOffset++] = ((block3 & 16383L) << 8) | (block4 >>> 56); + values[valuesOffset++] = (block4 >>> 34) & 4194303L; + values[valuesOffset++] = (block4 >>> 12) & 4194303L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 4095L) << 10) | (block5.TripleShift(54)); - values[valuesOffset++] = (block5.TripleShift(32)) & 4194303L; - values[valuesOffset++] = (block5.TripleShift(10)) & 4194303L; + values[valuesOffset++] = ((block4 & 4095L) << 10) | (block5 >>> 54); + values[valuesOffset++] = (block5 >>> 32) & 4194303L; + values[valuesOffset++] = (block5 >>> 10) & 4194303L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1023L) << 12) | (block6.TripleShift(52)); - values[valuesOffset++] = (block6.TripleShift(30)) & 4194303L; - values[valuesOffset++] = (block6.TripleShift(8)) & 4194303L; + values[valuesOffset++] = ((block5 & 1023L) << 12) | (block6 >>> 52); + values[valuesOffset++] = (block6 >>> 30) & 4194303L; + values[valuesOffset++] = (block6 >>> 8) & 4194303L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 255L) << 14) | (block7.TripleShift(50)); - values[valuesOffset++] = (block7.TripleShift(28)) & 4194303L; - values[valuesOffset++] = (block7.TripleShift(6)) & 4194303L; + values[valuesOffset++] = ((block6 & 255L) << 14) | (block7 >>> 50); + values[valuesOffset++] = (block7 >>> 28) & 4194303L; + values[valuesOffset++] = (block7 >>> 6) & 4194303L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 63L) << 16) | (block8.TripleShift(48)); - values[valuesOffset++] = (block8.TripleShift(26)) & 4194303L; - values[valuesOffset++] = (block8.TripleShift(4)) & 4194303L; + values[valuesOffset++] = ((block7 & 63L) << 16) | (block8 >>> 48); + values[valuesOffset++] = (block8 >>> 26) & 4194303L; + values[valuesOffset++] = (block8 >>> 4) & 4194303L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 18) | (block9.TripleShift(46)); - values[valuesOffset++] = (block9.TripleShift(24)) & 4194303L; - values[valuesOffset++] = (block9.TripleShift(2)) & 4194303L; + values[valuesOffset++] = ((block8 & 15L) << 18) | (block9 >>> 46); + values[valuesOffset++] = (block9 >>> 24) & 4194303L; + values[valuesOffset++] = (block9 >>> 2) & 4194303L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 3L) << 20) | (block10.TripleShift(44)); - values[valuesOffset++] = (block10.TripleShift(22)) & 4194303L; + values[valuesOffset++] = ((block9 & 3L) << 20) | (block10 >>> 44); + values[valuesOffset++] = (block10 >>> 22) & 4194303L; values[valuesOffset++] = block10 & 4194303L; } } @@ -160,19 +158,19 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2.TripleShift(2)); + values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4); long byte6 = blocks[blocksOffset++] & 0xFF; long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8.TripleShift(6)); + values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6); long byte9 = blocks[blocksOffset++] & 0xFF; long byte10 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked23.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked23.cs index 59d6936b32..92e7ef0160 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked23.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked23.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,91 +34,91 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(41)); - values[valuesOffset++] = (int)((block0.TripleShift(18)) & 8388607L); + values[valuesOffset++] = (int)(block0 >>> 41); + values[valuesOffset++] = (int)((block0 >>> 18) & 8388607L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 262143L) << 5) | (block1.TripleShift(59))); - values[valuesOffset++] = (int)((block1.TripleShift(36)) & 8388607L); - values[valuesOffset++] = (int)((block1.TripleShift(13)) & 8388607L); + values[valuesOffset++] = (int)(((block0 & 262143L) << 5) | (block1 >>> 59)); + values[valuesOffset++] = (int)((block1 >>> 36) & 8388607L); + values[valuesOffset++] = (int)((block1 >>> 13) & 8388607L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 8191L) << 10) | (block2.TripleShift(54))); - values[valuesOffset++] = (int)((block2.TripleShift(31)) & 8388607L); - values[valuesOffset++] = (int)((block2.TripleShift(8)) & 8388607L); + values[valuesOffset++] = (int)(((block1 & 8191L) << 10) | (block2 >>> 54)); + values[valuesOffset++] = (int)((block2 >>> 31) & 8388607L); + values[valuesOffset++] = (int)((block2 >>> 8) & 8388607L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 255L) << 15) | (block3.TripleShift(49))); - values[valuesOffset++] = (int)((block3.TripleShift(26)) & 8388607L); - values[valuesOffset++] = (int)((block3.TripleShift(3)) & 8388607L); + values[valuesOffset++] = (int)(((block2 & 255L) << 15) | (block3 >>> 49)); + values[valuesOffset++] = (int)((block3 >>> 26) & 8388607L); + values[valuesOffset++] = (int)((block3 >>> 3) & 8388607L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 7L) << 20) | (block4.TripleShift(44))); - values[valuesOffset++] = (int)((block4.TripleShift(21)) & 8388607L); + values[valuesOffset++] = (int)(((block3 & 7L) << 20) | (block4 >>> 44)); + values[valuesOffset++] = (int)((block4 >>> 21) & 8388607L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 2097151L) << 2) | (block5.TripleShift(62))); - values[valuesOffset++] = (int)((block5.TripleShift(39)) & 8388607L); - values[valuesOffset++] = (int)((block5.TripleShift(16)) & 8388607L); + values[valuesOffset++] = (int)(((block4 & 2097151L) << 2) | (block5 >>> 62)); + values[valuesOffset++] = (int)((block5 >>> 39) & 8388607L); + values[valuesOffset++] = (int)((block5 >>> 16) & 8388607L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 65535L) << 7) | (block6.TripleShift(57))); - values[valuesOffset++] = (int)((block6.TripleShift(34)) & 8388607L); - values[valuesOffset++] = (int)((block6.TripleShift(11)) & 8388607L); + values[valuesOffset++] = (int)(((block5 & 65535L) << 7) | (block6 >>> 57)); + values[valuesOffset++] = (int)((block6 >>> 34) & 8388607L); + values[valuesOffset++] = (int)((block6 >>> 11) & 8388607L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 2047L) << 12) | (block7.TripleShift(52))); - values[valuesOffset++] = (int)((block7.TripleShift(29)) & 8388607L); - values[valuesOffset++] = (int)((block7.TripleShift(6)) & 8388607L); + values[valuesOffset++] = (int)(((block6 & 2047L) << 12) | (block7 >>> 52)); + values[valuesOffset++] = (int)((block7 >>> 29) & 8388607L); + values[valuesOffset++] = (int)((block7 >>> 6) & 8388607L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 63L) << 17) | (block8.TripleShift(47))); - values[valuesOffset++] = (int)((block8.TripleShift(24)) & 8388607L); - values[valuesOffset++] = (int)((block8.TripleShift(1)) & 8388607L); + values[valuesOffset++] = (int)(((block7 & 63L) << 17) | (block8 >>> 47)); + values[valuesOffset++] = (int)((block8 >>> 24) & 8388607L); + values[valuesOffset++] = (int)((block8 >>> 1) & 8388607L); long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block8 & 1L) << 22) | (block9.TripleShift(42))); - values[valuesOffset++] = (int)((block9.TripleShift(19)) & 8388607L); + values[valuesOffset++] = (int)(((block8 & 1L) << 22) | (block9 >>> 42)); + values[valuesOffset++] = (int)((block9 >>> 19) & 8388607L); long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block9 & 524287L) << 4) | (block10.TripleShift(60))); - values[valuesOffset++] = (int)((block10.TripleShift(37)) & 8388607L); - values[valuesOffset++] = (int)((block10.TripleShift(14)) & 8388607L); + values[valuesOffset++] = (int)(((block9 & 524287L) << 4) | (block10 >>> 60)); + values[valuesOffset++] = (int)((block10 >>> 37) & 8388607L); + values[valuesOffset++] = (int)((block10 >>> 14) & 8388607L); long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block10 & 16383L) << 9) | (block11.TripleShift(55))); - values[valuesOffset++] = (int)((block11.TripleShift(32)) & 8388607L); - values[valuesOffset++] = (int)((block11.TripleShift(9)) & 8388607L); + values[valuesOffset++] = (int)(((block10 & 16383L) << 9) | (block11 >>> 55)); + values[valuesOffset++] = (int)((block11 >>> 32) & 8388607L); + values[valuesOffset++] = (int)((block11 >>> 9) & 8388607L); long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block11 & 511L) << 14) | (block12.TripleShift(50))); - values[valuesOffset++] = (int)((block12.TripleShift(27)) & 8388607L); - values[valuesOffset++] = (int)((block12.TripleShift(4)) & 8388607L); + values[valuesOffset++] = (int)(((block11 & 511L) << 14) | (block12 >>> 50)); + values[valuesOffset++] = (int)((block12 >>> 27) & 8388607L); + values[valuesOffset++] = (int)((block12 >>> 4) & 8388607L); long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block12 & 15L) << 19) | (block13.TripleShift(45))); - values[valuesOffset++] = (int)((block13.TripleShift(22)) & 8388607L); + values[valuesOffset++] = (int)(((block12 & 15L) << 19) | (block13 >>> 45)); + values[valuesOffset++] = (int)((block13 >>> 22) & 8388607L); long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block13 & 4194303L) << 1) | (block14.TripleShift(63))); - values[valuesOffset++] = (int)((block14.TripleShift(40)) & 8388607L); - values[valuesOffset++] = (int)((block14.TripleShift(17)) & 8388607L); + values[valuesOffset++] = (int)(((block13 & 4194303L) << 1) | (block14 >>> 63)); + values[valuesOffset++] = (int)((block14 >>> 40) & 8388607L); + values[valuesOffset++] = (int)((block14 >>> 17) & 8388607L); long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block14 & 131071L) << 6) | (block15.TripleShift(58))); - values[valuesOffset++] = (int)((block15.TripleShift(35)) & 8388607L); - values[valuesOffset++] = (int)((block15.TripleShift(12)) & 8388607L); + values[valuesOffset++] = (int)(((block14 & 131071L) << 6) | (block15 >>> 58)); + values[valuesOffset++] = (int)((block15 >>> 35) & 8388607L); + values[valuesOffset++] = (int)((block15 >>> 12) & 8388607L); long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block15 & 4095L) << 11) | (block16.TripleShift(53))); - values[valuesOffset++] = (int)((block16.TripleShift(30)) & 8388607L); - values[valuesOffset++] = (int)((block16.TripleShift(7)) & 8388607L); + values[valuesOffset++] = (int)(((block15 & 4095L) << 11) | (block16 >>> 53)); + values[valuesOffset++] = (int)((block16 >>> 30) & 8388607L); + values[valuesOffset++] = (int)((block16 >>> 7) & 8388607L); long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block16 & 127L) << 16) | (block17.TripleShift(48))); - values[valuesOffset++] = (int)((block17.TripleShift(25)) & 8388607L); - values[valuesOffset++] = (int)((block17.TripleShift(2)) & 8388607L); + values[valuesOffset++] = (int)(((block16 & 127L) << 16) | (block17 >>> 48)); + values[valuesOffset++] = (int)((block17 >>> 25) & 8388607L); + values[valuesOffset++] = (int)((block17 >>> 2) & 8388607L); long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block17 & 3L) << 21) | (block18.TripleShift(43))); - values[valuesOffset++] = (int)((block18.TripleShift(20)) & 8388607L); + values[valuesOffset++] = (int)(((block17 & 3L) << 21) | (block18 >>> 43)); + values[valuesOffset++] = (int)((block18 >>> 20) & 8388607L); long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block18 & 1048575L) << 3) | (block19.TripleShift(61))); - values[valuesOffset++] = (int)((block19.TripleShift(38)) & 8388607L); - values[valuesOffset++] = (int)((block19.TripleShift(15)) & 8388607L); + values[valuesOffset++] = (int)(((block18 & 1048575L) << 3) | (block19 >>> 61)); + values[valuesOffset++] = (int)((block19 >>> 38) & 8388607L); + values[valuesOffset++] = (int)((block19 >>> 15) & 8388607L); long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block19 & 32767L) << 8) | (block20.TripleShift(56))); - values[valuesOffset++] = (int)((block20.TripleShift(33)) & 8388607L); - values[valuesOffset++] = (int)((block20.TripleShift(10)) & 8388607L); + values[valuesOffset++] = (int)(((block19 & 32767L) << 8) | (block20 >>> 56)); + values[valuesOffset++] = (int)((block20 >>> 33) & 8388607L); + values[valuesOffset++] = (int)((block20 >>> 10) & 8388607L); long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block20 & 1023L) << 13) | (block21.TripleShift(51))); - values[valuesOffset++] = (int)((block21.TripleShift(28)) & 8388607L); - values[valuesOffset++] = (int)((block21.TripleShift(5)) & 8388607L); + values[valuesOffset++] = (int)(((block20 & 1023L) << 13) | (block21 >>> 51)); + values[valuesOffset++] = (int)((block21 >>> 28) & 8388607L); + values[valuesOffset++] = (int)((block21 >>> 5) & 8388607L); long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block21 & 31L) << 18) | (block22.TripleShift(46))); - values[valuesOffset++] = (int)((block22.TripleShift(23)) & 8388607L); + values[valuesOffset++] = (int)(((block21 & 31L) << 18) | (block22 >>> 46)); + values[valuesOffset++] = (int)((block22 >>> 23) & 8388607L); values[valuesOffset++] = (int)(block22 & 8388607L); } } @@ -132,31 +130,31 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2.TripleShift(1)); + values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1); int byte3 = blocks[blocksOffset++] & 0xFF; int byte4 = blocks[blocksOffset++] & 0xFF; int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2); int byte6 = blocks[blocksOffset++] & 0xFF; int byte7 = blocks[blocksOffset++] & 0xFF; int byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8.TripleShift(3)); + values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3); int byte9 = blocks[blocksOffset++] & 0xFF; int byte10 = blocks[blocksOffset++] & 0xFF; int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11.TripleShift(4)); + values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4); int byte12 = blocks[blocksOffset++] & 0xFF; int byte13 = blocks[blocksOffset++] & 0xFF; int byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14.TripleShift(5)); + values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5); int byte15 = blocks[blocksOffset++] & 0xFF; int byte16 = blocks[blocksOffset++] & 0xFF; int byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17.TripleShift(6)); + values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6); int byte18 = blocks[blocksOffset++] & 0xFF; int byte19 = blocks[blocksOffset++] & 0xFF; int byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20.TripleShift(7)); + values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7); int byte21 = blocks[blocksOffset++] & 0xFF; int byte22 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22; @@ -168,91 +166,91 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(41); - values[valuesOffset++] = (block0.TripleShift(18)) & 8388607L; + values[valuesOffset++] = block0 >>> 41; + values[valuesOffset++] = (block0 >>> 18) & 8388607L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 262143L) << 5) | (block1.TripleShift(59)); - values[valuesOffset++] = (block1.TripleShift(36)) & 8388607L; - values[valuesOffset++] = (block1.TripleShift(13)) & 8388607L; + values[valuesOffset++] = ((block0 & 262143L) << 5) | (block1 >>> 59); + values[valuesOffset++] = (block1 >>> 36) & 8388607L; + values[valuesOffset++] = (block1 >>> 13) & 8388607L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 8191L) << 10) | (block2.TripleShift(54)); - values[valuesOffset++] = (block2.TripleShift(31)) & 8388607L; - values[valuesOffset++] = (block2.TripleShift(8)) & 8388607L; + values[valuesOffset++] = ((block1 & 8191L) << 10) | (block2 >>> 54); + values[valuesOffset++] = (block2 >>> 31) & 8388607L; + values[valuesOffset++] = (block2 >>> 8) & 8388607L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 255L) << 15) | (block3.TripleShift(49)); - values[valuesOffset++] = (block3.TripleShift(26)) & 8388607L; - values[valuesOffset++] = (block3.TripleShift(3)) & 8388607L; + values[valuesOffset++] = ((block2 & 255L) << 15) | (block3 >>> 49); + values[valuesOffset++] = (block3 >>> 26) & 8388607L; + values[valuesOffset++] = (block3 >>> 3) & 8388607L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 7L) << 20) | (block4.TripleShift(44)); - values[valuesOffset++] = (block4.TripleShift(21)) & 8388607L; + values[valuesOffset++] = ((block3 & 7L) << 20) | (block4 >>> 44); + values[valuesOffset++] = (block4 >>> 21) & 8388607L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 2097151L) << 2) | (block5.TripleShift(62)); - values[valuesOffset++] = (block5.TripleShift(39)) & 8388607L; - values[valuesOffset++] = (block5.TripleShift(16)) & 8388607L; + values[valuesOffset++] = ((block4 & 2097151L) << 2) | (block5 >>> 62); + values[valuesOffset++] = (block5 >>> 39) & 8388607L; + values[valuesOffset++] = (block5 >>> 16) & 8388607L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 65535L) << 7) | (block6.TripleShift(57)); - values[valuesOffset++] = (block6.TripleShift(34)) & 8388607L; - values[valuesOffset++] = (block6.TripleShift(11)) & 8388607L; + values[valuesOffset++] = ((block5 & 65535L) << 7) | (block6 >>> 57); + values[valuesOffset++] = (block6 >>> 34) & 8388607L; + values[valuesOffset++] = (block6 >>> 11) & 8388607L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 2047L) << 12) | (block7.TripleShift(52)); - values[valuesOffset++] = (block7.TripleShift(29)) & 8388607L; - values[valuesOffset++] = (block7.TripleShift(6)) & 8388607L; + values[valuesOffset++] = ((block6 & 2047L) << 12) | (block7 >>> 52); + values[valuesOffset++] = (block7 >>> 29) & 8388607L; + values[valuesOffset++] = (block7 >>> 6) & 8388607L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 63L) << 17) | (block8.TripleShift(47)); - values[valuesOffset++] = (block8.TripleShift(24)) & 8388607L; - values[valuesOffset++] = (block8.TripleShift(1)) & 8388607L; + values[valuesOffset++] = ((block7 & 63L) << 17) | (block8 >>> 47); + values[valuesOffset++] = (block8 >>> 24) & 8388607L; + values[valuesOffset++] = (block8 >>> 1) & 8388607L; long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 1L) << 22) | (block9.TripleShift(42)); - values[valuesOffset++] = (block9.TripleShift(19)) & 8388607L; + values[valuesOffset++] = ((block8 & 1L) << 22) | (block9 >>> 42); + values[valuesOffset++] = (block9 >>> 19) & 8388607L; long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 524287L) << 4) | (block10.TripleShift(60)); - values[valuesOffset++] = (block10.TripleShift(37)) & 8388607L; - values[valuesOffset++] = (block10.TripleShift(14)) & 8388607L; + values[valuesOffset++] = ((block9 & 524287L) << 4) | (block10 >>> 60); + values[valuesOffset++] = (block10 >>> 37) & 8388607L; + values[valuesOffset++] = (block10 >>> 14) & 8388607L; long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 16383L) << 9) | (block11.TripleShift(55)); - values[valuesOffset++] = (block11.TripleShift(32)) & 8388607L; - values[valuesOffset++] = (block11.TripleShift(9)) & 8388607L; + values[valuesOffset++] = ((block10 & 16383L) << 9) | (block11 >>> 55); + values[valuesOffset++] = (block11 >>> 32) & 8388607L; + values[valuesOffset++] = (block11 >>> 9) & 8388607L; long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 511L) << 14) | (block12.TripleShift(50)); - values[valuesOffset++] = (block12.TripleShift(27)) & 8388607L; - values[valuesOffset++] = (block12.TripleShift(4)) & 8388607L; + values[valuesOffset++] = ((block11 & 511L) << 14) | (block12 >>> 50); + values[valuesOffset++] = (block12 >>> 27) & 8388607L; + values[valuesOffset++] = (block12 >>> 4) & 8388607L; long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 15L) << 19) | (block13.TripleShift(45)); - values[valuesOffset++] = (block13.TripleShift(22)) & 8388607L; + values[valuesOffset++] = ((block12 & 15L) << 19) | (block13 >>> 45); + values[valuesOffset++] = (block13 >>> 22) & 8388607L; long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4194303L) << 1) | (block14.TripleShift(63)); - values[valuesOffset++] = (block14.TripleShift(40)) & 8388607L; - values[valuesOffset++] = (block14.TripleShift(17)) & 8388607L; + values[valuesOffset++] = ((block13 & 4194303L) << 1) | (block14 >>> 63); + values[valuesOffset++] = (block14 >>> 40) & 8388607L; + values[valuesOffset++] = (block14 >>> 17) & 8388607L; long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 131071L) << 6) | (block15.TripleShift(58)); - values[valuesOffset++] = (block15.TripleShift(35)) & 8388607L; - values[valuesOffset++] = (block15.TripleShift(12)) & 8388607L; + values[valuesOffset++] = ((block14 & 131071L) << 6) | (block15 >>> 58); + values[valuesOffset++] = (block15 >>> 35) & 8388607L; + values[valuesOffset++] = (block15 >>> 12) & 8388607L; long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 4095L) << 11) | (block16.TripleShift(53)); - values[valuesOffset++] = (block16.TripleShift(30)) & 8388607L; - values[valuesOffset++] = (block16.TripleShift(7)) & 8388607L; + values[valuesOffset++] = ((block15 & 4095L) << 11) | (block16 >>> 53); + values[valuesOffset++] = (block16 >>> 30) & 8388607L; + values[valuesOffset++] = (block16 >>> 7) & 8388607L; long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 127L) << 16) | (block17.TripleShift(48)); - values[valuesOffset++] = (block17.TripleShift(25)) & 8388607L; - values[valuesOffset++] = (block17.TripleShift(2)) & 8388607L; + values[valuesOffset++] = ((block16 & 127L) << 16) | (block17 >>> 48); + values[valuesOffset++] = (block17 >>> 25) & 8388607L; + values[valuesOffset++] = (block17 >>> 2) & 8388607L; long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 3L) << 21) | (block18.TripleShift(43)); - values[valuesOffset++] = (block18.TripleShift(20)) & 8388607L; + values[valuesOffset++] = ((block17 & 3L) << 21) | (block18 >>> 43); + values[valuesOffset++] = (block18 >>> 20) & 8388607L; long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1048575L) << 3) | (block19.TripleShift(61)); - values[valuesOffset++] = (block19.TripleShift(38)) & 8388607L; - values[valuesOffset++] = (block19.TripleShift(15)) & 8388607L; + values[valuesOffset++] = ((block18 & 1048575L) << 3) | (block19 >>> 61); + values[valuesOffset++] = (block19 >>> 38) & 8388607L; + values[valuesOffset++] = (block19 >>> 15) & 8388607L; long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 32767L) << 8) | (block20.TripleShift(56)); - values[valuesOffset++] = (block20.TripleShift(33)) & 8388607L; - values[valuesOffset++] = (block20.TripleShift(10)) & 8388607L; + values[valuesOffset++] = ((block19 & 32767L) << 8) | (block20 >>> 56); + values[valuesOffset++] = (block20 >>> 33) & 8388607L; + values[valuesOffset++] = (block20 >>> 10) & 8388607L; long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 1023L) << 13) | (block21.TripleShift(51)); - values[valuesOffset++] = (block21.TripleShift(28)) & 8388607L; - values[valuesOffset++] = (block21.TripleShift(5)) & 8388607L; + values[valuesOffset++] = ((block20 & 1023L) << 13) | (block21 >>> 51); + values[valuesOffset++] = (block21 >>> 28) & 8388607L; + values[valuesOffset++] = (block21 >>> 5) & 8388607L; long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 31L) << 18) | (block22.TripleShift(46)); - values[valuesOffset++] = (block22.TripleShift(23)) & 8388607L; + values[valuesOffset++] = ((block21 & 31L) << 18) | (block22 >>> 46); + values[valuesOffset++] = (block22 >>> 23) & 8388607L; values[valuesOffset++] = block22 & 8388607L; } } @@ -264,35 +262,35 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2.TripleShift(1)); + values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1); long byte3 = blocks[blocksOffset++] & 0xFF; long byte4 = blocks[blocksOffset++] & 0xFF; long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5.TripleShift(2)); + values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2); long byte6 = blocks[blocksOffset++] & 0xFF; long byte7 = blocks[blocksOffset++] & 0xFF; long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8.TripleShift(3)); + values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3); long byte9 = blocks[blocksOffset++] & 0xFF; long byte10 = blocks[blocksOffset++] & 0xFF; long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11.TripleShift(4)); + values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4); long byte12 = blocks[blocksOffset++] & 0xFF; long byte13 = blocks[blocksOffset++] & 0xFF; long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14.TripleShift(5)); + values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5); long byte15 = blocks[blocksOffset++] & 0xFF; long byte16 = blocks[blocksOffset++] & 0xFF; long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17.TripleShift(6)); + values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6); long byte18 = blocks[blocksOffset++] & 0xFF; long byte19 = blocks[blocksOffset++] & 0xFF; long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20.TripleShift(7)); + values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7); long byte21 = blocks[blocksOffset++] & 0xFF; long byte22 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked24.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked24.cs index a6be9108ae..ce1a6833de 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked24.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked24.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,15 +34,15 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(40)); - values[valuesOffset++] = (int)((block0.TripleShift(16)) & 16777215L); + values[valuesOffset++] = (int)(block0 >>> 40); + values[valuesOffset++] = (int)((block0 >>> 16) & 16777215L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 65535L) << 8) | (block1.TripleShift(56))); - values[valuesOffset++] = (int)((block1.TripleShift(32)) & 16777215L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 16777215L); + values[valuesOffset++] = (int)(((block0 & 65535L) << 8) | (block1 >>> 56)); + values[valuesOffset++] = (int)((block1 >>> 32) & 16777215L); + values[valuesOffset++] = (int)((block1 >>> 8) & 16777215L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 255L) << 16) | (block2.TripleShift(48))); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 16777215L); + values[valuesOffset++] = (int)(((block1 & 255L) << 16) | (block2 >>> 48)); + values[valuesOffset++] = (int)((block2 >>> 24) & 16777215L); values[valuesOffset++] = (int)(block2 & 16777215L); } } @@ -65,15 +63,15 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(40); - values[valuesOffset++] = (block0.TripleShift(16)) & 16777215L; + values[valuesOffset++] = block0 >>> 40; + values[valuesOffset++] = (block0 >>> 16) & 16777215L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 65535L) << 8) | (block1.TripleShift(56)); - values[valuesOffset++] = (block1.TripleShift(32)) & 16777215L; - values[valuesOffset++] = (block1.TripleShift(8)) & 16777215L; + values[valuesOffset++] = ((block0 & 65535L) << 8) | (block1 >>> 56); + values[valuesOffset++] = (block1 >>> 32) & 16777215L; + values[valuesOffset++] = (block1 >>> 8) & 16777215L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 16) | (block2.TripleShift(48)); - values[valuesOffset++] = (block2.TripleShift(24)) & 16777215L; + values[valuesOffset++] = ((block1 & 255L) << 16) | (block2 >>> 48); + values[valuesOffset++] = (block2 >>> 24) & 16777215L; values[valuesOffset++] = block2 & 16777215L; } } @@ -89,4 +87,4 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked3.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked3.cs index da6c1d7dd4..c6bd250457 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked3.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked3.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,71 +34,71 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(61)); - values[valuesOffset++] = (int)((block0.TripleShift(58)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(55)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(52)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(49)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(46)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(43)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(40)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(37)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(34)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(31)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(28)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(25)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(22)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(19)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(16)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(13)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(10)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(7)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 7L); - values[valuesOffset++] = (int)((block0.TripleShift(1)) & 7L); + values[valuesOffset++] = (int)(block0 >>> 61); + values[valuesOffset++] = (int)((block0 >>> 58) & 7L); + values[valuesOffset++] = (int)((block0 >>> 55) & 7L); + values[valuesOffset++] = (int)((block0 >>> 52) & 7L); + values[valuesOffset++] = (int)((block0 >>> 49) & 7L); + values[valuesOffset++] = (int)((block0 >>> 46) & 7L); + values[valuesOffset++] = (int)((block0 >>> 43) & 7L); + values[valuesOffset++] = (int)((block0 >>> 40) & 7L); + values[valuesOffset++] = (int)((block0 >>> 37) & 7L); + values[valuesOffset++] = (int)((block0 >>> 34) & 7L); + values[valuesOffset++] = (int)((block0 >>> 31) & 7L); + values[valuesOffset++] = (int)((block0 >>> 28) & 7L); + values[valuesOffset++] = (int)((block0 >>> 25) & 7L); + values[valuesOffset++] = (int)((block0 >>> 22) & 7L); + values[valuesOffset++] = (int)((block0 >>> 19) & 7L); + values[valuesOffset++] = (int)((block0 >>> 16) & 7L); + values[valuesOffset++] = (int)((block0 >>> 13) & 7L); + values[valuesOffset++] = (int)((block0 >>> 10) & 7L); + values[valuesOffset++] = (int)((block0 >>> 7) & 7L); + values[valuesOffset++] = (int)((block0 >>> 4) & 7L); + values[valuesOffset++] = (int)((block0 >>> 1) & 7L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1L) << 2) | (block1.TripleShift(62))); - values[valuesOffset++] = (int)((block1.TripleShift(59)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(56)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(53)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(50)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(47)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(44)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(41)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(35)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(32)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(29)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(26)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(23)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(20)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(17)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(14)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(11)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(5)) & 7L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 7L); + values[valuesOffset++] = (int)(((block0 & 1L) << 2) | (block1 >>> 62)); + values[valuesOffset++] = (int)((block1 >>> 59) & 7L); + values[valuesOffset++] = (int)((block1 >>> 56) & 7L); + values[valuesOffset++] = (int)((block1 >>> 53) & 7L); + values[valuesOffset++] = (int)((block1 >>> 50) & 7L); + values[valuesOffset++] = (int)((block1 >>> 47) & 7L); + values[valuesOffset++] = (int)((block1 >>> 44) & 7L); + values[valuesOffset++] = (int)((block1 >>> 41) & 7L); + values[valuesOffset++] = (int)((block1 >>> 38) & 7L); + values[valuesOffset++] = (int)((block1 >>> 35) & 7L); + values[valuesOffset++] = (int)((block1 >>> 32) & 7L); + values[valuesOffset++] = (int)((block1 >>> 29) & 7L); + values[valuesOffset++] = (int)((block1 >>> 26) & 7L); + values[valuesOffset++] = (int)((block1 >>> 23) & 7L); + values[valuesOffset++] = (int)((block1 >>> 20) & 7L); + values[valuesOffset++] = (int)((block1 >>> 17) & 7L); + values[valuesOffset++] = (int)((block1 >>> 14) & 7L); + values[valuesOffset++] = (int)((block1 >>> 11) & 7L); + values[valuesOffset++] = (int)((block1 >>> 8) & 7L); + values[valuesOffset++] = (int)((block1 >>> 5) & 7L); + values[valuesOffset++] = (int)((block1 >>> 2) & 7L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 1) | (block2.TripleShift(63))); - values[valuesOffset++] = (int)((block2.TripleShift(60)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(57)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(54)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(51)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(48)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(45)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(42)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(39)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(36)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(33)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(30)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(27)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(21)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(18)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(15)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(9)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(6)) & 7L); - values[valuesOffset++] = (int)((block2.TripleShift(3)) & 7L); + values[valuesOffset++] = (int)(((block1 & 3L) << 1) | (block2 >>> 63)); + values[valuesOffset++] = (int)((block2 >>> 60) & 7L); + values[valuesOffset++] = (int)((block2 >>> 57) & 7L); + values[valuesOffset++] = (int)((block2 >>> 54) & 7L); + values[valuesOffset++] = (int)((block2 >>> 51) & 7L); + values[valuesOffset++] = (int)((block2 >>> 48) & 7L); + values[valuesOffset++] = (int)((block2 >>> 45) & 7L); + values[valuesOffset++] = (int)((block2 >>> 42) & 7L); + values[valuesOffset++] = (int)((block2 >>> 39) & 7L); + values[valuesOffset++] = (int)((block2 >>> 36) & 7L); + values[valuesOffset++] = (int)((block2 >>> 33) & 7L); + values[valuesOffset++] = (int)((block2 >>> 30) & 7L); + values[valuesOffset++] = (int)((block2 >>> 27) & 7L); + values[valuesOffset++] = (int)((block2 >>> 24) & 7L); + values[valuesOffset++] = (int)((block2 >>> 21) & 7L); + values[valuesOffset++] = (int)((block2 >>> 18) & 7L); + values[valuesOffset++] = (int)((block2 >>> 15) & 7L); + values[valuesOffset++] = (int)((block2 >>> 12) & 7L); + values[valuesOffset++] = (int)((block2 >>> 9) & 7L); + values[valuesOffset++] = (int)((block2 >>> 6) & 7L); + values[valuesOffset++] = (int)((block2 >>> 3) & 7L); values[valuesOffset++] = (int)(block2 & 7L); } } @@ -110,15 +108,15 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { int byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(5); - values[valuesOffset++] = (byte0.TripleShift(2)) & 7; + values[valuesOffset++] = byte0 >>> 5; + values[valuesOffset++] = (byte0 >>> 2) & 7; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1.TripleShift(7)); - values[valuesOffset++] = (byte1.TripleShift(4)) & 7; - values[valuesOffset++] = (byte1.TripleShift(1)) & 7; + values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7); + values[valuesOffset++] = (byte1 >>> 4) & 7; + values[valuesOffset++] = (byte1 >>> 1) & 7; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2.TripleShift(6)); - values[valuesOffset++] = (byte2.TripleShift(3)) & 7; + values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6); + values[valuesOffset++] = (byte2 >>> 3) & 7; values[valuesOffset++] = byte2 & 7; } } @@ -128,71 +126,71 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(61); - values[valuesOffset++] = (block0.TripleShift(58)) & 7L; - values[valuesOffset++] = (block0.TripleShift(55)) & 7L; - values[valuesOffset++] = (block0.TripleShift(52)) & 7L; - values[valuesOffset++] = (block0.TripleShift(49)) & 7L; - values[valuesOffset++] = (block0.TripleShift(46)) & 7L; - values[valuesOffset++] = (block0.TripleShift(43)) & 7L; - values[valuesOffset++] = (block0.TripleShift(40)) & 7L; - values[valuesOffset++] = (block0.TripleShift(37)) & 7L; - values[valuesOffset++] = (block0.TripleShift(34)) & 7L; - values[valuesOffset++] = (block0.TripleShift(31)) & 7L; - values[valuesOffset++] = (block0.TripleShift(28)) & 7L; - values[valuesOffset++] = (block0.TripleShift(25)) & 7L; - values[valuesOffset++] = (block0.TripleShift(22)) & 7L; - values[valuesOffset++] = (block0.TripleShift(19)) & 7L; - values[valuesOffset++] = (block0.TripleShift(16)) & 7L; - values[valuesOffset++] = (block0.TripleShift(13)) & 7L; - values[valuesOffset++] = (block0.TripleShift(10)) & 7L; - values[valuesOffset++] = (block0.TripleShift(7)) & 7L; - values[valuesOffset++] = (block0.TripleShift(4)) & 7L; - values[valuesOffset++] = (block0.TripleShift(1)) & 7L; + values[valuesOffset++] = block0 >>> 61; + values[valuesOffset++] = (block0 >>> 58) & 7L; + values[valuesOffset++] = (block0 >>> 55) & 7L; + values[valuesOffset++] = (block0 >>> 52) & 7L; + values[valuesOffset++] = (block0 >>> 49) & 7L; + values[valuesOffset++] = (block0 >>> 46) & 7L; + values[valuesOffset++] = (block0 >>> 43) & 7L; + values[valuesOffset++] = (block0 >>> 40) & 7L; + values[valuesOffset++] = (block0 >>> 37) & 7L; + values[valuesOffset++] = (block0 >>> 34) & 7L; + values[valuesOffset++] = (block0 >>> 31) & 7L; + values[valuesOffset++] = (block0 >>> 28) & 7L; + values[valuesOffset++] = (block0 >>> 25) & 7L; + values[valuesOffset++] = (block0 >>> 22) & 7L; + values[valuesOffset++] = (block0 >>> 19) & 7L; + values[valuesOffset++] = (block0 >>> 16) & 7L; + values[valuesOffset++] = (block0 >>> 13) & 7L; + values[valuesOffset++] = (block0 >>> 10) & 7L; + values[valuesOffset++] = (block0 >>> 7) & 7L; + values[valuesOffset++] = (block0 >>> 4) & 7L; + values[valuesOffset++] = (block0 >>> 1) & 7L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1L) << 2) | (block1.TripleShift(62)); - values[valuesOffset++] = (block1.TripleShift(59)) & 7L; - values[valuesOffset++] = (block1.TripleShift(56)) & 7L; - values[valuesOffset++] = (block1.TripleShift(53)) & 7L; - values[valuesOffset++] = (block1.TripleShift(50)) & 7L; - values[valuesOffset++] = (block1.TripleShift(47)) & 7L; - values[valuesOffset++] = (block1.TripleShift(44)) & 7L; - values[valuesOffset++] = (block1.TripleShift(41)) & 7L; - values[valuesOffset++] = (block1.TripleShift(38)) & 7L; - values[valuesOffset++] = (block1.TripleShift(35)) & 7L; - values[valuesOffset++] = (block1.TripleShift(32)) & 7L; - values[valuesOffset++] = (block1.TripleShift(29)) & 7L; - values[valuesOffset++] = (block1.TripleShift(26)) & 7L; - values[valuesOffset++] = (block1.TripleShift(23)) & 7L; - values[valuesOffset++] = (block1.TripleShift(20)) & 7L; - values[valuesOffset++] = (block1.TripleShift(17)) & 7L; - values[valuesOffset++] = (block1.TripleShift(14)) & 7L; - values[valuesOffset++] = (block1.TripleShift(11)) & 7L; - values[valuesOffset++] = (block1.TripleShift(8)) & 7L; - values[valuesOffset++] = (block1.TripleShift(5)) & 7L; - values[valuesOffset++] = (block1.TripleShift(2)) & 7L; + values[valuesOffset++] = ((block0 & 1L) << 2) | (block1 >>> 62); + values[valuesOffset++] = (block1 >>> 59) & 7L; + values[valuesOffset++] = (block1 >>> 56) & 7L; + values[valuesOffset++] = (block1 >>> 53) & 7L; + values[valuesOffset++] = (block1 >>> 50) & 7L; + values[valuesOffset++] = (block1 >>> 47) & 7L; + values[valuesOffset++] = (block1 >>> 44) & 7L; + values[valuesOffset++] = (block1 >>> 41) & 7L; + values[valuesOffset++] = (block1 >>> 38) & 7L; + values[valuesOffset++] = (block1 >>> 35) & 7L; + values[valuesOffset++] = (block1 >>> 32) & 7L; + values[valuesOffset++] = (block1 >>> 29) & 7L; + values[valuesOffset++] = (block1 >>> 26) & 7L; + values[valuesOffset++] = (block1 >>> 23) & 7L; + values[valuesOffset++] = (block1 >>> 20) & 7L; + values[valuesOffset++] = (block1 >>> 17) & 7L; + values[valuesOffset++] = (block1 >>> 14) & 7L; + values[valuesOffset++] = (block1 >>> 11) & 7L; + values[valuesOffset++] = (block1 >>> 8) & 7L; + values[valuesOffset++] = (block1 >>> 5) & 7L; + values[valuesOffset++] = (block1 >>> 2) & 7L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 1) | (block2.TripleShift(63)); - values[valuesOffset++] = (block2.TripleShift(60)) & 7L; - values[valuesOffset++] = (block2.TripleShift(57)) & 7L; - values[valuesOffset++] = (block2.TripleShift(54)) & 7L; - values[valuesOffset++] = (block2.TripleShift(51)) & 7L; - values[valuesOffset++] = (block2.TripleShift(48)) & 7L; - values[valuesOffset++] = (block2.TripleShift(45)) & 7L; - values[valuesOffset++] = (block2.TripleShift(42)) & 7L; - values[valuesOffset++] = (block2.TripleShift(39)) & 7L; - values[valuesOffset++] = (block2.TripleShift(36)) & 7L; - values[valuesOffset++] = (block2.TripleShift(33)) & 7L; - values[valuesOffset++] = (block2.TripleShift(30)) & 7L; - values[valuesOffset++] = (block2.TripleShift(27)) & 7L; - values[valuesOffset++] = (block2.TripleShift(24)) & 7L; - values[valuesOffset++] = (block2.TripleShift(21)) & 7L; - values[valuesOffset++] = (block2.TripleShift(18)) & 7L; - values[valuesOffset++] = (block2.TripleShift(15)) & 7L; - values[valuesOffset++] = (block2.TripleShift(12)) & 7L; - values[valuesOffset++] = (block2.TripleShift(9)) & 7L; - values[valuesOffset++] = (block2.TripleShift(6)) & 7L; - values[valuesOffset++] = (block2.TripleShift(3)) & 7L; + values[valuesOffset++] = ((block1 & 3L) << 1) | (block2 >>> 63); + values[valuesOffset++] = (block2 >>> 60) & 7L; + values[valuesOffset++] = (block2 >>> 57) & 7L; + values[valuesOffset++] = (block2 >>> 54) & 7L; + values[valuesOffset++] = (block2 >>> 51) & 7L; + values[valuesOffset++] = (block2 >>> 48) & 7L; + values[valuesOffset++] = (block2 >>> 45) & 7L; + values[valuesOffset++] = (block2 >>> 42) & 7L; + values[valuesOffset++] = (block2 >>> 39) & 7L; + values[valuesOffset++] = (block2 >>> 36) & 7L; + values[valuesOffset++] = (block2 >>> 33) & 7L; + values[valuesOffset++] = (block2 >>> 30) & 7L; + values[valuesOffset++] = (block2 >>> 27) & 7L; + values[valuesOffset++] = (block2 >>> 24) & 7L; + values[valuesOffset++] = (block2 >>> 21) & 7L; + values[valuesOffset++] = (block2 >>> 18) & 7L; + values[valuesOffset++] = (block2 >>> 15) & 7L; + values[valuesOffset++] = (block2 >>> 12) & 7L; + values[valuesOffset++] = (block2 >>> 9) & 7L; + values[valuesOffset++] = (block2 >>> 6) & 7L; + values[valuesOffset++] = (block2 >>> 3) & 7L; values[valuesOffset++] = block2 & 7L; } } @@ -202,17 +200,17 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(5); - values[valuesOffset++] = (byte0.TripleShift(2)) & 7; + values[valuesOffset++] = byte0 >>> 5; + values[valuesOffset++] = (byte0 >>> 2) & 7; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1.TripleShift(7)); - values[valuesOffset++] = (byte1.TripleShift(4)) & 7; - values[valuesOffset++] = (byte1.TripleShift(1)) & 7; + values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7); + values[valuesOffset++] = (byte1 >>> 4) & 7; + values[valuesOffset++] = (byte1 >>> 1) & 7; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2.TripleShift(6)); - values[valuesOffset++] = (byte2.TripleShift(3)) & 7; + values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6); + values[valuesOffset++] = (byte2 >>> 3) & 7; values[valuesOffset++] = byte2 & 7; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked4.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked4.cs index 28f1c346ad..8784bbe51f 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked4.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked4.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -38,7 +36,7 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v long block = blocks[blocksOffset++]; for (int shift = 60; shift >= 0; shift -= 4) { - values[valuesOffset++] = (int)((block.TripleShift(shift)) & 15); + values[valuesOffset++] = (int)((block >>> shift) & 15); } } } @@ -48,7 +46,7 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = (block.TripleShift(4)) & 15; + values[valuesOffset++] = (block >>> 4) & 15; values[valuesOffset++] = block & 15; } } @@ -60,7 +58,7 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int long block = blocks[blocksOffset++]; for (int shift = 60; shift >= 0; shift -= 4) { - values[valuesOffset++] = (block.TripleShift(shift)) & 15; + values[valuesOffset++] = (block >>> shift) & 15; } } } @@ -70,9 +68,9 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int j = 0; j < iterations; ++j) { var block = blocks[blocksOffset++]; - values[valuesOffset++] = (block.TripleShift(4)) & 15; + values[valuesOffset++] = (block >>> 4) & 15; values[valuesOffset++] = block & 15; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked5.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked5.cs index 5478acabcf..1abf6f71a6 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked5.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked5.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,73 +34,73 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(59)); - values[valuesOffset++] = (int)((block0.TripleShift(54)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(49)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(44)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(39)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(34)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(29)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(24)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(19)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(14)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(9)) & 31L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 31L); + values[valuesOffset++] = (int)(block0 >>> 59); + values[valuesOffset++] = (int)((block0 >>> 54) & 31L); + values[valuesOffset++] = (int)((block0 >>> 49) & 31L); + values[valuesOffset++] = (int)((block0 >>> 44) & 31L); + values[valuesOffset++] = (int)((block0 >>> 39) & 31L); + values[valuesOffset++] = (int)((block0 >>> 34) & 31L); + values[valuesOffset++] = (int)((block0 >>> 29) & 31L); + values[valuesOffset++] = (int)((block0 >>> 24) & 31L); + values[valuesOffset++] = (int)((block0 >>> 19) & 31L); + values[valuesOffset++] = (int)((block0 >>> 14) & 31L); + values[valuesOffset++] = (int)((block0 >>> 9) & 31L); + values[valuesOffset++] = (int)((block0 >>> 4) & 31L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 1) | (block1.TripleShift(63))); - values[valuesOffset++] = (int)((block1.TripleShift(58)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(53)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(48)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(43)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(33)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(28)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(23)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(18)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(13)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 31L); - values[valuesOffset++] = (int)((block1.TripleShift(3)) & 31L); + values[valuesOffset++] = (int)(((block0 & 15L) << 1) | (block1 >>> 63)); + values[valuesOffset++] = (int)((block1 >>> 58) & 31L); + values[valuesOffset++] = (int)((block1 >>> 53) & 31L); + values[valuesOffset++] = (int)((block1 >>> 48) & 31L); + values[valuesOffset++] = (int)((block1 >>> 43) & 31L); + values[valuesOffset++] = (int)((block1 >>> 38) & 31L); + values[valuesOffset++] = (int)((block1 >>> 33) & 31L); + values[valuesOffset++] = (int)((block1 >>> 28) & 31L); + values[valuesOffset++] = (int)((block1 >>> 23) & 31L); + values[valuesOffset++] = (int)((block1 >>> 18) & 31L); + values[valuesOffset++] = (int)((block1 >>> 13) & 31L); + values[valuesOffset++] = (int)((block1 >>> 8) & 31L); + values[valuesOffset++] = (int)((block1 >>> 3) & 31L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 7L) << 2) | (block2.TripleShift(62))); - values[valuesOffset++] = (int)((block2.TripleShift(57)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(52)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(47)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(42)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(37)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(32)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(27)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(22)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(17)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(7)) & 31L); - values[valuesOffset++] = (int)((block2.TripleShift(2)) & 31L); + values[valuesOffset++] = (int)(((block1 & 7L) << 2) | (block2 >>> 62)); + values[valuesOffset++] = (int)((block2 >>> 57) & 31L); + values[valuesOffset++] = (int)((block2 >>> 52) & 31L); + values[valuesOffset++] = (int)((block2 >>> 47) & 31L); + values[valuesOffset++] = (int)((block2 >>> 42) & 31L); + values[valuesOffset++] = (int)((block2 >>> 37) & 31L); + values[valuesOffset++] = (int)((block2 >>> 32) & 31L); + values[valuesOffset++] = (int)((block2 >>> 27) & 31L); + values[valuesOffset++] = (int)((block2 >>> 22) & 31L); + values[valuesOffset++] = (int)((block2 >>> 17) & 31L); + values[valuesOffset++] = (int)((block2 >>> 12) & 31L); + values[valuesOffset++] = (int)((block2 >>> 7) & 31L); + values[valuesOffset++] = (int)((block2 >>> 2) & 31L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 3L) << 3) | (block3.TripleShift(61))); - values[valuesOffset++] = (int)((block3.TripleShift(56)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(51)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(46)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(41)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(36)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(31)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(26)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(21)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(16)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(11)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(6)) & 31L); - values[valuesOffset++] = (int)((block3.TripleShift(1)) & 31L); + values[valuesOffset++] = (int)(((block2 & 3L) << 3) | (block3 >>> 61)); + values[valuesOffset++] = (int)((block3 >>> 56) & 31L); + values[valuesOffset++] = (int)((block3 >>> 51) & 31L); + values[valuesOffset++] = (int)((block3 >>> 46) & 31L); + values[valuesOffset++] = (int)((block3 >>> 41) & 31L); + values[valuesOffset++] = (int)((block3 >>> 36) & 31L); + values[valuesOffset++] = (int)((block3 >>> 31) & 31L); + values[valuesOffset++] = (int)((block3 >>> 26) & 31L); + values[valuesOffset++] = (int)((block3 >>> 21) & 31L); + values[valuesOffset++] = (int)((block3 >>> 16) & 31L); + values[valuesOffset++] = (int)((block3 >>> 11) & 31L); + values[valuesOffset++] = (int)((block3 >>> 6) & 31L); + values[valuesOffset++] = (int)((block3 >>> 1) & 31L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 1L) << 4) | (block4.TripleShift(60))); - values[valuesOffset++] = (int)((block4.TripleShift(55)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(50)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(45)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(40)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(35)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(30)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(25)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(20)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(15)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(10)) & 31L); - values[valuesOffset++] = (int)((block4.TripleShift(5)) & 31L); + values[valuesOffset++] = (int)(((block3 & 1L) << 4) | (block4 >>> 60)); + values[valuesOffset++] = (int)((block4 >>> 55) & 31L); + values[valuesOffset++] = (int)((block4 >>> 50) & 31L); + values[valuesOffset++] = (int)((block4 >>> 45) & 31L); + values[valuesOffset++] = (int)((block4 >>> 40) & 31L); + values[valuesOffset++] = (int)((block4 >>> 35) & 31L); + values[valuesOffset++] = (int)((block4 >>> 30) & 31L); + values[valuesOffset++] = (int)((block4 >>> 25) & 31L); + values[valuesOffset++] = (int)((block4 >>> 20) & 31L); + values[valuesOffset++] = (int)((block4 >>> 15) & 31L); + values[valuesOffset++] = (int)((block4 >>> 10) & 31L); + values[valuesOffset++] = (int)((block4 >>> 5) & 31L); values[valuesOffset++] = (int)(block4 & 31L); } } @@ -112,17 +110,17 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { int byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(3); + values[valuesOffset++] = byte0 >>> 3; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1.TripleShift(6)); - values[valuesOffset++] = (byte1.TripleShift(1)) & 31; + values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6); + values[valuesOffset++] = (byte1 >>> 1) & 31; int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4); int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3.TripleShift(7)); - values[valuesOffset++] = (byte3.TripleShift(2)) & 31; + values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7); + values[valuesOffset++] = (byte3 >>> 2) & 31; int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4.TripleShift(5)); + values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5); values[valuesOffset++] = byte4 & 31; } } @@ -132,73 +130,73 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(59); - values[valuesOffset++] = (block0.TripleShift(54)) & 31L; - values[valuesOffset++] = (block0.TripleShift(49)) & 31L; - values[valuesOffset++] = (block0.TripleShift(44)) & 31L; - values[valuesOffset++] = (block0.TripleShift(39)) & 31L; - values[valuesOffset++] = (block0.TripleShift(34)) & 31L; - values[valuesOffset++] = (block0.TripleShift(29)) & 31L; - values[valuesOffset++] = (block0.TripleShift(24)) & 31L; - values[valuesOffset++] = (block0.TripleShift(19)) & 31L; - values[valuesOffset++] = (block0.TripleShift(14)) & 31L; - values[valuesOffset++] = (block0.TripleShift(9)) & 31L; - values[valuesOffset++] = (block0.TripleShift(4)) & 31L; + values[valuesOffset++] = block0 >>> 59; + values[valuesOffset++] = (block0 >>> 54) & 31L; + values[valuesOffset++] = (block0 >>> 49) & 31L; + values[valuesOffset++] = (block0 >>> 44) & 31L; + values[valuesOffset++] = (block0 >>> 39) & 31L; + values[valuesOffset++] = (block0 >>> 34) & 31L; + values[valuesOffset++] = (block0 >>> 29) & 31L; + values[valuesOffset++] = (block0 >>> 24) & 31L; + values[valuesOffset++] = (block0 >>> 19) & 31L; + values[valuesOffset++] = (block0 >>> 14) & 31L; + values[valuesOffset++] = (block0 >>> 9) & 31L; + values[valuesOffset++] = (block0 >>> 4) & 31L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 1) | (block1.TripleShift(63)); - values[valuesOffset++] = (block1.TripleShift(58)) & 31L; - values[valuesOffset++] = (block1.TripleShift(53)) & 31L; - values[valuesOffset++] = (block1.TripleShift(48)) & 31L; - values[valuesOffset++] = (block1.TripleShift(43)) & 31L; - values[valuesOffset++] = (block1.TripleShift(38)) & 31L; - values[valuesOffset++] = (block1.TripleShift(33)) & 31L; - values[valuesOffset++] = (block1.TripleShift(28)) & 31L; - values[valuesOffset++] = (block1.TripleShift(23)) & 31L; - values[valuesOffset++] = (block1.TripleShift(18)) & 31L; - values[valuesOffset++] = (block1.TripleShift(13)) & 31L; - values[valuesOffset++] = (block1.TripleShift(8)) & 31L; - values[valuesOffset++] = (block1.TripleShift(3)) & 31L; + values[valuesOffset++] = ((block0 & 15L) << 1) | (block1 >>> 63); + values[valuesOffset++] = (block1 >>> 58) & 31L; + values[valuesOffset++] = (block1 >>> 53) & 31L; + values[valuesOffset++] = (block1 >>> 48) & 31L; + values[valuesOffset++] = (block1 >>> 43) & 31L; + values[valuesOffset++] = (block1 >>> 38) & 31L; + values[valuesOffset++] = (block1 >>> 33) & 31L; + values[valuesOffset++] = (block1 >>> 28) & 31L; + values[valuesOffset++] = (block1 >>> 23) & 31L; + values[valuesOffset++] = (block1 >>> 18) & 31L; + values[valuesOffset++] = (block1 >>> 13) & 31L; + values[valuesOffset++] = (block1 >>> 8) & 31L; + values[valuesOffset++] = (block1 >>> 3) & 31L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 7L) << 2) | (block2.TripleShift(62)); - values[valuesOffset++] = (block2.TripleShift(57)) & 31L; - values[valuesOffset++] = (block2.TripleShift(52)) & 31L; - values[valuesOffset++] = (block2.TripleShift(47)) & 31L; - values[valuesOffset++] = (block2.TripleShift(42)) & 31L; - values[valuesOffset++] = (block2.TripleShift(37)) & 31L; - values[valuesOffset++] = (block2.TripleShift(32)) & 31L; - values[valuesOffset++] = (block2.TripleShift(27)) & 31L; - values[valuesOffset++] = (block2.TripleShift(22)) & 31L; - values[valuesOffset++] = (block2.TripleShift(17)) & 31L; - values[valuesOffset++] = (block2.TripleShift(12)) & 31L; - values[valuesOffset++] = (block2.TripleShift(7)) & 31L; - values[valuesOffset++] = (block2.TripleShift(2)) & 31L; + values[valuesOffset++] = ((block1 & 7L) << 2) | (block2 >>> 62); + values[valuesOffset++] = (block2 >>> 57) & 31L; + values[valuesOffset++] = (block2 >>> 52) & 31L; + values[valuesOffset++] = (block2 >>> 47) & 31L; + values[valuesOffset++] = (block2 >>> 42) & 31L; + values[valuesOffset++] = (block2 >>> 37) & 31L; + values[valuesOffset++] = (block2 >>> 32) & 31L; + values[valuesOffset++] = (block2 >>> 27) & 31L; + values[valuesOffset++] = (block2 >>> 22) & 31L; + values[valuesOffset++] = (block2 >>> 17) & 31L; + values[valuesOffset++] = (block2 >>> 12) & 31L; + values[valuesOffset++] = (block2 >>> 7) & 31L; + values[valuesOffset++] = (block2 >>> 2) & 31L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 3L) << 3) | (block3.TripleShift(61)); - values[valuesOffset++] = (block3.TripleShift(56)) & 31L; - values[valuesOffset++] = (block3.TripleShift(51)) & 31L; - values[valuesOffset++] = (block3.TripleShift(46)) & 31L; - values[valuesOffset++] = (block3.TripleShift(41)) & 31L; - values[valuesOffset++] = (block3.TripleShift(36)) & 31L; - values[valuesOffset++] = (block3.TripleShift(31)) & 31L; - values[valuesOffset++] = (block3.TripleShift(26)) & 31L; - values[valuesOffset++] = (block3.TripleShift(21)) & 31L; - values[valuesOffset++] = (block3.TripleShift(16)) & 31L; - values[valuesOffset++] = (block3.TripleShift(11)) & 31L; - values[valuesOffset++] = (block3.TripleShift(6)) & 31L; - values[valuesOffset++] = (block3.TripleShift(1)) & 31L; + values[valuesOffset++] = ((block2 & 3L) << 3) | (block3 >>> 61); + values[valuesOffset++] = (block3 >>> 56) & 31L; + values[valuesOffset++] = (block3 >>> 51) & 31L; + values[valuesOffset++] = (block3 >>> 46) & 31L; + values[valuesOffset++] = (block3 >>> 41) & 31L; + values[valuesOffset++] = (block3 >>> 36) & 31L; + values[valuesOffset++] = (block3 >>> 31) & 31L; + values[valuesOffset++] = (block3 >>> 26) & 31L; + values[valuesOffset++] = (block3 >>> 21) & 31L; + values[valuesOffset++] = (block3 >>> 16) & 31L; + values[valuesOffset++] = (block3 >>> 11) & 31L; + values[valuesOffset++] = (block3 >>> 6) & 31L; + values[valuesOffset++] = (block3 >>> 1) & 31L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1L) << 4) | (block4.TripleShift(60)); - values[valuesOffset++] = (block4.TripleShift(55)) & 31L; - values[valuesOffset++] = (block4.TripleShift(50)) & 31L; - values[valuesOffset++] = (block4.TripleShift(45)) & 31L; - values[valuesOffset++] = (block4.TripleShift(40)) & 31L; - values[valuesOffset++] = (block4.TripleShift(35)) & 31L; - values[valuesOffset++] = (block4.TripleShift(30)) & 31L; - values[valuesOffset++] = (block4.TripleShift(25)) & 31L; - values[valuesOffset++] = (block4.TripleShift(20)) & 31L; - values[valuesOffset++] = (block4.TripleShift(15)) & 31L; - values[valuesOffset++] = (block4.TripleShift(10)) & 31L; - values[valuesOffset++] = (block4.TripleShift(5)) & 31L; + values[valuesOffset++] = ((block3 & 1L) << 4) | (block4 >>> 60); + values[valuesOffset++] = (block4 >>> 55) & 31L; + values[valuesOffset++] = (block4 >>> 50) & 31L; + values[valuesOffset++] = (block4 >>> 45) & 31L; + values[valuesOffset++] = (block4 >>> 40) & 31L; + values[valuesOffset++] = (block4 >>> 35) & 31L; + values[valuesOffset++] = (block4 >>> 30) & 31L; + values[valuesOffset++] = (block4 >>> 25) & 31L; + values[valuesOffset++] = (block4 >>> 20) & 31L; + values[valuesOffset++] = (block4 >>> 15) & 31L; + values[valuesOffset++] = (block4 >>> 10) & 31L; + values[valuesOffset++] = (block4 >>> 5) & 31L; values[valuesOffset++] = block4 & 31L; } } @@ -208,19 +206,19 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(3); + values[valuesOffset++] = byte0 >>> 3; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1.TripleShift(6)); - values[valuesOffset++] = (byte1.TripleShift(1)) & 31; + values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6); + values[valuesOffset++] = (byte1 >>> 1) & 31; long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2.TripleShift(4)); + values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4); long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3.TripleShift(7)); - values[valuesOffset++] = (byte3.TripleShift(2)) & 31; + values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7); + values[valuesOffset++] = (byte3 >>> 2) & 31; long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4.TripleShift(5)); + values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5); values[valuesOffset++] = byte4 & 31; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked6.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked6.cs index b244f89260..dff7f5cb8d 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked6.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked6.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,39 +34,39 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(58)); - values[valuesOffset++] = (int)((block0.TripleShift(52)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(46)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(40)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(34)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(28)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(22)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(16)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(10)) & 63L); - values[valuesOffset++] = (int)((block0.TripleShift(4)) & 63L); + values[valuesOffset++] = (int)(block0 >>> 58); + values[valuesOffset++] = (int)((block0 >>> 52) & 63L); + values[valuesOffset++] = (int)((block0 >>> 46) & 63L); + values[valuesOffset++] = (int)((block0 >>> 40) & 63L); + values[valuesOffset++] = (int)((block0 >>> 34) & 63L); + values[valuesOffset++] = (int)((block0 >>> 28) & 63L); + values[valuesOffset++] = (int)((block0 >>> 22) & 63L); + values[valuesOffset++] = (int)((block0 >>> 16) & 63L); + values[valuesOffset++] = (int)((block0 >>> 10) & 63L); + values[valuesOffset++] = (int)((block0 >>> 4) & 63L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 15L) << 2) | (block1.TripleShift(62))); - values[valuesOffset++] = (int)((block1.TripleShift(56)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(50)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(44)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(32)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(26)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(20)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(14)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(8)) & 63L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 63L); + values[valuesOffset++] = (int)(((block0 & 15L) << 2) | (block1 >>> 62)); + values[valuesOffset++] = (int)((block1 >>> 56) & 63L); + values[valuesOffset++] = (int)((block1 >>> 50) & 63L); + values[valuesOffset++] = (int)((block1 >>> 44) & 63L); + values[valuesOffset++] = (int)((block1 >>> 38) & 63L); + values[valuesOffset++] = (int)((block1 >>> 32) & 63L); + values[valuesOffset++] = (int)((block1 >>> 26) & 63L); + values[valuesOffset++] = (int)((block1 >>> 20) & 63L); + values[valuesOffset++] = (int)((block1 >>> 14) & 63L); + values[valuesOffset++] = (int)((block1 >>> 8) & 63L); + values[valuesOffset++] = (int)((block1 >>> 2) & 63L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 4) | (block2.TripleShift(60))); - values[valuesOffset++] = (int)((block2.TripleShift(54)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(48)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(42)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(36)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(30)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(18)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 63L); - values[valuesOffset++] = (int)((block2.TripleShift(6)) & 63L); + values[valuesOffset++] = (int)(((block1 & 3L) << 4) | (block2 >>> 60)); + values[valuesOffset++] = (int)((block2 >>> 54) & 63L); + values[valuesOffset++] = (int)((block2 >>> 48) & 63L); + values[valuesOffset++] = (int)((block2 >>> 42) & 63L); + values[valuesOffset++] = (int)((block2 >>> 36) & 63L); + values[valuesOffset++] = (int)((block2 >>> 30) & 63L); + values[valuesOffset++] = (int)((block2 >>> 24) & 63L); + values[valuesOffset++] = (int)((block2 >>> 18) & 63L); + values[valuesOffset++] = (int)((block2 >>> 12) & 63L); + values[valuesOffset++] = (int)((block2 >>> 6) & 63L); values[valuesOffset++] = (int)(block2 & 63L); } } @@ -78,11 +76,11 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { int byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(2); + values[valuesOffset++] = byte0 >>> 2; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1.TripleShift(4)); + values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4); int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6); values[valuesOffset++] = byte2 & 63; } } @@ -92,39 +90,39 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(58); - values[valuesOffset++] = (block0.TripleShift(52)) & 63L; - values[valuesOffset++] = (block0.TripleShift(46)) & 63L; - values[valuesOffset++] = (block0.TripleShift(40)) & 63L; - values[valuesOffset++] = (block0.TripleShift(34)) & 63L; - values[valuesOffset++] = (block0.TripleShift(28)) & 63L; - values[valuesOffset++] = (block0.TripleShift(22)) & 63L; - values[valuesOffset++] = (block0.TripleShift(16)) & 63L; - values[valuesOffset++] = (block0.TripleShift(10)) & 63L; - values[valuesOffset++] = (block0.TripleShift(4)) & 63L; + values[valuesOffset++] = block0 >>> 58; + values[valuesOffset++] = (block0 >>> 52) & 63L; + values[valuesOffset++] = (block0 >>> 46) & 63L; + values[valuesOffset++] = (block0 >>> 40) & 63L; + values[valuesOffset++] = (block0 >>> 34) & 63L; + values[valuesOffset++] = (block0 >>> 28) & 63L; + values[valuesOffset++] = (block0 >>> 22) & 63L; + values[valuesOffset++] = (block0 >>> 16) & 63L; + values[valuesOffset++] = (block0 >>> 10) & 63L; + values[valuesOffset++] = (block0 >>> 4) & 63L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 2) | (block1.TripleShift(62)); - values[valuesOffset++] = (block1.TripleShift(56)) & 63L; - values[valuesOffset++] = (block1.TripleShift(50)) & 63L; - values[valuesOffset++] = (block1.TripleShift(44)) & 63L; - values[valuesOffset++] = (block1.TripleShift(38)) & 63L; - values[valuesOffset++] = (block1.TripleShift(32)) & 63L; - values[valuesOffset++] = (block1.TripleShift(26)) & 63L; - values[valuesOffset++] = (block1.TripleShift(20)) & 63L; - values[valuesOffset++] = (block1.TripleShift(14)) & 63L; - values[valuesOffset++] = (block1.TripleShift(8)) & 63L; - values[valuesOffset++] = (block1.TripleShift(2)) & 63L; + values[valuesOffset++] = ((block0 & 15L) << 2) | (block1 >>> 62); + values[valuesOffset++] = (block1 >>> 56) & 63L; + values[valuesOffset++] = (block1 >>> 50) & 63L; + values[valuesOffset++] = (block1 >>> 44) & 63L; + values[valuesOffset++] = (block1 >>> 38) & 63L; + values[valuesOffset++] = (block1 >>> 32) & 63L; + values[valuesOffset++] = (block1 >>> 26) & 63L; + values[valuesOffset++] = (block1 >>> 20) & 63L; + values[valuesOffset++] = (block1 >>> 14) & 63L; + values[valuesOffset++] = (block1 >>> 8) & 63L; + values[valuesOffset++] = (block1 >>> 2) & 63L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 4) | (block2.TripleShift(60)); - values[valuesOffset++] = (block2.TripleShift(54)) & 63L; - values[valuesOffset++] = (block2.TripleShift(48)) & 63L; - values[valuesOffset++] = (block2.TripleShift(42)) & 63L; - values[valuesOffset++] = (block2.TripleShift(36)) & 63L; - values[valuesOffset++] = (block2.TripleShift(30)) & 63L; - values[valuesOffset++] = (block2.TripleShift(24)) & 63L; - values[valuesOffset++] = (block2.TripleShift(18)) & 63L; - values[valuesOffset++] = (block2.TripleShift(12)) & 63L; - values[valuesOffset++] = (block2.TripleShift(6)) & 63L; + values[valuesOffset++] = ((block1 & 3L) << 4) | (block2 >>> 60); + values[valuesOffset++] = (block2 >>> 54) & 63L; + values[valuesOffset++] = (block2 >>> 48) & 63L; + values[valuesOffset++] = (block2 >>> 42) & 63L; + values[valuesOffset++] = (block2 >>> 36) & 63L; + values[valuesOffset++] = (block2 >>> 30) & 63L; + values[valuesOffset++] = (block2 >>> 24) & 63L; + values[valuesOffset++] = (block2 >>> 18) & 63L; + values[valuesOffset++] = (block2 >>> 12) & 63L; + values[valuesOffset++] = (block2 >>> 6) & 63L; values[valuesOffset++] = block2 & 63L; } } @@ -134,13 +132,13 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(2); + values[valuesOffset++] = byte0 >>> 2; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1.TripleShift(4)); + values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4); long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6); values[valuesOffset++] = byte2 & 63; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked7.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked7.cs index 749e4a24f4..764c56bdf1 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked7.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked7.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,75 +34,75 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(57)); - values[valuesOffset++] = (int)((block0.TripleShift(50)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(43)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(36)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(29)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(22)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(15)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(8)) & 127L); - values[valuesOffset++] = (int)((block0.TripleShift(1)) & 127L); + values[valuesOffset++] = (int)(block0 >>> 57); + values[valuesOffset++] = (int)((block0 >>> 50) & 127L); + values[valuesOffset++] = (int)((block0 >>> 43) & 127L); + values[valuesOffset++] = (int)((block0 >>> 36) & 127L); + values[valuesOffset++] = (int)((block0 >>> 29) & 127L); + values[valuesOffset++] = (int)((block0 >>> 22) & 127L); + values[valuesOffset++] = (int)((block0 >>> 15) & 127L); + values[valuesOffset++] = (int)((block0 >>> 8) & 127L); + values[valuesOffset++] = (int)((block0 >>> 1) & 127L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1L) << 6) | (block1.TripleShift(58))); - values[valuesOffset++] = (int)((block1.TripleShift(51)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(44)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(37)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(30)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(23)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(16)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(9)) & 127L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 127L); + values[valuesOffset++] = (int)(((block0 & 1L) << 6) | (block1 >>> 58)); + values[valuesOffset++] = (int)((block1 >>> 51) & 127L); + values[valuesOffset++] = (int)((block1 >>> 44) & 127L); + values[valuesOffset++] = (int)((block1 >>> 37) & 127L); + values[valuesOffset++] = (int)((block1 >>> 30) & 127L); + values[valuesOffset++] = (int)((block1 >>> 23) & 127L); + values[valuesOffset++] = (int)((block1 >>> 16) & 127L); + values[valuesOffset++] = (int)((block1 >>> 9) & 127L); + values[valuesOffset++] = (int)((block1 >>> 2) & 127L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 5) | (block2.TripleShift(59))); - values[valuesOffset++] = (int)((block2.TripleShift(52)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(45)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(38)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(31)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(24)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(17)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(10)) & 127L); - values[valuesOffset++] = (int)((block2.TripleShift(3)) & 127L); + values[valuesOffset++] = (int)(((block1 & 3L) << 5) | (block2 >>> 59)); + values[valuesOffset++] = (int)((block2 >>> 52) & 127L); + values[valuesOffset++] = (int)((block2 >>> 45) & 127L); + values[valuesOffset++] = (int)((block2 >>> 38) & 127L); + values[valuesOffset++] = (int)((block2 >>> 31) & 127L); + values[valuesOffset++] = (int)((block2 >>> 24) & 127L); + values[valuesOffset++] = (int)((block2 >>> 17) & 127L); + values[valuesOffset++] = (int)((block2 >>> 10) & 127L); + values[valuesOffset++] = (int)((block2 >>> 3) & 127L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 7L) << 4) | (block3.TripleShift(60))); - values[valuesOffset++] = (int)((block3.TripleShift(53)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(46)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(39)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(32)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(25)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(18)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(11)) & 127L); - values[valuesOffset++] = (int)((block3.TripleShift(4)) & 127L); + values[valuesOffset++] = (int)(((block2 & 7L) << 4) | (block3 >>> 60)); + values[valuesOffset++] = (int)((block3 >>> 53) & 127L); + values[valuesOffset++] = (int)((block3 >>> 46) & 127L); + values[valuesOffset++] = (int)((block3 >>> 39) & 127L); + values[valuesOffset++] = (int)((block3 >>> 32) & 127L); + values[valuesOffset++] = (int)((block3 >>> 25) & 127L); + values[valuesOffset++] = (int)((block3 >>> 18) & 127L); + values[valuesOffset++] = (int)((block3 >>> 11) & 127L); + values[valuesOffset++] = (int)((block3 >>> 4) & 127L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 15L) << 3) | (block4.TripleShift(61))); - values[valuesOffset++] = (int)((block4.TripleShift(54)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(47)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(40)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(33)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(26)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(19)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(12)) & 127L); - values[valuesOffset++] = (int)((block4.TripleShift(5)) & 127L); + values[valuesOffset++] = (int)(((block3 & 15L) << 3) | (block4 >>> 61)); + values[valuesOffset++] = (int)((block4 >>> 54) & 127L); + values[valuesOffset++] = (int)((block4 >>> 47) & 127L); + values[valuesOffset++] = (int)((block4 >>> 40) & 127L); + values[valuesOffset++] = (int)((block4 >>> 33) & 127L); + values[valuesOffset++] = (int)((block4 >>> 26) & 127L); + values[valuesOffset++] = (int)((block4 >>> 19) & 127L); + values[valuesOffset++] = (int)((block4 >>> 12) & 127L); + values[valuesOffset++] = (int)((block4 >>> 5) & 127L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 31L) << 2) | (block5.TripleShift(62))); - values[valuesOffset++] = (int)((block5.TripleShift(55)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(48)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(41)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(34)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(27)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(20)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(13)) & 127L); - values[valuesOffset++] = (int)((block5.TripleShift(6)) & 127L); + values[valuesOffset++] = (int)(((block4 & 31L) << 2) | (block5 >>> 62)); + values[valuesOffset++] = (int)((block5 >>> 55) & 127L); + values[valuesOffset++] = (int)((block5 >>> 48) & 127L); + values[valuesOffset++] = (int)((block5 >>> 41) & 127L); + values[valuesOffset++] = (int)((block5 >>> 34) & 127L); + values[valuesOffset++] = (int)((block5 >>> 27) & 127L); + values[valuesOffset++] = (int)((block5 >>> 20) & 127L); + values[valuesOffset++] = (int)((block5 >>> 13) & 127L); + values[valuesOffset++] = (int)((block5 >>> 6) & 127L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 63L) << 1) | (block6.TripleShift(63))); - values[valuesOffset++] = (int)((block6.TripleShift(56)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(49)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(42)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(35)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(28)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(21)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(14)) & 127L); - values[valuesOffset++] = (int)((block6.TripleShift(7)) & 127L); + values[valuesOffset++] = (int)(((block5 & 63L) << 1) | (block6 >>> 63)); + values[valuesOffset++] = (int)((block6 >>> 56) & 127L); + values[valuesOffset++] = (int)((block6 >>> 49) & 127L); + values[valuesOffset++] = (int)((block6 >>> 42) & 127L); + values[valuesOffset++] = (int)((block6 >>> 35) & 127L); + values[valuesOffset++] = (int)((block6 >>> 28) & 127L); + values[valuesOffset++] = (int)((block6 >>> 21) & 127L); + values[valuesOffset++] = (int)((block6 >>> 14) & 127L); + values[valuesOffset++] = (int)((block6 >>> 7) & 127L); values[valuesOffset++] = (int)(block6 & 127L); } } @@ -114,19 +112,19 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { int byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(1); + values[valuesOffset++] = byte0 >>> 1; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1.TripleShift(2)); + values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2); int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2.TripleShift(3)); + values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3); int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4); int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4.TripleShift(5)); + values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5); int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6); int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6.TripleShift(7)); + values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7); values[valuesOffset++] = byte6 & 127; } } @@ -136,75 +134,75 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = block0.TripleShift(57); - values[valuesOffset++] = (block0.TripleShift(50)) & 127L; - values[valuesOffset++] = (block0.TripleShift(43)) & 127L; - values[valuesOffset++] = (block0.TripleShift(36)) & 127L; - values[valuesOffset++] = (block0.TripleShift(29)) & 127L; - values[valuesOffset++] = (block0.TripleShift(22)) & 127L; - values[valuesOffset++] = (block0.TripleShift(15)) & 127L; - values[valuesOffset++] = (block0.TripleShift(8)) & 127L; - values[valuesOffset++] = (block0.TripleShift(1)) & 127L; + values[valuesOffset++] = block0 >>> 57; + values[valuesOffset++] = (block0 >>> 50) & 127L; + values[valuesOffset++] = (block0 >>> 43) & 127L; + values[valuesOffset++] = (block0 >>> 36) & 127L; + values[valuesOffset++] = (block0 >>> 29) & 127L; + values[valuesOffset++] = (block0 >>> 22) & 127L; + values[valuesOffset++] = (block0 >>> 15) & 127L; + values[valuesOffset++] = (block0 >>> 8) & 127L; + values[valuesOffset++] = (block0 >>> 1) & 127L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1L) << 6) | (block1.TripleShift(58)); - values[valuesOffset++] = (block1.TripleShift(51)) & 127L; - values[valuesOffset++] = (block1.TripleShift(44)) & 127L; - values[valuesOffset++] = (block1.TripleShift(37)) & 127L; - values[valuesOffset++] = (block1.TripleShift(30)) & 127L; - values[valuesOffset++] = (block1.TripleShift(23)) & 127L; - values[valuesOffset++] = (block1.TripleShift(16)) & 127L; - values[valuesOffset++] = (block1.TripleShift(9)) & 127L; - values[valuesOffset++] = (block1.TripleShift(2)) & 127L; + values[valuesOffset++] = ((block0 & 1L) << 6) | (block1 >>> 58); + values[valuesOffset++] = (block1 >>> 51) & 127L; + values[valuesOffset++] = (block1 >>> 44) & 127L; + values[valuesOffset++] = (block1 >>> 37) & 127L; + values[valuesOffset++] = (block1 >>> 30) & 127L; + values[valuesOffset++] = (block1 >>> 23) & 127L; + values[valuesOffset++] = (block1 >>> 16) & 127L; + values[valuesOffset++] = (block1 >>> 9) & 127L; + values[valuesOffset++] = (block1 >>> 2) & 127L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 5) | (block2.TripleShift(59)); - values[valuesOffset++] = (block2.TripleShift(52)) & 127L; - values[valuesOffset++] = (block2.TripleShift(45)) & 127L; - values[valuesOffset++] = (block2.TripleShift(38)) & 127L; - values[valuesOffset++] = (block2.TripleShift(31)) & 127L; - values[valuesOffset++] = (block2.TripleShift(24)) & 127L; - values[valuesOffset++] = (block2.TripleShift(17)) & 127L; - values[valuesOffset++] = (block2.TripleShift(10)) & 127L; - values[valuesOffset++] = (block2.TripleShift(3)) & 127L; + values[valuesOffset++] = ((block1 & 3L) << 5) | (block2 >>> 59); + values[valuesOffset++] = (block2 >>> 52) & 127L; + values[valuesOffset++] = (block2 >>> 45) & 127L; + values[valuesOffset++] = (block2 >>> 38) & 127L; + values[valuesOffset++] = (block2 >>> 31) & 127L; + values[valuesOffset++] = (block2 >>> 24) & 127L; + values[valuesOffset++] = (block2 >>> 17) & 127L; + values[valuesOffset++] = (block2 >>> 10) & 127L; + values[valuesOffset++] = (block2 >>> 3) & 127L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 7L) << 4) | (block3.TripleShift(60)); - values[valuesOffset++] = (block3.TripleShift(53)) & 127L; - values[valuesOffset++] = (block3.TripleShift(46)) & 127L; - values[valuesOffset++] = (block3.TripleShift(39)) & 127L; - values[valuesOffset++] = (block3.TripleShift(32)) & 127L; - values[valuesOffset++] = (block3.TripleShift(25)) & 127L; - values[valuesOffset++] = (block3.TripleShift(18)) & 127L; - values[valuesOffset++] = (block3.TripleShift(11)) & 127L; - values[valuesOffset++] = (block3.TripleShift(4)) & 127L; + values[valuesOffset++] = ((block2 & 7L) << 4) | (block3 >>> 60); + values[valuesOffset++] = (block3 >>> 53) & 127L; + values[valuesOffset++] = (block3 >>> 46) & 127L; + values[valuesOffset++] = (block3 >>> 39) & 127L; + values[valuesOffset++] = (block3 >>> 32) & 127L; + values[valuesOffset++] = (block3 >>> 25) & 127L; + values[valuesOffset++] = (block3 >>> 18) & 127L; + values[valuesOffset++] = (block3 >>> 11) & 127L; + values[valuesOffset++] = (block3 >>> 4) & 127L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 3) | (block4.TripleShift(61)); - values[valuesOffset++] = (block4.TripleShift(54)) & 127L; - values[valuesOffset++] = (block4.TripleShift(47)) & 127L; - values[valuesOffset++] = (block4.TripleShift(40)) & 127L; - values[valuesOffset++] = (block4.TripleShift(33)) & 127L; - values[valuesOffset++] = (block4.TripleShift(26)) & 127L; - values[valuesOffset++] = (block4.TripleShift(19)) & 127L; - values[valuesOffset++] = (block4.TripleShift(12)) & 127L; - values[valuesOffset++] = (block4.TripleShift(5)) & 127L; + values[valuesOffset++] = ((block3 & 15L) << 3) | (block4 >>> 61); + values[valuesOffset++] = (block4 >>> 54) & 127L; + values[valuesOffset++] = (block4 >>> 47) & 127L; + values[valuesOffset++] = (block4 >>> 40) & 127L; + values[valuesOffset++] = (block4 >>> 33) & 127L; + values[valuesOffset++] = (block4 >>> 26) & 127L; + values[valuesOffset++] = (block4 >>> 19) & 127L; + values[valuesOffset++] = (block4 >>> 12) & 127L; + values[valuesOffset++] = (block4 >>> 5) & 127L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 2) | (block5.TripleShift(62)); - values[valuesOffset++] = (block5.TripleShift(55)) & 127L; - values[valuesOffset++] = (block5.TripleShift(48)) & 127L; - values[valuesOffset++] = (block5.TripleShift(41)) & 127L; - values[valuesOffset++] = (block5.TripleShift(34)) & 127L; - values[valuesOffset++] = (block5.TripleShift(27)) & 127L; - values[valuesOffset++] = (block5.TripleShift(20)) & 127L; - values[valuesOffset++] = (block5.TripleShift(13)) & 127L; - values[valuesOffset++] = (block5.TripleShift(6)) & 127L; + values[valuesOffset++] = ((block4 & 31L) << 2) | (block5 >>> 62); + values[valuesOffset++] = (block5 >>> 55) & 127L; + values[valuesOffset++] = (block5 >>> 48) & 127L; + values[valuesOffset++] = (block5 >>> 41) & 127L; + values[valuesOffset++] = (block5 >>> 34) & 127L; + values[valuesOffset++] = (block5 >>> 27) & 127L; + values[valuesOffset++] = (block5 >>> 20) & 127L; + values[valuesOffset++] = (block5 >>> 13) & 127L; + values[valuesOffset++] = (block5 >>> 6) & 127L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 1) | (block6.TripleShift(63)); - values[valuesOffset++] = (block6.TripleShift(56)) & 127L; - values[valuesOffset++] = (block6.TripleShift(49)) & 127L; - values[valuesOffset++] = (block6.TripleShift(42)) & 127L; - values[valuesOffset++] = (block6.TripleShift(35)) & 127L; - values[valuesOffset++] = (block6.TripleShift(28)) & 127L; - values[valuesOffset++] = (block6.TripleShift(21)) & 127L; - values[valuesOffset++] = (block6.TripleShift(14)) & 127L; - values[valuesOffset++] = (block6.TripleShift(7)) & 127L; + values[valuesOffset++] = ((block5 & 63L) << 1) | (block6 >>> 63); + values[valuesOffset++] = (block6 >>> 56) & 127L; + values[valuesOffset++] = (block6 >>> 49) & 127L; + values[valuesOffset++] = (block6 >>> 42) & 127L; + values[valuesOffset++] = (block6 >>> 35) & 127L; + values[valuesOffset++] = (block6 >>> 28) & 127L; + values[valuesOffset++] = (block6 >>> 21) & 127L; + values[valuesOffset++] = (block6 >>> 14) & 127L; + values[valuesOffset++] = (block6 >>> 7) & 127L; values[valuesOffset++] = block6 & 127L; } } @@ -214,21 +212,21 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int for (int i = 0; i < iterations; ++i) { long byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0.TripleShift(1); + values[valuesOffset++] = byte0 >>> 1; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1.TripleShift(2)); + values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2); long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2.TripleShift(3)); + values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3); long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3.TripleShift(4)); + values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4); long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4.TripleShift(5)); + values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5); long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5.TripleShift(6)); + values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6); long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6.TripleShift(7)); + values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7); values[valuesOffset++] = byte6 & 127; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked8.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked8.cs index 80f5ea00d6..3a7313c4d5 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked8.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked8.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -38,7 +36,7 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v long block = blocks[blocksOffset++]; for (int shift = 56; shift >= 0; shift -= 8) { - values[valuesOffset++] = (int)((block.TripleShift(shift)) & 255); + values[valuesOffset++] = (int)((block >>> shift) & 255); } } } @@ -58,7 +56,7 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int long block = blocks[blocksOffset++]; for (int shift = 56; shift >= 0; shift -= 8) { - values[valuesOffset++] = (block.TripleShift(shift)) & 255; + values[valuesOffset++] = (block >>> shift) & 255; } } } @@ -71,4 +69,4 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPacked9.cs b/src/Lucene.Net/Util/Packed/BulkOperationPacked9.cs index 34058eef72..ae43de9ef4 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPacked9.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPacked9.cs @@ -1,7 +1,5 @@ // this file has been automatically generated, DO NOT EDIT -using J2N.Numerics; - namespace Lucene.Net.Util.Packed { /* @@ -36,77 +34,77 @@ public override void Decode(long[] blocks, int blocksOffset, int[] values, int v for (int i = 0; i < iterations; ++i) { long block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(block0.TripleShift(55)); - values[valuesOffset++] = (int)((block0.TripleShift(46)) & 511L); - values[valuesOffset++] = (int)((block0.TripleShift(37)) & 511L); - values[valuesOffset++] = (int)((block0.TripleShift(28)) & 511L); - values[valuesOffset++] = (int)((block0.TripleShift(19)) & 511L); - values[valuesOffset++] = (int)((block0.TripleShift(10)) & 511L); - values[valuesOffset++] = (int)((block0.TripleShift(1)) & 511L); + values[valuesOffset++] = (int)(block0 >>> 55); + values[valuesOffset++] = (int)((block0 >>> 46) & 511L); + values[valuesOffset++] = (int)((block0 >>> 37) & 511L); + values[valuesOffset++] = (int)((block0 >>> 28) & 511L); + values[valuesOffset++] = (int)((block0 >>> 19) & 511L); + values[valuesOffset++] = (int)((block0 >>> 10) & 511L); + values[valuesOffset++] = (int)((block0 >>> 1) & 511L); long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block0 & 1L) << 8) | (block1.TripleShift(56))); - values[valuesOffset++] = (int)((block1.TripleShift(47)) & 511L); - values[valuesOffset++] = (int)((block1.TripleShift(38)) & 511L); - values[valuesOffset++] = (int)((block1.TripleShift(29)) & 511L); - values[valuesOffset++] = (int)((block1.TripleShift(20)) & 511L); - values[valuesOffset++] = (int)((block1.TripleShift(11)) & 511L); - values[valuesOffset++] = (int)((block1.TripleShift(2)) & 511L); + values[valuesOffset++] = (int)(((block0 & 1L) << 8) | (block1 >>> 56)); + values[valuesOffset++] = (int)((block1 >>> 47) & 511L); + values[valuesOffset++] = (int)((block1 >>> 38) & 511L); + values[valuesOffset++] = (int)((block1 >>> 29) & 511L); + values[valuesOffset++] = (int)((block1 >>> 20) & 511L); + values[valuesOffset++] = (int)((block1 >>> 11) & 511L); + values[valuesOffset++] = (int)((block1 >>> 2) & 511L); long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block1 & 3L) << 7) | (block2.TripleShift(57))); - values[valuesOffset++] = (int)((block2.TripleShift(48)) & 511L); - values[valuesOffset++] = (int)((block2.TripleShift(39)) & 511L); - values[valuesOffset++] = (int)((block2.TripleShift(30)) & 511L); - values[valuesOffset++] = (int)((block2.TripleShift(21)) & 511L); - values[valuesOffset++] = (int)((block2.TripleShift(12)) & 511L); - values[valuesOffset++] = (int)((block2.TripleShift(3)) & 511L); + values[valuesOffset++] = (int)(((block1 & 3L) << 7) | (block2 >>> 57)); + values[valuesOffset++] = (int)((block2 >>> 48) & 511L); + values[valuesOffset++] = (int)((block2 >>> 39) & 511L); + values[valuesOffset++] = (int)((block2 >>> 30) & 511L); + values[valuesOffset++] = (int)((block2 >>> 21) & 511L); + values[valuesOffset++] = (int)((block2 >>> 12) & 511L); + values[valuesOffset++] = (int)((block2 >>> 3) & 511L); long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block2 & 7L) << 6) | (block3.TripleShift(58))); - values[valuesOffset++] = (int)((block3.TripleShift(49)) & 511L); - values[valuesOffset++] = (int)((block3.TripleShift(40)) & 511L); - values[valuesOffset++] = (int)((block3.TripleShift(31)) & 511L); - values[valuesOffset++] = (int)((block3.TripleShift(22)) & 511L); - values[valuesOffset++] = (int)((block3.TripleShift(13)) & 511L); - values[valuesOffset++] = (int)((block3.TripleShift(4)) & 511L); + values[valuesOffset++] = (int)(((block2 & 7L) << 6) | (block3 >>> 58)); + values[valuesOffset++] = (int)((block3 >>> 49) & 511L); + values[valuesOffset++] = (int)((block3 >>> 40) & 511L); + values[valuesOffset++] = (int)((block3 >>> 31) & 511L); + values[valuesOffset++] = (int)((block3 >>> 22) & 511L); + values[valuesOffset++] = (int)((block3 >>> 13) & 511L); + values[valuesOffset++] = (int)((block3 >>> 4) & 511L); long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block3 & 15L) << 5) | (block4.TripleShift(59))); - values[valuesOffset++] = (int)((block4.TripleShift(50)) & 511L); - values[valuesOffset++] = (int)((block4.TripleShift(41)) & 511L); - values[valuesOffset++] = (int)((block4.TripleShift(32)) & 511L); - values[valuesOffset++] = (int)((block4.TripleShift(23)) & 511L); - values[valuesOffset++] = (int)((block4.TripleShift(14)) & 511L); - values[valuesOffset++] = (int)((block4.TripleShift(5)) & 511L); + values[valuesOffset++] = (int)(((block3 & 15L) << 5) | (block4 >>> 59)); + values[valuesOffset++] = (int)((block4 >>> 50) & 511L); + values[valuesOffset++] = (int)((block4 >>> 41) & 511L); + values[valuesOffset++] = (int)((block4 >>> 32) & 511L); + values[valuesOffset++] = (int)((block4 >>> 23) & 511L); + values[valuesOffset++] = (int)((block4 >>> 14) & 511L); + values[valuesOffset++] = (int)((block4 >>> 5) & 511L); long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block4 & 31L) << 4) | (block5.TripleShift(60))); - values[valuesOffset++] = (int)((block5.TripleShift(51)) & 511L); - values[valuesOffset++] = (int)((block5.TripleShift(42)) & 511L); - values[valuesOffset++] = (int)((block5.TripleShift(33)) & 511L); - values[valuesOffset++] = (int)((block5.TripleShift(24)) & 511L); - values[valuesOffset++] = (int)((block5.TripleShift(15)) & 511L); - values[valuesOffset++] = (int)((block5.TripleShift(6)) & 511L); + values[valuesOffset++] = (int)(((block4 & 31L) << 4) | (block5 >>> 60)); + values[valuesOffset++] = (int)((block5 >>> 51) & 511L); + values[valuesOffset++] = (int)((block5 >>> 42) & 511L); + values[valuesOffset++] = (int)((block5 >>> 33) & 511L); + values[valuesOffset++] = (int)((block5 >>> 24) & 511L); + values[valuesOffset++] = (int)((block5 >>> 15) & 511L); + values[valuesOffset++] = (int)((block5 >>> 6) & 511L); long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block5 & 63L) << 3) | (block6.TripleShift(61))); - values[valuesOffset++] = (int)((block6.TripleShift(52)) & 511L); - values[valuesOffset++] = (int)((block6.TripleShift(43)) & 511L); - values[valuesOffset++] = (int)((block6.TripleShift(34)) & 511L); - values[valuesOffset++] = (int)((block6.TripleShift(25)) & 511L); - values[valuesOffset++] = (int)((block6.TripleShift(16)) & 511L); - values[valuesOffset++] = (int)((block6.TripleShift(7)) & 511L); + values[valuesOffset++] = (int)(((block5 & 63L) << 3) | (block6 >>> 61)); + values[valuesOffset++] = (int)((block6 >>> 52) & 511L); + values[valuesOffset++] = (int)((block6 >>> 43) & 511L); + values[valuesOffset++] = (int)((block6 >>> 34) & 511L); + values[valuesOffset++] = (int)((block6 >>> 25) & 511L); + values[valuesOffset++] = (int)((block6 >>> 16) & 511L); + values[valuesOffset++] = (int)((block6 >>> 7) & 511L); long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block6 & 127L) << 2) | (block7.TripleShift(62))); - values[valuesOffset++] = (int)((block7.TripleShift(53)) & 511L); - values[valuesOffset++] = (int)((block7.TripleShift(44)) & 511L); - values[valuesOffset++] = (int)((block7.TripleShift(35)) & 511L); - values[valuesOffset++] = (int)((block7.TripleShift(26)) & 511L); - values[valuesOffset++] = (int)((block7.TripleShift(17)) & 511L); - values[valuesOffset++] = (int)((block7.TripleShift(8)) & 511L); + values[valuesOffset++] = (int)(((block6 & 127L) << 2) | (block7 >>> 62)); + values[valuesOffset++] = (int)((block7 >>> 53) & 511L); + values[valuesOffset++] = (int)((block7 >>> 44) & 511L); + values[valuesOffset++] = (int)((block7 >>> 35) & 511L); + values[valuesOffset++] = (int)((block7 >>> 26) & 511L); + values[valuesOffset++] = (int)((block7 >>> 17) & 511L); + values[valuesOffset++] = (int)((block7 >>> 8) & 511L); long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int)(((block7 & 255L) << 1) | (block8.TripleShift(63))); - values[valuesOffset++] = (int)((block8.TripleShift(54)) & 511L); - values[valuesOffset++] = (int)((block8.TripleShift(45)) & 511L); - values[valuesOffset++] = (int)((block8.TripleShift(36)) & 511L); - values[valuesOffset++] = (int)((block8.TripleShift(27)) & 511L); - values[valuesOffset++] = (int)((block8.TripleShift(18)) & 511L); - values[valuesOffset++] = (int)((block8.TripleShift(9)) & 511L); + values[valuesOffset++] = (int)(((block7 & 255L) << 1) | (block8 >>> 63)); + values[valuesOffset++] = (int)((block8 >>> 54) & 511L); + values[valuesOffset++] = (int)((block8 >>> 45) & 511L); + values[valuesOffset++] = (int)((block8 >>> 36) & 511L); + values[valuesOffset++] = (int)((block8 >>> 27) & 511L); + values[valuesOffset++] = (int)((block8 >>> 18) & 511L); + values[valuesOffset++] = (int)((block8 >>> 9) & 511L); values[valuesOffset++] = (int)(block8 & 511L); } } @@ -117,19 +115,19 @@ public override void Decode(byte[] blocks, int blocksOffset, int[] values, int v { int byte0 = blocks[blocksOffset++] & 0xFF; int byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 1) | (byte1.TripleShift(7)); + values[valuesOffset++] = (byte0 << 1) | (byte1 >>> 7); int byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6); int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3.TripleShift(5)); + values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5); int byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4.TripleShift(4)); + values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4); int byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5.TripleShift(3)); + values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3); int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6.TripleShift(2)); + values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2); int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7.TripleShift(1)); + values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1); int byte8 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte7 & 1) << 8) | byte8; } @@ -141,76 +139,76 @@ public override void Decode(long[] blocks, int blocksOffset, long[] values, int { long block0 = blocks[blocksOffset++]; values[valuesOffset++] = (long)((ulong)block0 >> 55); - values[valuesOffset++] = (block0.TripleShift(46)) & 511L; - values[valuesOffset++] = (block0.TripleShift(37)) & 511L; - values[valuesOffset++] = (block0.TripleShift(28)) & 511L; - values[valuesOffset++] = (block0.TripleShift(19)) & 511L; - values[valuesOffset++] = (block0.TripleShift(10)) & 511L; - values[valuesOffset++] = (block0.TripleShift(1)) & 511L; + values[valuesOffset++] = (block0 >>> 46) & 511L; + values[valuesOffset++] = (block0 >>> 37) & 511L; + values[valuesOffset++] = (block0 >>> 28) & 511L; + values[valuesOffset++] = (block0 >>> 19) & 511L; + values[valuesOffset++] = (block0 >>> 10) & 511L; + values[valuesOffset++] = (block0 >>> 1) & 511L; long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1L) << 8) | (block1.TripleShift(56)); - values[valuesOffset++] = (block1.TripleShift(47)) & 511L; - values[valuesOffset++] = (block1.TripleShift(38)) & 511L; - values[valuesOffset++] = (block1.TripleShift(29)) & 511L; - values[valuesOffset++] = (block1.TripleShift(20)) & 511L; - values[valuesOffset++] = (block1.TripleShift(11)) & 511L; - values[valuesOffset++] = (block1.TripleShift(2)) & 511L; + values[valuesOffset++] = ((block0 & 1L) << 8) | (block1 >>> 56); + values[valuesOffset++] = (block1 >>> 47) & 511L; + values[valuesOffset++] = (block1 >>> 38) & 511L; + values[valuesOffset++] = (block1 >>> 29) & 511L; + values[valuesOffset++] = (block1 >>> 20) & 511L; + values[valuesOffset++] = (block1 >>> 11) & 511L; + values[valuesOffset++] = (block1 >>> 2) & 511L; long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 7) | (block2.TripleShift(57)); - values[valuesOffset++] = (block2.TripleShift(48)) & 511L; - values[valuesOffset++] = (block2.TripleShift(39)) & 511L; - values[valuesOffset++] = (block2.TripleShift(30)) & 511L; - values[valuesOffset++] = (block2.TripleShift(21)) & 511L; - values[valuesOffset++] = (block2.TripleShift(12)) & 511L; - values[valuesOffset++] = (block2.TripleShift(3)) & 511L; + values[valuesOffset++] = ((block1 & 3L) << 7) | (block2 >>> 57); + values[valuesOffset++] = (block2 >>> 48) & 511L; + values[valuesOffset++] = (block2 >>> 39) & 511L; + values[valuesOffset++] = (block2 >>> 30) & 511L; + values[valuesOffset++] = (block2 >>> 21) & 511L; + values[valuesOffset++] = (block2 >>> 12) & 511L; + values[valuesOffset++] = (block2 >>> 3) & 511L; long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 7L) << 6) | (block3.TripleShift(58)); - values[valuesOffset++] = (block3.TripleShift(49)) & 511L; - values[valuesOffset++] = (block3.TripleShift(40)) & 511L; - values[valuesOffset++] = (block3.TripleShift(31)) & 511L; - values[valuesOffset++] = (block3.TripleShift(22)) & 511L; - values[valuesOffset++] = (block3.TripleShift(13)) & 511L; - values[valuesOffset++] = (block3.TripleShift(4)) & 511L; + values[valuesOffset++] = ((block2 & 7L) << 6) | (block3 >>> 58); + values[valuesOffset++] = (block3 >>> 49) & 511L; + values[valuesOffset++] = (block3 >>> 40) & 511L; + values[valuesOffset++] = (block3 >>> 31) & 511L; + values[valuesOffset++] = (block3 >>> 22) & 511L; + values[valuesOffset++] = (block3 >>> 13) & 511L; + values[valuesOffset++] = (block3 >>> 4) & 511L; long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 5) | (block4.TripleShift(59)); - values[valuesOffset++] = (block4.TripleShift(50)) & 511L; - values[valuesOffset++] = (block4.TripleShift(41)) & 511L; - values[valuesOffset++] = (block4.TripleShift(32)) & 511L; - values[valuesOffset++] = (block4.TripleShift(23)) & 511L; - values[valuesOffset++] = (block4.TripleShift(14)) & 511L; - values[valuesOffset++] = (block4.TripleShift(5)) & 511L; + values[valuesOffset++] = ((block3 & 15L) << 5) | (block4 >>> 59); + values[valuesOffset++] = (block4 >>> 50) & 511L; + values[valuesOffset++] = (block4 >>> 41) & 511L; + values[valuesOffset++] = (block4 >>> 32) & 511L; + values[valuesOffset++] = (block4 >>> 23) & 511L; + values[valuesOffset++] = (block4 >>> 14) & 511L; + values[valuesOffset++] = (block4 >>> 5) & 511L; long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 4) | (block5.TripleShift(60)); - values[valuesOffset++] = (block5.TripleShift(51)) & 511L; - values[valuesOffset++] = (block5.TripleShift(42)) & 511L; - values[valuesOffset++] = (block5.TripleShift(33)) & 511L; - values[valuesOffset++] = (block5.TripleShift(24)) & 511L; - values[valuesOffset++] = (block5.TripleShift(15)) & 511L; - values[valuesOffset++] = (block5.TripleShift(6)) & 511L; + values[valuesOffset++] = ((block4 & 31L) << 4) | (block5 >>> 60); + values[valuesOffset++] = (block5 >>> 51) & 511L; + values[valuesOffset++] = (block5 >>> 42) & 511L; + values[valuesOffset++] = (block5 >>> 33) & 511L; + values[valuesOffset++] = (block5 >>> 24) & 511L; + values[valuesOffset++] = (block5 >>> 15) & 511L; + values[valuesOffset++] = (block5 >>> 6) & 511L; long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 3) | (block6.TripleShift(61)); - values[valuesOffset++] = (block6.TripleShift(52)) & 511L; - values[valuesOffset++] = (block6.TripleShift(43)) & 511L; - values[valuesOffset++] = (block6.TripleShift(34)) & 511L; - values[valuesOffset++] = (block6.TripleShift(25)) & 511L; - values[valuesOffset++] = (block6.TripleShift(16)) & 511L; - values[valuesOffset++] = (block6.TripleShift(7)) & 511L; + values[valuesOffset++] = ((block5 & 63L) << 3) | (block6 >>> 61); + values[valuesOffset++] = (block6 >>> 52) & 511L; + values[valuesOffset++] = (block6 >>> 43) & 511L; + values[valuesOffset++] = (block6 >>> 34) & 511L; + values[valuesOffset++] = (block6 >>> 25) & 511L; + values[valuesOffset++] = (block6 >>> 16) & 511L; + values[valuesOffset++] = (block6 >>> 7) & 511L; long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 127L) << 2) | (block7.TripleShift(62)); - values[valuesOffset++] = (block7.TripleShift(53)) & 511L; - values[valuesOffset++] = (block7.TripleShift(44)) & 511L; - values[valuesOffset++] = (block7.TripleShift(35)) & 511L; - values[valuesOffset++] = (block7.TripleShift(26)) & 511L; - values[valuesOffset++] = (block7.TripleShift(17)) & 511L; - values[valuesOffset++] = (block7.TripleShift(8)) & 511L; + values[valuesOffset++] = ((block6 & 127L) << 2) | (block7 >>> 62); + values[valuesOffset++] = (block7 >>> 53) & 511L; + values[valuesOffset++] = (block7 >>> 44) & 511L; + values[valuesOffset++] = (block7 >>> 35) & 511L; + values[valuesOffset++] = (block7 >>> 26) & 511L; + values[valuesOffset++] = (block7 >>> 17) & 511L; + values[valuesOffset++] = (block7 >>> 8) & 511L; long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 1) | (block8.TripleShift(63)); - values[valuesOffset++] = (block8.TripleShift(54)) & 511L; - values[valuesOffset++] = (block8.TripleShift(45)) & 511L; - values[valuesOffset++] = (block8.TripleShift(36)) & 511L; - values[valuesOffset++] = (block8.TripleShift(27)) & 511L; - values[valuesOffset++] = (block8.TripleShift(18)) & 511L; - values[valuesOffset++] = (block8.TripleShift(9)) & 511L; + values[valuesOffset++] = ((block7 & 255L) << 1) | (block8 >>> 63); + values[valuesOffset++] = (block8 >>> 54) & 511L; + values[valuesOffset++] = (block8 >>> 45) & 511L; + values[valuesOffset++] = (block8 >>> 36) & 511L; + values[valuesOffset++] = (block8 >>> 27) & 511L; + values[valuesOffset++] = (block8 >>> 18) & 511L; + values[valuesOffset++] = (block8 >>> 9) & 511L; values[valuesOffset++] = block8 & 511L; } } @@ -221,22 +219,22 @@ public override void Decode(byte[] blocks, int blocksOffset, long[] values, int { long byte0 = blocks[blocksOffset++] & 0xFF; long byte1 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 1) | (byte1.TripleShift(7)); + values[valuesOffset++] = (byte0 << 1) | (byte1 >>> 7); long byte2 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2.TripleShift(6)); + values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6); long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3.TripleShift(5)); + values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5); long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4.TripleShift(4)); + values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4); long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5.TripleShift(3)); + values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3); long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6.TripleShift(2)); + values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2); long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7.TripleShift(1)); + values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1); long byte8 = blocks[blocksOffset++] & 0xFF; values[valuesOffset++] = ((byte7 & 1) << 8) | byte8; } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/BulkOperationPackedSingleBlock.cs b/src/Lucene.Net/Util/Packed/BulkOperationPackedSingleBlock.cs index c802883214..de7f748eb8 100644 --- a/src/Lucene.Net/Util/Packed/BulkOperationPackedSingleBlock.cs +++ b/src/Lucene.Net/Util/Packed/BulkOperationPackedSingleBlock.cs @@ -1,7 +1,4 @@ -using J2N.Numerics; -using System; - -namespace Lucene.Net.Util.Packed +namespace Lucene.Net.Util.Packed { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -57,7 +54,7 @@ public BulkOperationPackedSingleBlock(int bitsPerValue) /// private static long ReadInt64(byte[] blocks, int blocksOffset) { - return (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 56 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 48 | + return (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 56 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 48 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 40 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 32 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 24 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 16 | (((sbyte)blocks[blocksOffset++]) & 0xFFL) << 8 | ((sbyte)blocks[blocksOffset++]) & 0xFFL; @@ -68,7 +65,7 @@ private int Decode(long block, long[] values, int valuesOffset) values[valuesOffset++] = block & mask; for (int j = 1; j < valueCount; ++j) { - block = block.TripleShift(bitsPerValue); + block >>>= bitsPerValue; values[valuesOffset++] = block & mask; } return valuesOffset; @@ -79,7 +76,7 @@ private int Decode(long block, int[] values, int valuesOffset) values[valuesOffset++] = (int)(block & mask); for (int j = 1; j < valueCount; ++j) { - block = block.TripleShift(bitsPerValue); + block >>>= bitsPerValue; values[valuesOffset++] = (int)(block & mask); } return valuesOffset; @@ -189,4 +186,4 @@ public override void Encode(int[] values, int valuesOffset, byte[] blocks, int b } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/DirectPacked64SingleBlockReader.cs b/src/Lucene.Net/Util/Packed/DirectPacked64SingleBlockReader.cs index 07c2710743..aa8a59d067 100644 --- a/src/Lucene.Net/Util/Packed/DirectPacked64SingleBlockReader.cs +++ b/src/Lucene.Net/Util/Packed/DirectPacked64SingleBlockReader.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; -using System; -using System.IO; +using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Packed @@ -50,7 +48,7 @@ public override long Get(int index) long block = @in.ReadInt64(); int offsetInBlock = index % valuesPerBlock; - return (block.TripleShift(offsetInBlock * m_bitsPerValue)) & mask; + return (block >>> (offsetInBlock * m_bitsPerValue)) & mask; } catch (Exception e) when (e.IsIOException()) { @@ -64,4 +62,4 @@ public override long RamBytesUsed() return 0; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/DirectPackedReader.cs b/src/Lucene.Net/Util/Packed/DirectPackedReader.cs index c3f280b5a9..54bd2055d7 100644 --- a/src/Lucene.Net/Util/Packed/DirectPackedReader.cs +++ b/src/Lucene.Net/Util/Packed/DirectPackedReader.cs @@ -1,6 +1,4 @@ -using J2N.Numerics; -using System; -using System.IO; +using System; using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Packed @@ -51,7 +49,7 @@ public DirectPackedReader(int bitsPerValue, int valueCount, IndexInput @in) public override long Get(int index) { long majorBitPos = (long)index * m_bitsPerValue; - long elementPos = majorBitPos.TripleShift(3); + long elementPos = majorBitPos >>> 3; try { @in.Seek(startPointer + elementPos); @@ -63,7 +61,7 @@ public override long Get(int index) int shiftRightBits = roundedBits - bitPos - m_bitsPerValue; long rawValue; - switch (roundedBits.TripleShift(3)) + switch (roundedBits >>> 3) { case 1: rawValue = @in.ReadByte(); @@ -107,7 +105,7 @@ public override long Get(int index) default: throw AssertionError.Create("bitsPerValue too large: " + m_bitsPerValue); } - return (rawValue.TripleShift(shiftRightBits)) & valueMask; + return (rawValue >>> shiftRightBits) & valueMask; } catch (Exception ioe) when (ioe.IsIOException()) { @@ -121,4 +119,4 @@ public override long RamBytesUsed() return 0; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/EliasFanoDecoder.cs b/src/Lucene.Net/Util/Packed/EliasFanoDecoder.cs index 80381c5dcc..83027890c3 100644 --- a/src/Lucene.Net/Util/Packed/EliasFanoDecoder.cs +++ b/src/Lucene.Net/Util/Packed/EliasFanoDecoder.cs @@ -1,7 +1,5 @@ using J2N.Numerics; using Lucene.Net.Diagnostics; -using System; -using System.Globalization; using System.Runtime.CompilerServices; namespace Lucene.Net.Util.Packed @@ -115,9 +113,9 @@ private static long UnPackValue(long[] longArray, int numBits, long packIndex, l return 0; } long bitPos = packIndex * numBits; - int index = (int)(bitPos.TripleShift(LOG2_INT64_SIZE)); + int index = (int)(bitPos >>> LOG2_INT64_SIZE); int bitPosAtIndex = (int)(bitPos & ((sizeof(long) * 8) - 1)); - long value = longArray[index].TripleShift(bitPosAtIndex); + long value = longArray[index] >>> bitPosAtIndex; if ((bitPosAtIndex + numBits) > (sizeof(long) * 8)) { value |= (longArray[index + 1] << ((sizeof(long) * 8) - bitPosAtIndex)); @@ -190,8 +188,8 @@ private bool ToAfterCurrentHighBit() return false; } setBitForIndex += 1; - int highIndex = (int)(setBitForIndex.TripleShift(LOG2_INT64_SIZE)); - curHighLong = efEncoder.upperLongs[highIndex].TripleShift(CurrentRightShift); + int highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); + curHighLong = efEncoder.upperLongs[highIndex] >>> CurrentRightShift; return true; } @@ -205,7 +203,7 @@ private void ToNextHighInt64() { setBitForIndex += (sizeof(long) * 8) - (setBitForIndex & ((sizeof(long) * 8) - 1)); //assert getCurrentRightShift() == 0; - int highIndex = (int)(setBitForIndex.TripleShift(LOG2_INT64_SIZE)); + int highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); curHighLong = efEncoder.upperLongs[highIndex]; } @@ -304,12 +302,12 @@ public virtual long AdvanceToValue(long target) } setBitForIndex += 1; // the high bit at setBitForIndex belongs to the unary code for efIndex - int highIndex = (int)(setBitForIndex.TripleShift(LOG2_INT64_SIZE)); + int highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); long upperLong = efEncoder.upperLongs[highIndex]; - curHighLong = upperLong.TripleShift(((int)(setBitForIndex & ((sizeof(long) * 8) - 1)))); // may contain the unary 1 bit for efIndex + curHighLong = upperLong >>> ((int)(setBitForIndex & ((sizeof(long) * 8) - 1))); // may contain the unary 1 bit for efIndex // determine index entry to advance to - long highTarget = target.TripleShift(efEncoder.numLowBits); + long highTarget = target >>> efEncoder.numLowBits; long indexEntryIndex = (highTarget / efEncoder.indexInterval) - 1; if (indexEntryIndex >= 0) // not before first index entry @@ -324,9 +322,9 @@ public virtual long AdvanceToValue(long target) { setBitForIndex = UnPackValue(efEncoder.upperZeroBitPositionIndex, efEncoder.nIndexEntryBits, indexEntryIndex, indexMask); efIndex = setBitForIndex - indexHighValue; // the high bit at setBitForIndex belongs to the unary code for efIndex - highIndex = (int)setBitForIndex.TripleShift(LOG2_INT64_SIZE); + highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); upperLong = efEncoder.upperLongs[highIndex]; - curHighLong = upperLong.TripleShift((int)(setBitForIndex & ((sizeof(long) * 8) - 1))); // may contain the unary 1 bit for efIndex + curHighLong = upperLong >>> (int)(setBitForIndex & ((sizeof(long) * 8) - 1)); // may contain the unary 1 bit for efIndex } if (Debugging.AssertsEnabled) Debugging.Assert(efIndex < numEncoded); // there is a high value to be found. } @@ -344,7 +342,7 @@ public virtual long AdvanceToValue(long target) } setBitForIndex += (sizeof(long) * 8) - (setBitForIndex & ((sizeof(long) * 8) - 1)); // highIndex = (int)(setBitForIndex >>> LOG2_LONG_SIZE); - if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == (int)(setBitForIndex.TripleShift(LOG2_INT64_SIZE))); + if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == (int)(setBitForIndex >>> LOG2_INT64_SIZE)); highIndex += 1; upperLong = efEncoder.upperLongs[highIndex]; curHighLong = upperLong; @@ -355,7 +353,7 @@ public virtual long AdvanceToValue(long target) while (curHighLong == 0L) { setBitForIndex += (sizeof(long) * 8) - (setBitForIndex & ((sizeof(long) * 8) - 1)); - if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex.TripleShift(LOG2_INT64_SIZE)); + if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex >>> LOG2_INT64_SIZE); highIndex += 1; upperLong = efEncoder.upperLongs[highIndex]; curHighLong = upperLong; @@ -379,22 +377,22 @@ public virtual long AdvanceToValue(long target) if ((setBitForIndex & ((sizeof(long) * 8) - 1)) == 0L) // exhausted curHighLong { - if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex.TripleShift(LOG2_INT64_SIZE)); + if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex >>> LOG2_INT64_SIZE); highIndex += 1; upperLong = efEncoder.upperLongs[highIndex]; curHighLong = upperLong; } else { - if (Debugging.AssertsEnabled) Debugging.Assert(highIndex == setBitForIndex.TripleShift(LOG2_INT64_SIZE)); - curHighLong = upperLong.TripleShift(((int)(setBitForIndex & ((sizeof(long) * 8) - 1)))); + if (Debugging.AssertsEnabled) Debugging.Assert(highIndex == setBitForIndex >>> LOG2_INT64_SIZE); + curHighLong = upperLong >>> ((int)(setBitForIndex & ((sizeof(long) * 8) - 1))); } // curHighLong has enough clear bits to reach highTarget, and may not have enough set bits. while (curHighLong == 0L) { setBitForIndex += (sizeof(long) * 8) - (setBitForIndex & ((sizeof(long) * 8) - 1)); - if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex.TripleShift(LOG2_INT64_SIZE)); + if (Debugging.AssertsEnabled) Debugging.Assert((highIndex + 1) == setBitForIndex >>> LOG2_INT64_SIZE); highIndex += 1; upperLong = efEncoder.upperLongs[highIndex]; curHighLong = upperLong; @@ -425,7 +423,7 @@ public virtual long AdvanceToValue(long target) public virtual void ToAfterSequence() { efIndex = numEncoded; // just after last index - setBitForIndex = (efEncoder.lastEncoded.TripleShift(efEncoder.numLowBits)) + numEncoded; + setBitForIndex = (efEncoder.lastEncoded >>> efEncoder.numLowBits) + numEncoded; } /// the number of bits in a long before ( modulo sizeof(long)) @@ -450,7 +448,7 @@ private bool ToBeforeCurrentHighBit() return false; } setBitForIndex -= 1; - int highIndex = (int)setBitForIndex.TripleShift(LOG2_INT64_SIZE); + int highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); curHighLong = efEncoder.upperLongs[highIndex] << CurrentLeftShift; return true; } @@ -465,7 +463,7 @@ private void ToPreviousHighInt64() { setBitForIndex -= (setBitForIndex & ((sizeof(long) * 8) - 1)) + 1; //assert getCurrentLeftShift() == 0; - int highIndex = (int)setBitForIndex.TripleShift(LOG2_INT64_SIZE); + int highIndex = (int)(setBitForIndex >>> LOG2_INT64_SIZE); curHighLong = efEncoder.upperLongs[highIndex]; } @@ -502,7 +500,7 @@ public virtual long PreviousValue() /// of at most a given high value /// by decrementing and by setting accordingly. /// - /// The current implementation does not use the index on the upper zero bit positions. + /// The current implementation does not use the index on the upper zero bit positions. /// /// The largest encoded high value that is at most the given one. private long BackToHighValue(long highTarget) @@ -549,7 +547,7 @@ public virtual long BackToValue(long target) { return NO_MORE_VALUES; } - long highTarget = target.TripleShift(efEncoder.numLowBits); + long highTarget = target >>> efEncoder.numLowBits; long highValue = BackToHighValue(highTarget); if (highValue == NO_MORE_VALUES) { @@ -568,4 +566,4 @@ public virtual long BackToValue(long target) return currentValue; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/EliasFanoEncoder.cs b/src/Lucene.Net/Util/Packed/EliasFanoEncoder.cs index 929910997e..c9b14cd577 100644 --- a/src/Lucene.Net/Util/Packed/EliasFanoEncoder.cs +++ b/src/Lucene.Net/Util/Packed/EliasFanoEncoder.cs @@ -3,7 +3,6 @@ using Lucene.Net.Support; using System; using System.Diagnostics.CodeAnalysis; -using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -51,7 +50,7 @@ namespace Lucene.Net.Util.Packed /// (x[i]/2**L) - (x[i-1]/2**L) /// /// The unary code encodes a natural number n by n 0 bits followed by a 1 bit: - /// 0...01. + /// 0...01. /// /// In the upper bits the total the number of 1 bits is numValues /// and the total number of 0 bits is: @@ -123,7 +122,7 @@ public class EliasFanoEncoder /// /// Construct an Elias-Fano encoder. /// After construction, call times to encode - /// a non decreasing sequence of non negative numbers. + /// a non decreasing sequence of non negative numbers. /// /// The number of values that is to be encoded. /// At least the highest value that will be encoded. @@ -169,7 +168,7 @@ public EliasFanoEncoder(long numValues, long upperBound, long indexInterval) } } this.numLowBits = nLowBits; - this.lowerBitsMask = long.MaxValue.TripleShift(sizeof(long) * 8 - 1 - this.numLowBits); + this.lowerBitsMask = long.MaxValue >>> (sizeof(long) * 8 - 1 - this.numLowBits); long numLongsForLowBits = NumInt64sForBits(numValues * numLowBits); if (numLongsForLowBits > int.MaxValue) @@ -178,7 +177,7 @@ public EliasFanoEncoder(long numValues, long upperBound, long indexInterval) } this.lowerLongs = new long[(int)numLongsForLowBits]; - long numHighBitsClear = ((this.upperBound > 0) ? this.upperBound : 0).TripleShift(this.numLowBits); + long numHighBitsClear = ((this.upperBound > 0) ? this.upperBound : 0) >>> this.numLowBits; if (Debugging.AssertsEnabled) Debugging.Assert(numHighBitsClear <= (2 * this.numValues)); long numHighBitsSet = this.numValues; @@ -193,7 +192,7 @@ public EliasFanoEncoder(long numValues, long upperBound, long indexInterval) throw new ArgumentOutOfRangeException(nameof(indexInterval), "indexInterval should at least 2: " + indexInterval); // LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention) } // For the index: - long maxHighValue = upperBound.TripleShift(this.numLowBits); + long maxHighValue = upperBound >>> this.numLowBits; long nIndexEntries = maxHighValue / indexInterval; // no zero value index entry this.numIndexEntries = (nIndexEntries >= 0) ? nIndexEntries : 0; long maxIndexEntry = maxHighValue + numValues - 1; // clear upper bits, set upper bits, start at zero @@ -223,7 +222,7 @@ public EliasFanoEncoder(long numValues, long upperBound) private static long NumInt64sForBits(long numBits) // Note: int version in FixedBitSet.bits2words() { if (Debugging.AssertsEnabled) Debugging.Assert(numBits >= 0, "{0}", numBits); - return (numBits + (sizeof(long) * 8 - 1)).TripleShift(LOG2_INT64_SIZE); + return (numBits + (sizeof(long) * 8 - 1)) >>> LOG2_INT64_SIZE; } /// @@ -249,7 +248,7 @@ public virtual void EncodeNext(long x) { throw new ArgumentOutOfRangeException(nameof(x), x + " larger than upperBound " + upperBound); // LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention) } - long highValue = x.TripleShift(numLowBits); + long highValue = x >>> numLowBits; EncodeUpperBits(highValue); EncodeLowerBits(x & lowerBitsMask); lastEncoded = x; @@ -269,7 +268,7 @@ public virtual void EncodeNext(long x) private void EncodeUpperBits(long highValue) { long nextHighBitNum = numEncoded + highValue; // sequence of unary gaps - upperLongs[(int)(nextHighBitNum.TripleShift(LOG2_INT64_SIZE))] |= (1L << (int)(nextHighBitNum & ((sizeof(long) * 8) - 1))); + upperLongs[(int)(nextHighBitNum >>> LOG2_INT64_SIZE)] |= (1L << (int)(nextHighBitNum & ((sizeof(long) * 8) - 1))); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -284,12 +283,12 @@ private static void PackValue(long value, long[] longArray, int numBits, long pa if (numBits != 0) { long bitPos = numBits * packIndex; - int index = (int)(bitPos.TripleShift(LOG2_INT64_SIZE)); + int index = (int)(bitPos >>> LOG2_INT64_SIZE); int bitPosAtIndex = (int)(bitPos & ((sizeof(long) * 8) - 1)); longArray[index] |= (value << bitPosAtIndex); if ((bitPosAtIndex + numBits) > (sizeof(long) * 8)) { - longArray[index + 1] = value.TripleShift((sizeof(long) * 8) - bitPosAtIndex); + longArray[index + 1] = value >>> ((sizeof(long) * 8) - bitPosAtIndex); } } } @@ -303,7 +302,7 @@ private static void PackValue(long value, long[] longArray, int numBits, long pa /// this is the same as comparing estimates of the number of bits accessed by a pair of s and /// by a pair of non indexed s when determining the intersections of the pairs. /// A bit set is preferred when upperbound <= 256. - /// It is assumed that is used. + /// It is assumed that is used. /// /// The number of document identifiers that is to be encoded. Should be non negative. /// The maximum possible value for a document identifier. Should be at least . @@ -400,4 +399,4 @@ public override int GetHashCode() return h; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/MonotonicAppendingLongBuffer.cs b/src/Lucene.Net/Util/Packed/MonotonicAppendingLongBuffer.cs index b03bdcbecc..4557f2b7d5 100644 --- a/src/Lucene.Net/Util/Packed/MonotonicAppendingLongBuffer.cs +++ b/src/Lucene.Net/Util/Packed/MonotonicAppendingLongBuffer.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -37,7 +36,7 @@ public sealed class MonotonicAppendingInt64Buffer : AbstractAppendingInt64Buffer [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static long ZigZagDecode(long n) { - return (n.TripleShift(1) ^ -(n & 1)); + return ((n >>> 1) ^ -(n & 1)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -192,4 +191,4 @@ public override long RamBytesUsed() return base.RamBytesUsed() + RamUsageEstimator.SizeOf(averages) + RamUsageEstimator.SizeOf(minValues); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/MonotonicBlockPackedReader.cs b/src/Lucene.Net/Util/Packed/MonotonicBlockPackedReader.cs index 9310deac4b..df5b649b3e 100644 --- a/src/Lucene.Net/Util/Packed/MonotonicBlockPackedReader.cs +++ b/src/Lucene.Net/Util/Packed/MonotonicBlockPackedReader.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Store; using System; using System.IO; @@ -81,7 +80,7 @@ public MonotonicBlockPackedReader(IndexInput @in, int packedIntsVersion, int blo public override long Get(long index) { if (Debugging.AssertsEnabled) Debugging.Assert(index >= 0 && index < valueCount); - int block = (int)(index.TripleShift(blockShift)); + int block = (int)(index >>> blockShift); int idx = (int)(index & blockMask); // LUCENENET NOTE: IMPORTANT: The cast to float is critical here for it to work in x86 return minValues[block] + (long)(float)(idx * averages[block]) + BlockPackedReaderIterator.ZigZagDecode(subReaders[block].Get(idx)); @@ -108,4 +107,4 @@ public long RamBytesUsed() return sizeInBytes; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs b/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs index e22793ac2f..5ead66c9b9 100644 --- a/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs +++ b/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -90,8 +89,8 @@ public override int Get(int index, long[] arr, int off, int len) public override void Set(int index, long value) { int o = index * 3; - blocks[o] = (short)(value.TripleShift(32)); - blocks[o + 1] = (short)(value.TripleShift(16)); + blocks[o] = (short)(value >>> 32); + blocks[o + 1] = (short)(value >>> 16); blocks[o + 2] = (short)value; } @@ -108,8 +107,8 @@ public override int Set(int index, long[] arr, int off, int len) for (int i = off, o = index * 3, end = off + sets; i < end; ++i) { long value = arr[i]; - blocks[o++] = (short)(value.TripleShift(32)); - blocks[o++] = (short)(value.TripleShift(16)); + blocks[o++] = (short)(value >>> 32); + blocks[o++] = (short)(value >>> 16); blocks[o++] = (short)value; } return sets; @@ -117,8 +116,8 @@ public override int Set(int index, long[] arr, int off, int len) public override void Fill(int fromIndex, int toIndex, long val) { - short block1 = (short)(val.TripleShift(32)); - short block2 = (short)(val.TripleShift(16)); + short block1 = (short)(val >>> 32); + short block2 = (short)(val >>> 16); short block3 = (short)val; for (int i = fromIndex * 3, end = toIndex * 3; i < end; i += 3) { @@ -137,9 +136,9 @@ public override void Clear() public override long RamBytesUsed() { return RamUsageEstimator.AlignObjectSize( - RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + 2 * RamUsageEstimator.NUM_BYTES_INT32 // valueCount,bitsPerValue - + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref + + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref + RamUsageEstimator.SizeOf(blocks); } @@ -148,4 +147,4 @@ public override string ToString() return this.GetType().Name + "(bitsPerValue=" + m_bitsPerValue + ", size=" + Count + ", elements.length=" + blocks.Length + ")"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/Packed64.cs b/src/Lucene.Net/Util/Packed/Packed64.cs index ef57134be7..357d79f7dd 100644 --- a/src/Lucene.Net/Util/Packed/Packed64.cs +++ b/src/Lucene.Net/Util/Packed/Packed64.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.IO; @@ -76,7 +75,7 @@ public Packed64(int valueCount, int bitsPerValue) PackedInt32s.Format format = PackedInt32s.Format.PACKED; int longCount = format.Int64Count(PackedInt32s.VERSION_CURRENT, valueCount, bitsPerValue); this.blocks = new long[longCount]; - maskRight = (~0L << (BLOCK_SIZE - bitsPerValue)).TripleShift(BLOCK_SIZE - bitsPerValue); + maskRight = (~0L << (BLOCK_SIZE - bitsPerValue)) >>> (BLOCK_SIZE - bitsPerValue); bpvMinusBlockSize = bitsPerValue - BLOCK_SIZE; } @@ -110,7 +109,7 @@ public Packed64(int packedIntsVersion, DataInput @in, int valueCount, int bitsPe } blocks[blocks.Length - 1] = lastLong; } - maskRight = (~0L << (BLOCK_SIZE - bitsPerValue)).TripleShift(BLOCK_SIZE - bitsPerValue); + maskRight = (~0L << (BLOCK_SIZE - bitsPerValue)) >>> (BLOCK_SIZE - bitsPerValue); bpvMinusBlockSize = bitsPerValue - BLOCK_SIZE; } @@ -121,16 +120,16 @@ public override long Get(int index) // The abstract index in a bit stream long majorBitPos = (long)index * m_bitsPerValue; // The index in the backing long-array - int elementPos = (int)majorBitPos.TripleShift(BLOCK_BITS); + int elementPos = (int)(majorBitPos >>> BLOCK_BITS); // The number of value-bits in the second long long endBits = (majorBitPos & MOD_MASK) + bpvMinusBlockSize; if (endBits <= 0) // Single block { - return (blocks[elementPos].TripleShift((int)-endBits)) & maskRight; + return (blocks[elementPos] >>> (int)-endBits) & maskRight; } // Two blocks - return ((blocks[elementPos] << (int)endBits) | (blocks[elementPos + 1].TripleShift((int)(BLOCK_SIZE - endBits)))) & maskRight; + return ((blocks[elementPos] << (int)endBits) | (blocks[elementPos + 1] >>> (int)(BLOCK_SIZE - endBits))) & maskRight; } public override int Get(int index, long[] arr, int off, int len) @@ -160,7 +159,7 @@ public override int Get(int index, long[] arr, int off, int len) // bulk get if (Debugging.AssertsEnabled) Debugging.Assert(index % decoder.Int64ValueCount == 0); - int blockIndex = (int)(((long)index * m_bitsPerValue).TripleShift(BLOCK_BITS)); + int blockIndex = (int)(((long)index * m_bitsPerValue) >>> BLOCK_BITS); if (Debugging.AssertsEnabled) Debugging.Assert((((long)index * m_bitsPerValue) & MOD_MASK) == 0); int iterations = len / decoder.Int64ValueCount; decoder.Decode(blocks, blockIndex, arr, off, iterations); @@ -187,7 +186,7 @@ public override void Set(int index, long value) // The abstract index in a contiguous bit stream long majorBitPos = (long)index * m_bitsPerValue; // The index in the backing long-array - int elementPos = (int)(majorBitPos.TripleShift(BLOCK_BITS)); // / BLOCK_SIZE + int elementPos = (int)(majorBitPos >>> BLOCK_BITS); // / BLOCK_SIZE // The number of value-bits in the second long long endBits = (majorBitPos & MOD_MASK) + bpvMinusBlockSize; @@ -197,9 +196,9 @@ public override void Set(int index, long value) return; } // Two blocks - blocks[elementPos] = blocks[elementPos] & ~(maskRight.TripleShift((int)endBits)) - | (value.TripleShift((int)endBits)); - blocks[elementPos + 1] = blocks[elementPos + 1] & (~0L).TripleShift((int)endBits) + blocks[elementPos] = blocks[elementPos] & ~(maskRight >>> (int)endBits) + | (value >>> (int)endBits); + blocks[elementPos + 1] = blocks[elementPos + 1] & (~0L) >>> (int)endBits | (value << (int)(BLOCK_SIZE - endBits)); } @@ -230,7 +229,7 @@ public override int Set(int index, long[] arr, int off, int len) // bulk set if (Debugging.AssertsEnabled) Debugging.Assert(index % encoder.Int64ValueCount == 0); - int blockIndex = (int)(((long)index * m_bitsPerValue).TripleShift(BLOCK_BITS)); + int blockIndex = (int)(((long)index * m_bitsPerValue) >>> BLOCK_BITS); if (Debugging.AssertsEnabled) Debugging.Assert((((long)index * m_bitsPerValue) & MOD_MASK) == 0); int iterations = len / encoder.Int64ValueCount; encoder.Encode(arr, off, blocks, blockIndex, iterations); @@ -260,7 +259,7 @@ public override string ToString() public override long RamBytesUsed() { return RamUsageEstimator.AlignObjectSize( - RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + 3 * RamUsageEstimator.NUM_BYTES_INT32 // bpvMinusBlockSize,valueCount,bitsPerValue + RamUsageEstimator.NUM_BYTES_INT64 // maskRight + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref @@ -311,8 +310,8 @@ public override void Fill(int fromIndex, int toIndex, long val) nAlignedValuesBlocks = values.blocks; if (Debugging.AssertsEnabled) Debugging.Assert(nAlignedBlocks <= nAlignedValuesBlocks.Length); } - int startBlock = (int)(((long)fromIndex * m_bitsPerValue).TripleShift(6)); - int endBlock = (int)(((long)toIndex * m_bitsPerValue).TripleShift(6)); + int startBlock = (int)(((long)fromIndex * m_bitsPerValue) >>> 6); + int endBlock = (int)(((long)toIndex * m_bitsPerValue) >>> 6); for (int block = startBlock; block < endBlock; ++block) { long blockValue = nAlignedValuesBlocks[block % nAlignedBlocks]; @@ -348,4 +347,4 @@ public override void Clear() Arrays.Fill(blocks, 0L); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/Packed64SingleBlock.cs b/src/Lucene.Net/Util/Packed/Packed64SingleBlock.cs index 32b474c31b..7d29504a40 100644 --- a/src/Lucene.Net/Util/Packed/Packed64SingleBlock.cs +++ b/src/Lucene.Net/Util/Packed/Packed64SingleBlock.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -68,9 +67,9 @@ public override void Clear() public override long RamBytesUsed() { return RamUsageEstimator.AlignObjectSize( - RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + 2 * RamUsageEstimator.NUM_BYTES_INT32 // valueCount,bitsPerValue - + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref + + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref + RamUsageEstimator.SizeOf(blocks); } @@ -310,15 +309,15 @@ internal Packed64SingleBlock1(int valueCount) public override long Get(int index) { - int o = index.TripleShift(6); + int o = index >>> 6; int b = index & 63; int shift = b << 0; - return (blocks[o].TripleShift(shift)) & 1L; + return (blocks[o] >>> shift) & 1L; } public override void Set(int index, long value) { - int o = index.TripleShift(6); + int o = index >>> 6; int b = index & 63; int shift = b << 0; blocks[o] = (blocks[o] & ~(1L << shift)) | (value << shift); @@ -334,15 +333,15 @@ internal Packed64SingleBlock2(int valueCount) public override long Get(int index) { - int o = index.TripleShift(5); + int o = index >>> 5; int b = index & 31; int shift = b << 1; - return (blocks[o].TripleShift(shift)) & 3L; + return (blocks[o] >>> shift) & 3L; } public override void Set(int index, long value) { - int o = index.TripleShift(5); + int o = index >>> 5; int b = index & 31; int shift = b << 1; blocks[o] = (blocks[o] & ~(3L << shift)) | (value << shift); @@ -361,7 +360,7 @@ public override long Get(int index) int o = index / 21; int b = index % 21; int shift = b * 3; - return (blocks[o].TripleShift(shift)) & 7L; + return (blocks[o] >>> shift) & 7L; } public override void Set(int index, long value) @@ -382,15 +381,15 @@ internal Packed64SingleBlock4(int valueCount) public override long Get(int index) { - int o = index.TripleShift(4); + int o = index >>> 4; int b = index & 15; int shift = b << 2; - return (blocks[o].TripleShift(shift)) & 15L; + return (blocks[o] >>> shift) & 15L; } public override void Set(int index, long value) { - int o = index.TripleShift(4); + int o = index >>> 4; int b = index & 15; int shift = b << 2; blocks[o] = (blocks[o] & ~(15L << shift)) | (value << shift); @@ -409,7 +408,7 @@ public override long Get(int index) int o = index / 12; int b = index % 12; int shift = b * 5; - return (blocks[o].TripleShift(shift)) & 31L; + return (blocks[o] >>> shift) & 31L; } public override void Set(int index, long value) @@ -433,7 +432,7 @@ public override long Get(int index) int o = index / 10; int b = index % 10; int shift = b * 6; - return (blocks[o].TripleShift(shift)) & 63L; + return (blocks[o] >>> shift) & 63L; } public override void Set(int index, long value) @@ -457,7 +456,7 @@ public override long Get(int index) int o = index / 9; int b = index % 9; int shift = b * 7; - return (blocks[o].TripleShift(shift)) & 127L; + return (blocks[o] >>> shift) & 127L; } public override void Set(int index, long value) @@ -478,15 +477,15 @@ internal Packed64SingleBlock8(int valueCount) public override long Get(int index) { - int o = index.TripleShift(3); + int o = index >>> 3; int b = index & 7; int shift = b << 3; - return (blocks[o].TripleShift(shift)) & 255L; + return (blocks[o] >>> shift) & 255L; } public override void Set(int index, long value) { - int o = index.TripleShift(3); + int o = index >>> 3; int b = index & 7; int shift = b << 3; blocks[o] = (blocks[o] & ~(255L << shift)) | (value << shift); @@ -505,7 +504,7 @@ public override long Get(int index) int o = index / 7; int b = index % 7; int shift = b * 9; - return (blocks[o].TripleShift(shift)) & 511L; + return (blocks[o] >>> shift) & 511L; } public override void Set(int index, long value) @@ -529,7 +528,7 @@ public override long Get(int index) int o = index / 6; int b = index % 6; int shift = b * 10; - return (blocks[o].TripleShift(shift)) & 1023L; + return (blocks[o] >>> shift) & 1023L; } public override void Set(int index, long value) @@ -553,7 +552,7 @@ public override long Get(int index) int o = index / 5; int b = index % 5; int shift = b * 12; - return (blocks[o].TripleShift(shift)) & 4095L; + return (blocks[o] >>> shift) & 4095L; } public override void Set(int index, long value) @@ -574,15 +573,15 @@ internal Packed64SingleBlock16(int valueCount) public override long Get(int index) { - int o = index.TripleShift(2); + int o = index >>> 2; int b = index & 3; int shift = b << 4; - return (blocks[o].TripleShift(shift)) & 65535L; + return (blocks[o] >>> shift) & 65535L; } public override void Set(int index, long value) { - int o = index.TripleShift(2); + int o = index >>> 2; int b = index & 3; int shift = b << 4; blocks[o] = (blocks[o] & ~(65535L << shift)) | (value << shift); @@ -601,7 +600,7 @@ public override long Get(int index) int o = index / 3; int b = index % 3; int shift = b * 21; - return (blocks[o].TripleShift(shift)) & 2097151L; + return (blocks[o] >>> shift) & 2097151L; } public override void Set(int index, long value) @@ -622,19 +621,19 @@ internal Packed64SingleBlock32(int valueCount) public override long Get(int index) { - int o = index.TripleShift(1); + int o = index >>> 1; int b = index & 1; int shift = b << 5; - return (blocks[o].TripleShift(shift)) & 4294967295L; + return (blocks[o] >>> shift) & 4294967295L; } public override void Set(int index, long value) { - int o = index.TripleShift(1); + int o = index >>> 1; int b = index & 1; int shift = b << 5; blocks[o] = (blocks[o] & ~(4294967295L << shift)) | (value << shift); } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs b/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs index 7539500b82..4c635f8ee9 100644 --- a/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs +++ b/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -87,8 +86,8 @@ public override int Get(int index, long[] arr, int off, int len) public override void Set(int index, long value) { int o = index * 3; - blocks[o] = (byte)(value.TripleShift(16)); - blocks[o + 1] = (byte)(value.TripleShift(8)); + blocks[o] = (byte)(value >>> 16); + blocks[o + 1] = (byte)(value >>> 8); blocks[o + 2] = (byte)value; } @@ -105,8 +104,8 @@ public override int Set(int index, long[] arr, int off, int len) for (int i = off, o = index * 3, end = off + sets; i < end; ++i) { long value = arr[i]; - blocks[o++] = (byte)(value.TripleShift(16)); - blocks[o++] = (byte)(value.TripleShift(8)); + blocks[o++] = (byte)(value >>> 16); + blocks[o++] = (byte)(value >>> 8); blocks[o++] = (byte)value; } return sets; @@ -114,8 +113,8 @@ public override int Set(int index, long[] arr, int off, int len) public override void Fill(int fromIndex, int toIndex, long val) { - var block1 = (byte)(val.TripleShift(16)); - var block2 = (byte)(val.TripleShift(8)); + var block1 = (byte)(val >>> 16); + var block2 = (byte)(val >>> 8); var block3 = (byte)val; for (int i = fromIndex * 3, end = toIndex * 3; i < end; i += 3) { @@ -134,7 +133,7 @@ public override void Clear() public override long RamBytesUsed() { return RamUsageEstimator.AlignObjectSize( - RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + 2 * RamUsageEstimator.NUM_BYTES_INT32 // valueCount,bitsPerValue + RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref + RamUsageEstimator.SizeOf(blocks); @@ -145,4 +144,4 @@ public override string ToString() return this.GetType().Name + "(bitsPerValue=" + m_bitsPerValue + ", size=" + Count + ", elements.length=" + blocks.Length + ")"; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/PackedDataInput.cs b/src/Lucene.Net/Util/Packed/PackedDataInput.cs index c859f255b6..94f65b6369 100644 --- a/src/Lucene.Net/Util/Packed/PackedDataInput.cs +++ b/src/Lucene.Net/Util/Packed/PackedDataInput.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Runtime.CompilerServices; @@ -27,7 +26,7 @@ namespace Lucene.Net.Util.Packed /// /// A wrapper to read unaligned, variable-length packed /// integers. This API is much slower than the fixed-length - /// API but can be convenient to save space. + /// API but can be convenient to save space. /// /// @lucene.internal /// @@ -64,7 +63,7 @@ public long ReadInt64(int bitsPerValue) remainingBits = 8; } int bits = Math.Min(bitsPerValue, remainingBits); - r = (r << bits) | ((current.TripleShift((remainingBits - bits))) & ((1L << bits) - 1)); + r = (r << bits) | ((current >>> (remainingBits - bits)) & ((1L << bits) - 1)); bitsPerValue -= bits; remainingBits -= bits; } @@ -81,4 +80,4 @@ public void SkipToNextByte() remainingBits = 0; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/PackedDataOutput.cs b/src/Lucene.Net/Util/Packed/PackedDataOutput.cs index 48e193ac0d..6cfafd924d 100644 --- a/src/Lucene.Net/Util/Packed/PackedDataOutput.cs +++ b/src/Lucene.Net/Util/Packed/PackedDataOutput.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Runtime.CompilerServices; @@ -64,7 +63,7 @@ public void WriteInt64(long value, int bitsPerValue) remainingBits = 8; } int bits = Math.Min(remainingBits, bitsPerValue); - current = current | (((value.TripleShift((bitsPerValue - bits))) & ((1L << bits) - 1)) << (remainingBits - bits)); + current = current | (((value >>> (bitsPerValue - bits)) & ((1L << bits) - 1)) << (remainingBits - bits)); bitsPerValue -= bits; remainingBits -= bits; } @@ -84,4 +83,4 @@ public void Flush() current = 0L; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Packed/PackedInts.cs b/src/Lucene.Net/Util/Packed/PackedInts.cs index 2afe78b143..cccc671b56 100644 --- a/src/Lucene.Net/Util/Packed/PackedInts.cs +++ b/src/Lucene.Net/Util/Packed/PackedInts.cs @@ -1031,7 +1031,7 @@ public static IReaderIterator GetReaderIteratorNoHeader(DataInput @in, Format fo } /// - /// Retrieve as a . + /// Retrieve as a . /// /// @lucene.internal /// @@ -1345,7 +1345,7 @@ public static Writer GetWriter(DataOutput @out, int valueCount, int bitsPerValue /// /// Returns how many bits are required to hold values up - /// to and including . + /// to and including . /// /// @lucene.internal /// @@ -1362,7 +1362,7 @@ public static int BitsRequired(long maxValue) /// /// Calculates the maximum unsigned long that can be expressed with the given - /// number of bits. + /// number of bits. /// /// @lucene.internal /// @@ -1386,7 +1386,7 @@ public static void Copy(Reader src, int srcPos, Mutable dest, int destPos, int l Debugging.Assert(srcPos + len <= src.Count); Debugging.Assert(destPos + len <= dest.Count); } - int capacity = mem.TripleShift(3); + int capacity = mem >>> 3; if (capacity == 0) { for (int i = 0; i < len; ++i) @@ -1505,4 +1505,4 @@ internal static int NumBlocks(long size, int blockSize) return numBlocks; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/PriorityQueue.cs b/src/Lucene.Net/Util/PriorityQueue.cs index e0906122d8..6f3e680b55 100644 --- a/src/Lucene.Net/Util/PriorityQueue.cs +++ b/src/Lucene.Net/Util/PriorityQueue.cs @@ -1,7 +1,5 @@ -using J2N.Numerics; -using Lucene.Net.Support; +using Lucene.Net.Support; using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -368,12 +366,12 @@ private void UpHeap() { int i = size; T node = heap[i]; // save bottom node - int j = i.TripleShift(1); + int j = i >>> 1; while (j > 0 && LessThan(node, heap[j])) { heap[i] = heap[j]; // shift parents down i = j; - j = j.TripleShift(1); + j >>>= 1; } heap[i] = node; // install saved node } @@ -685,12 +683,12 @@ private void UpHeap() { int i = size; T node = heap[i]; // save bottom node - int j = i.TripleShift(1); + int j = i >>> 1; while (j > 0 && LessThan(node, heap[j])) { heap[i] = heap[j]; // shift parents down i = j; - j = j.TripleShift(1); + j >>>= 1; } heap[i] = node; // install saved node } @@ -730,4 +728,4 @@ private void DownHeap() [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")] protected internal T[] HeapArray => heap; } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/RamUsageEstimator.cs b/src/Lucene.Net/Util/RamUsageEstimator.cs index 74915d05ed..6e1f7f818b 100644 --- a/src/Lucene.Net/Util/RamUsageEstimator.cs +++ b/src/Lucene.Net/Util/RamUsageEstimator.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using J2N.Runtime.CompilerServices; +using J2N.Runtime.CompilerServices; using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; @@ -459,10 +458,10 @@ public static long ShallowSizeOfInstance(Type clazz) for (; clazz != null; clazz = clazz.BaseType) { FieldInfo[] fields = clazz.GetFields( - BindingFlags.Instance | - BindingFlags.NonPublic | - BindingFlags.Public | - BindingFlags.DeclaredOnly | + BindingFlags.Instance | + BindingFlags.NonPublic | + BindingFlags.Public | + BindingFlags.DeclaredOnly | BindingFlags.Static); foreach (FieldInfo f in fields) { @@ -621,10 +620,10 @@ private static ClassCache CreateCacheEntry(Type clazz) for (Type c = clazz; c != null; c = c.BaseType) { FieldInfo[] fields = c.GetFields( - BindingFlags.Instance | - BindingFlags.NonPublic | - BindingFlags.Public | - BindingFlags.DeclaredOnly | + BindingFlags.Instance | + BindingFlags.NonPublic | + BindingFlags.Public | + BindingFlags.DeclaredOnly | BindingFlags.Static); foreach (FieldInfo f in fields) { @@ -657,7 +656,7 @@ private static long AdjustForField(long sizeSoFar, FieldInfo f) { Type type = f.FieldType; int fsize = 0; - + if (!(typeof(IntPtr) == type) && !(typeof(UIntPtr) == type)) fsize = type.IsPrimitive ? primitiveSizes[type] : NUM_BYTES_OBJECT_REF; @@ -781,7 +780,7 @@ public object[] Keys /// /// Creates a hash set with the default capacity of 16, - /// load factor of . + /// load factor of . /// public IdentityHashSet() : this(16, DEFAULT_LOAD_FACTOR) @@ -866,7 +865,7 @@ public bool Contains(KType e) /// The implementation is based on the /// finalization step from Austin Appleby's /// MurmurHash3. - /// + /// /// See http://sites.google.com/site/murmurhash/. /// private static int Rehash(object o) @@ -874,11 +873,11 @@ private static int Rehash(object o) int k = RuntimeHelpers.GetHashCode(o); unchecked { - k ^= k.TripleShift(16); + k ^= k >>> 16; k *= (int)0x85ebca6b; - k ^= k.TripleShift(13); + k ^= k >>> 13; k *= (int)0xc2b2ae35; - k ^= k.TripleShift(16); + k ^= k >>> 16; } return k; @@ -1048,4 +1047,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/Sorter.cs b/src/Lucene.Net/Util/Sorter.cs index f26ad62979..1447fd7233 100644 --- a/src/Lucene.Net/Util/Sorter.cs +++ b/src/Lucene.Net/Util/Sorter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using System; using System.Runtime.CompilerServices; @@ -87,14 +86,14 @@ internal virtual void MergeInPlace(int from, int mid, int to) int len11, len22; if (mid - from > to - mid) { - len11 = (mid - from).TripleShift(1); + len11 = (mid - from) >>> 1; first_cut = from + len11; second_cut = Lower(mid, to, first_cut); len22 = second_cut - mid; } else { - len22 = (to - mid).TripleShift(1); + len22 = (to - mid) >>> 1; second_cut = mid + len22; first_cut = Upper(from, mid, second_cut); //len11 = first_cut - from; // LUCENENET: Unnecessary assignment @@ -111,7 +110,7 @@ internal virtual int Lower(int from, int to, int val) int len = to - from; while (len > 0) { - int half = len.TripleShift(1); + int half = len >>> 1; int mid = from + half; if (Compare(mid, val) < 0) { @@ -132,7 +131,7 @@ internal virtual int Upper(int from, int to, int val) int len = to - from; while (len > 0) { - int half = len.TripleShift(1); + int half = len >>> 1; int mid = from + half; if (Compare(val, mid) < 0) { @@ -256,7 +255,7 @@ internal virtual void BinarySort(int from, int to, int i) int h = i - 1; while (l <= h) { - int mid = (l + h).TripleShift(1); + int mid = (l + h) >>> 1; int cmp = Compare(i, mid); if (cmp < 0) { @@ -349,7 +348,7 @@ internal virtual void SiftDown(int i, int from, int to) [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int HeapParent(int from, int i) { - return ((i - 1 - from).TripleShift(1)) + from; + return ((i - 1 - from) >>> 1) + from; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -358,4 +357,4 @@ internal static int HeapChild(int from, int i) return ((i - from) << 1) + 1 + from; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/StringHelper.cs b/src/Lucene.Net/Util/StringHelper.cs index 239479a694..207572eb7b 100644 --- a/src/Lucene.Net/Util/StringHelper.cs +++ b/src/Lucene.Net/Util/StringHelper.cs @@ -186,7 +186,7 @@ private static bool SliceEquals(this BytesRef sliceToTest, BytesRef other, int p /// /// Returns the MurmurHash3_x86_32 hash. - /// Original source/tests at https://github.com/yonik/java_util/. + /// Original source/tests at https://github.com/yonik/java_util/. /// public static int Murmurhash3_x86_32(byte[] data, int offset, int len, int seed) { @@ -235,18 +235,18 @@ public static int Murmurhash3_x86_32(byte[] data, int offset, int len, int seed) h1 ^= len; // fmix(h1); - h1 ^= h1.TripleShift(16); + h1 ^= h1 >>> 16; h1 *= unchecked((int)0x85ebca6b); - h1 ^= h1.TripleShift(13); + h1 ^= h1 >>> 13; h1 *= unchecked((int)0xc2b2ae35); - h1 ^= h1.TripleShift(16); + h1 ^= h1 >>> 16; return h1; } /// /// Returns the MurmurHash3_x86_32 hash. - /// Original source/tests at https://github.com/yonik/java_util/. + /// Original source/tests at https://github.com/yonik/java_util/. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int Murmurhash3_x86_32(BytesRef bytes, int seed) @@ -254,4 +254,4 @@ public static int Murmurhash3_x86_32(BytesRef bytes, int seed) return Murmurhash3_x86_32(bytes.Bytes, bytes.Offset, bytes.Length, seed); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/TimSorter.cs b/src/Lucene.Net/Util/TimSorter.cs index 591714f619..87393afd2f 100644 --- a/src/Lucene.Net/Util/TimSorter.cs +++ b/src/Lucene.Net/Util/TimSorter.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Runtime.CompilerServices; @@ -76,7 +75,7 @@ internal static int MinRun(int length) while (n >= 64) { r |= n & 1; - n = n.TripleShift(1); + n >>>= 1; } int minRun = n + r; if (Debugging.AssertsEnabled) Debugging.Assert(minRun >= MINRUN && minRun <= THRESHOLD); @@ -403,7 +402,7 @@ internal virtual int LowerSaved(int from, int to, int val) int len = to - from; while (len > 0) { - int half = len.TripleShift(1); + int half = len >>> 1; int mid = from + half; if (CompareSaved(val, mid) > 0) { @@ -424,7 +423,7 @@ internal virtual int UpperSaved(int from, int to, int val) int len = to - from; while (len > 0) { - int half = len.TripleShift(1); + int half = len >>> 1; int mid = from + half; if (CompareSaved(val, mid) < 0) { @@ -496,4 +495,4 @@ internal virtual int UpperSaved3(int from, int to, int val) /// protected abstract int CompareSaved(int i, int j); } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/ToStringUtils.cs b/src/Lucene.Net/Util/ToStringUtils.cs index e56c6902e5..c9351720c7 100644 --- a/src/Lucene.Net/Util/ToStringUtils.cs +++ b/src/Lucene.Net/Util/ToStringUtils.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using System.Globalization; +using System.Globalization; using System.Text; using Float = J2N.Numerics.Single; @@ -61,11 +60,11 @@ public static void ByteArray(StringBuilder buffer, byte[] bytes) public static string Int64Hex(long x) { char[] asHex = new char[16]; - for (int i = 16; --i >= 0; x = x.TripleShift(4)) + for (int i = 16; --i >= 0; x >>>= 4) { asHex[i] = HEX[(int)x & 0x0F]; } return "0x" + new string(asHex); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Util/WAH8DocIdSet.cs b/src/Lucene.Net/Util/WAH8DocIdSet.cs index 04def589a5..600a7a9c0c 100644 --- a/src/Lucene.Net/Util/WAH8DocIdSet.cs +++ b/src/Lucene.Net/Util/WAH8DocIdSet.cs @@ -1,5 +1,4 @@ -using J2N.Numerics; -using Lucene.Net.Diagnostics; +using Lucene.Net.Diagnostics; using Lucene.Net.Support; using System; using System.Collections.Generic; @@ -277,7 +276,7 @@ protected internal override bool LessThan(Iterator a, Iterator b) internal static int WordNum(int docID) { if (Debugging.AssertsEnabled) Debugging.Assert(docID >= 0); - return docID.TripleShift(3); + return docID >>> 3; } /// @@ -347,11 +346,11 @@ internal virtual void WriteHeader(bool reverse, int cleanLength, int dirtyLength @out.WriteByte((byte)token); if (cleanLengthMinus2 > 0x03) { - @out.WriteVInt32(cleanLengthMinus2.TripleShift(2)); + @out.WriteVInt32(cleanLengthMinus2 >>> 2); } if (dirtyLength > 0x07) { - @out.WriteVInt32(dirtyLength.TripleShift(3)); + @out.WriteVInt32(dirtyLength >>> 3); } } @@ -631,7 +630,7 @@ public override DocIdSetIterator GetIterator() [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ReadCleanLength(ByteArrayDataInput @in, int token) { - int len = (token.TripleShift(4)) & 0x07; + int len = (token >>> 4) & 0x07; int startPosition = @in.Position; if ((len & 0x04) != 0) { @@ -812,7 +811,7 @@ internal virtual int ForwardBinarySearch(int targetWordNum) // we found a window containing our target, let's binary search now while (lo <= hi) { - int mid = (lo + hi).TripleShift(1); + int mid = (lo + hi) >>> 1; int midWordNum = (int)wordNums.Get(mid); if (midWordNum <= targetWordNum) { @@ -885,7 +884,7 @@ public override int NextDoc() if (bitList != 0) // there are remaining bits in the current word { docID = (wordNum << 3) | ((bitList & 0x0F) - 1); - bitList = bitList.TripleShift(4); + bitList >>>= 4; return docID; } NextWord(); @@ -896,7 +895,7 @@ public override int NextDoc() bitList = BitUtil.BitList(word); if (Debugging.AssertsEnabled) Debugging.Assert(bitList != 0); docID = (wordNum << 3) | ((bitList & 0x0F) - 1); - bitList = bitList.TripleShift(4); + bitList >>>= 4; return docID; }