The main entry-point to the API is the VPIStream object. More...
Typedefs | |
typedef struct VPIStreamImpl * | VPIStream |
A handle to a stream. | |
Functions | |
VPIStatus | vpiStreamCreate (uint32_t flags, VPIStream *stream) |
Create a stream instance. More... | |
void | vpiStreamDestroy (VPIStream stream) |
Destroy a stream instance and deallocate all HW resources. More... | |
VPIStatus | vpiStreamSync (VPIStream stream) |
Blocks the calling thread until all submitted commands in this stream queue are done (queue is empty). More... | |
VPIStatus | vpiStreamWaitFor (VPIStream stream, VPIEvent event) |
Pushes a command that blocks the processing of all future commands submitted to the stream until the event is signaled. More... | |
VPIStatus | vpiStreamGetThreadHandle (VPIStream stream, VPINativeThreadHandle *handle) |
Returns OS-specific handle of the background stream processing thread. More... | |
VPIStatus | vpiStreamGetFlags (VPIStream stream, uint32_t *flags) |
Gets the VPIStream flags passed during its creation. More... | |
Memory creation flags. | |
These flags can be used when creating images, pyramids or arrays. | |
enum | VPIBackend |
VPI Backend types. More... | |
The main entry-point to the API is the VPIStream object.
This object represents a command queue (FIFO) storing a list of commands to execute. Commands might comprise running a particular CV algorithm or signaling an event in a particular backend. This allows the API functions to be executed asynchronously with respect to the calling thread. Invoking any CV function simply pushes a corresponding command to the command queue in the VPIStream instance and immediately returns. The queued commands then get consumed and dispatched to the associated backend device.
enum VPIBackend |
#include <vpi/Types.h>
VPI Backend types.
Enumerator | |
---|---|
VPI_BACKEND_CPU | CPU backend. |
VPI_BACKEND_CUDA | CUDA backend. |
VPI_BACKEND_PVA | PVA backend. |
VPI_BACKEND_VIC | VIC backend. |
VPI_BACKEND_INVALID | Invalid backend. |
#include <vpi/Stream.h>
Create a stream instance.
[in] | flags | Stream flags. Here it can be specified in what backends are enabled in it by or-ing VPIBackend flags together. Set flags to 0 to enable it in all backends supported by the active VPI context. |
[out] | stream | pointer to stream handle |
void vpiStreamDestroy | ( | VPIStream | stream | ) |
#include <vpi/Stream.h>
Destroy a stream instance and deallocate all HW resources.
This operation will implicitly synchronize the stream to guarantee that all operations submitted to it are completed.
[in] | stream | Stream handle. If can be NULL, in this case the function won't do anything. |
#include <vpi/Stream.h>
Gets the VPIStream flags passed during its creation.
[in] | stream | Stream handle. |
[out] | flags | Pointer to variable where the flags will be stored into. |
VPIStatus vpiStreamGetThreadHandle | ( | VPIStream | stream, |
VPINativeThreadHandle * | handle | ||
) |
#include <vpi/Stream.h>
Returns OS-specific handle of the background stream processing thread.
[in] | stream | stream handle |
[out] | handle | stream processing thread handle |
#include <vpi/Stream.h>
Blocks the calling thread until all submitted commands in this stream queue are done (queue is empty).
This function call is equivalent to atomically calling vpiEventRecord followed by vpiStreamWaitFor.
[in] | stream | stream handle |
#include <vpi/Stream.h>
Pushes a command that blocks the processing of all future commands submitted to the stream until the event is signaled.
[in] | stream | Stream handle |
[in] | event | event handle |