device_to_device ~into_merge_buffer:not_No ~dst ~src used to verify its merge buffer node by requiring that dst is the context coming from linking the code consuming the merge buffer. This is half-static in that the dependency between "producing" and "consuming" the merge buffers is directly expressed in the source. But it goes against the typical uses of context chaining where routines executed later link to contexts of routines executed earlier. Moreover, we verify merge buffers dynamically, so I removed this half-static verification.
But if we convert device_to_device to returning a routine rather than directly scheduling the copying (or "streaming" e.g. aliasing), we can introduce proper static verification of merge buffer nodes. The device_to_device's context would be linked with the code consuming the merge buffer.
device_to_device ~into_merge_buffer:not_No ~dst ~src
used to verify its merge buffer node by requiring thatdst
is the context coming from linking the code consuming the merge buffer. This is half-static in that the dependency between "producing" and "consuming" the merge buffers is directly expressed in the source. But it goes against the typical uses of context chaining where routines executed later link to contexts of routines executed earlier. Moreover, we verify merge buffers dynamically, so I removed this half-static verification.But if we convert
device_to_device
to returning a routine rather than directly scheduling the copying (or "streaming" e.g. aliasing), we can introduce proper static verification of merge buffer nodes. Thedevice_to_device
's context would be linked with the code consuming the merge buffer.