Class BulkOperationPacked

    • Constructor Summary

      Constructors 
      Constructor Description
      BulkOperationPacked​(int bitsPerValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int byteBlockCount()
      The minimum number of byte blocks to encode in a single iteration, when using byte encoding.
      int byteValueCount()
      The number of values that can be stored in PackedInts.Decoder.byteBlockCount() byte blocks.
      void decode​(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
      Read 8 * iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
      void decode​(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
      Read 8 * iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
      void decode​(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations)
      Read iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
      void decode​(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations)
      Read iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
      void encode​(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
      Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
      void encode​(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
      Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
      void encode​(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
      Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
      void encode​(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
      Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
      int longBlockCount()
      The minimum number of long blocks to encode in a single iteration, when using long encoding.
      int longValueCount()
      The number of values that can be stored in PackedInts.Decoder.longBlockCount() long blocks.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bitsPerValue

        private final int bitsPerValue
      • longBlockCount

        private final int longBlockCount
      • longValueCount

        private final int longValueCount
      • byteBlockCount

        private final int byteBlockCount
      • byteValueCount

        private final int byteValueCount
      • mask

        private final long mask
      • intMask

        private final int intMask
    • Constructor Detail

      • BulkOperationPacked

        public BulkOperationPacked​(int bitsPerValue)
    • Method Detail

      • longBlockCount

        public int longBlockCount()
        Description copied from interface: PackedInts.Decoder
        The minimum number of long blocks to encode in a single iteration, when using long encoding.
      • byteBlockCount

        public int byteBlockCount()
        Description copied from interface: PackedInts.Decoder
        The minimum number of byte blocks to encode in a single iteration, when using byte encoding.
      • decode

        public void decode​(long[] blocks,
                           int blocksOffset,
                           long[] values,
                           int valuesOffset,
                           int iterations)
        Description copied from interface: PackedInts.Decoder
        Read iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
        Parameters:
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start reading blocks
        values - the values buffer
        valuesOffset - the offset where to start writing values
        iterations - controls how much data to decode
      • decode

        public void decode​(byte[] blocks,
                           int blocksOffset,
                           long[] values,
                           int valuesOffset,
                           int iterations)
        Description copied from interface: PackedInts.Decoder
        Read 8 * iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
        Parameters:
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start reading blocks
        values - the values buffer
        valuesOffset - the offset where to start writing values
        iterations - controls how much data to decode
      • decode

        public void decode​(long[] blocks,
                           int blocksOffset,
                           int[] values,
                           int valuesOffset,
                           int iterations)
        Description copied from interface: PackedInts.Decoder
        Read iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
        Parameters:
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start reading blocks
        values - the values buffer
        valuesOffset - the offset where to start writing values
        iterations - controls how much data to decode
      • decode

        public void decode​(byte[] blocks,
                           int blocksOffset,
                           int[] values,
                           int valuesOffset,
                           int iterations)
        Description copied from interface: PackedInts.Decoder
        Read 8 * iterations * blockCount() blocks from blocks, decode them and write iterations * valueCount() values into values.
        Parameters:
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start reading blocks
        values - the values buffer
        valuesOffset - the offset where to start writing values
        iterations - controls how much data to decode
      • encode

        public void encode​(long[] values,
                           int valuesOffset,
                           long[] blocks,
                           int blocksOffset,
                           int iterations)
        Description copied from interface: PackedInts.Encoder
        Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
        Parameters:
        values - the values buffer
        valuesOffset - the offset where to start reading values
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start writing blocks
        iterations - controls how much data to encode
      • encode

        public void encode​(int[] values,
                           int valuesOffset,
                           long[] blocks,
                           int blocksOffset,
                           int iterations)
        Description copied from interface: PackedInts.Encoder
        Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
        Parameters:
        values - the values buffer
        valuesOffset - the offset where to start reading values
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start writing blocks
        iterations - controls how much data to encode
      • encode

        public void encode​(long[] values,
                           int valuesOffset,
                           byte[] blocks,
                           int blocksOffset,
                           int iterations)
        Description copied from interface: PackedInts.Encoder
        Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
        Parameters:
        values - the values buffer
        valuesOffset - the offset where to start reading values
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start writing blocks
        iterations - controls how much data to encode
      • encode

        public void encode​(int[] values,
                           int valuesOffset,
                           byte[] blocks,
                           int blocksOffset,
                           int iterations)
        Description copied from interface: PackedInts.Encoder
        Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
        Parameters:
        values - the values buffer
        valuesOffset - the offset where to start reading values
        blocks - the long blocks that hold packed integer values
        blocksOffset - the offset where to start writing blocks
        iterations - controls how much data to encode