Class OOCInstruction.OOCMatrixBlockTracker

java.lang.Object
org.apache.sysds.runtime.instructions.ooc.OOCInstruction.OOCMatrixBlockTracker
Enclosing class:
OOCInstruction

public static class OOCInstruction.OOCMatrixBlockTracker extends Object
Tracks blocks and their counts to enable early emission once all blocks for a given index are processed.
  • Constructor Details

    • OOCMatrixBlockTracker

      public OOCMatrixBlockTracker(long emitThreshold)
  • Method Details

    • putAndIncrementCount

      public boolean putAndIncrementCount(Long idx, MatrixBlock block)
      Adds or updates a block for the given index and updates its internal count.
      Parameters:
      idx - block index
      block - MatrixBlock
      Returns:
      true if the block count reached the threshold (ready to emit), false otherwise
    • incrementCount

      public boolean incrementCount(Long idx)
    • putAndInitCount

      public void putAndInitCount(Long idx, MatrixBlock block)
    • get

      public MatrixBlock get(Long idx)
    • remove

      public void remove(Long idx)