vpi.execute

vpi.execute(host_function: Callable[[], None], *, stream: vpi.Stream = None) None

Executes a function on the stream.

Submits a user-defined host-side function to be executed on the stream. The signature of the host function is as follows: host_function() -> None.

Hint

The execution happens in the stream (queue), allowing to inspect its sequence state. The function may be a Python lambda function.

Parameters
  • host_function (function) – The Python-based function to be executed on the stream. It expects no argument and returns no value.

  • stream (vpi.Stream, optional) – The stream to be used by the algorithm.

Caution

Accessing the content of containers in the host-side function have undefined behavior. This also happens for: submitting operations or executing other host functions on any stream.