Open pattonw opened 3 years ago
Will and I talked about this and think the best solution would be to calculate "valid", "overhang" or "shrink" on the write ROI only. The user can pass in either a total_write_roi or a total_read_roi, this can be internally converted to an internal total_write_roi, and then "valid" skips blocks whose write_roi lies outside of the total_write_roi. "overhang" adds all blocks whose write_roi overlaps with the total_write_roi. "shrink" shrinks the write_roi of the final block to fit within the total_write_roi. In every case, the read context stays the same.
Since "valid" fit would be missing at most 1 write roi block whose read roi might go out of the total roi, I would expect that an "overhang" fit would add at most 1 block on each axis. This is not the case though since a valid fit checks:
total_roi.contains(b.read_roi)
, and the "overhang" checkstotal_roi.contains(b.write_roi.get_begin())
.I've added an example to the documentation:
Documentation accurately describes the current functionality.
Is this meant to be or should we change the "overhang" check to something like
total_write_roi.contains(b.write_roi.get_begin())