Ple Read Plan#

struct PleReadSpan#

Requested source bytes and their destination in a caller-owned packed buffer.

Public Members

size_t shard#
int64_t offset#
size_t bytes#
size_t destination#
struct PleReadCopy#

Byte offsets relative to one read buffer and the caller’s packed destination buffer.

Public Members

size_t source#
size_t destination#
size_t bytes#
struct PleReadRange#

One physical read and the useful byte ranges to extract from it.

Public Members

size_t shard#
int64_t offset#
size_t bytes#
std::vector<PleReadCopy> copies#
std::vector<PleReadRange> trt_edgellm::rt::planPleReads(
std::vector<PleReadSpan> const &spans,
std::vector<int64_t> const &shardEnds,
size_t alignment,
size_t maxReadBytes
)#

Plan non-overlapping reads sorted by shard and offset, merging only aligned overlap or adjacency. Reads are alignment-sized except at shard ends, and no read exceeds maxReadBytes. Empty input returns no reads. Spans must be nonempty and fit their shard; destination regions must be distinct. alignment must be positive and maxReadBytes must be a positive multiple of it, both fitting INT64.