Fifo.destroy()
Info | Value |
---|---|
Package | mvnc |
Module | mvncapi |
Version | 2.0 |
See also | Fifo, Fifo.allocate() |
Overview
This method destroys the Fifo and frees associated resources. This must be called for every Fifo created.
Syntax
fifo.destroy()
Parameters
None.
Return
None
Raises
Exception with a status code from Status if underlying function calls return a status other than Status.OK.
Notes
- All elements must be removed from the Fifo before calling this method.
- For input Fifos (type FifoType.HOST_WO), elements are removed by calling Graph.queue_inference().
- For output Fifos (type FifoType.HOST_RO), elements are removed by calling Fifo.read_elem().
Example
from mvnc import mvncapi
#
# Open a Device, create a Graph, and load graph data from file...
#
# Allocate the Graph and create and allocate two associate Fifos for input and output
input_fifo, output_fifo = graph.allocate_with_fifos(device, graph_buffer)
#
# Use the Fifos...
#
# Destroy the Fifos
input_fifo.destroy()
output_fifo.destroy()
#
# Perform other clean up...
#