vpi.Stream

class vpi.Stream

Create a stream (queue) to run algorithms on.

All algorithms require a stream where it will be placed for execution. There are three ways of defining the stream:

  1. Define it as an argument to the algorithm call;

  2. Define it via a with statement, where the stream is defined for all algorithms called within that with statement;

  3. None of the above, the default stream is used.

Hint

All algorithms in a stream execute asynchronously. To force them to execute call sync.

Static methods

vpi.Stream.current()

The stream that is currently in use for processing.

vpi.Stream.default()

The stream that is used when no other stream is specified.

Methods

sync(self)

Synchronize the stream.