readArray method

  1. @override
List<List<E>> readArray(
  1. MemoryPointer<RType> p,
  2. int count
)
override

Implementation

@override
List<List<E>> readArray(MemoryPointer p, int count) {
  // count groups of `this.count` contiguous elements, read them all in one
  // flat pass (so stride/byteSize logic stays entirely in `inner`) and chunk.
  final flat = inner.readArray(p, count * this.count);
  return .generate(
    count,
    (i) => flat.sublist(i * this.count, (i + 1) * this.count),
  );
}