Exemplo n.º 1
0
        private int Iterations(int mem)
        {
            int iterations = bulkOperation.ComputeIterations(m_valueCount, mem);

            if (packedIntsVersion < PackedInt32s.VERSION_BYTE_ALIGNED)
            {
                // make sure iterations is a multiple of 8
                iterations = (iterations + 7) & unchecked ((int)0xFFFFFFF8);
            }
            return(iterations);
        }
Exemplo n.º 2
0
 internal PackedWriter(PackedInts.Format format, DataOutput @out, int valueCount, int bitsPerValue, int mem)
     : base(@out, valueCount, bitsPerValue)
 {
     this.Format_Renamed = format;
     Encoder = BulkOperation.Of(format, bitsPerValue);
     Iterations = Encoder.ComputeIterations(valueCount, mem);
     NextBlocks = new byte[Iterations * Encoder.ByteBlockCount()];
     NextValues = new long[Iterations * Encoder.ByteValueCount()];
     Off = 0;
     Written = 0;
     Finished = false;
 }
Exemplo n.º 3
0
 internal PackedWriter(PackedInt32s.Format format, DataOutput @out, int valueCount, int bitsPerValue, int mem)
     : base(@out, valueCount, bitsPerValue)
 {
     this.format = format;
     encoder     = BulkOperation.Of(format, bitsPerValue);
     iterations  = encoder.ComputeIterations(valueCount, mem);
     nextBlocks  = new byte[iterations * encoder.ByteBlockCount];
     nextValues  = new long[iterations * encoder.ByteValueCount];
     off         = 0;
     written     = 0;
     finished    = false;
 }
Exemplo n.º 4
0
 internal PackedWriter(PackedInts.Format format, DataOutput @out, int valueCount, int bitsPerValue, int mem)
     : base(@out, valueCount, bitsPerValue)
 {
     this.Format_Renamed = format;
     Encoder             = BulkOperation.Of(format, bitsPerValue);
     Iterations          = Encoder.ComputeIterations(valueCount, mem);
     NextBlocks          = new byte[Iterations * Encoder.ByteBlockCount()];
     NextValues          = new long[Iterations * Encoder.ByteValueCount()];
     Off      = 0;
     Written  = 0;
     Finished = false;
 }