Function withPlanesInto

Validates and exposes multiple source and destination planes as one synchronous kernel invocation.

bool withPlanesInto(Source, Destination)(
  scope const ref RasterView!Source source,
  scope const(size_t)[] sourcePlanes,
  scope ref WritableRasterView!Destination destination,
  scope const(size_t)[] destinationPlanes,
  scope RasterPlaneWindow!Source[] sourceWindows,
  scope WritableRasterPlaneWindow!Destination[] destinationWindows,
  scope nothrow @nogc @safe void delegate(scope const(RasterPlaneWindow!Source)[] sources, scope WritableRasterPlaneWindow!Destination[] destinations) kernel
) nothrow @nogc @safe;

sourceWindows and destinationWindows are caller-owned workspace. No allocation is performed. Source and destination sample types may differ. The callback must not retain either window array or start work that outlives the view borrows.

Source/source aliasing is allowed because sources are read-only. Any destination/destination or source/destination byte-envelope overlap is rejected before the callback. The check is conservative: intersecting envelopes are rejected even when individual samples might be disjoint.