pub trait GraphOp: Send + 'static {
// Required method
fn record(&mut self, ctx: &mut GraphRecordCtx<'_>) -> Result<(), GpuError>;
// Provided method
fn op_name(&self) -> &'static str { ... }
}Expand description
A single op in a graph script.
Each op records itself onto the captured stream. The op is
owned by the script — record takes &mut self so an op may
stash temporaries (e.g. a borrowed-out Arc<DeviceSlice>) for
the lifetime of the recording. After record returns, the op
is dropped.