Class BooleanCopyKernel

java.lang.Object
io.deephaven.engine.table.impl.util.copy.BooleanCopyKernel
All Implemented Interfaces:
CopyKernel

public class BooleanCopyKernel extends Object implements CopyKernel
  • Field Details

  • Method Details

    • conditionalCopy

      public static <T extends Any> void conditionalCopy(WritableBooleanChunk<T> output, boolean[] baseInput, boolean[] overInput, long[] useOverInput, int srcOffset, int dstOffset, int length)
      Copy values from baseInput / overInput into output.

      Pseudo-implementation: output[i] = useOverInput.forBit(i) ? overInput[i] : baseInput[i];

      Note that useOverInput should cover the same data range as baseInput such that useOverInput.length == (overInput.length + 63) / 64 is true.

      Parameters:
      output - the output chunk
      baseInput - the input array to use when bit in useOverInput is zero (array)
      overInput - the input array to use when bit in useOverInput is one (array)
      useOverInput - the bitset array to indicate whether to use baseInput or overInput for each element
      srcOffset - the offset in baseInput/overInput
      dstOffset - the offset in output
      length - the number of elements to copy
    • conditionalCopy

      public <T extends Any> void conditionalCopy(WritableChunk<T> output, Object baseInput, Object overInput, long[] useOverInput, int srcOffset, int dstOffset, int length)
      Description copied from interface: CopyKernel
      Copy values from baseInput / overInput into output.

      Pseudo-implementation: output[i] = useOverInput.forBit(i) ? overInput[i] : baseInput[i];

      Note that useOverInput should cover the same data range as baseInput such that useOverInput.length == (overInput.length + 63) / 64 is true.

      Specified by:
      conditionalCopy in interface CopyKernel
      Parameters:
      output - the output chunk
      baseInput - the input array to use when bit in useOverInput is zero (array)
      overInput - the input array to use when bit in useOverInput is one (array)
      useOverInput - the bitset array to indicate whether to use baseInput or overInput for each element
      srcOffset - the offset in baseInput/overInput
      dstOffset - the offset in output
      length - the number of elements to copy