Skip to main content

//clika-runtime/io.clika.runtime/TensorCallback

TensorCallback

[common]
fun interface TensorCallback

A callback carrying a tensor: Tensor.onComplete's notification. The Tensor handed in is the callback's for the duration of the call only: whatever reference it does not Tensor.release itself is released when the callback returns. A callback that needs the value past its return reads it out (Tensor.item, the array readers) inside the call.

Fires on the runtime's callback pool, never the registering thread; keep the body short and never block in it.

Functions​

NameSummary
run[common]
abstract fun run(t: Tensor)