pub unsafe fn handle_with(
call_frame: *mut XLA_FFI_CallFrame,
memory: Memory,
body: impl FnOnce(&FfiAttrs, &[FfiBuffer], &mut [FfiBuffer]) -> Result<(), String>,
) -> *mut XLA_FFI_ErrorExpand description
handle with the call’s attributes, for buffers in memory.
With Memory::Cuda, the body sees host copies of the device buffers,
so the same body serves handlers registered for the host and for CUDA
devices (at the cost of the copies and of a synchronization).
§Safety
call_frame must be the pointer XLA passed to the handler, whose
buffers are in memory.