47#ifndef DW_INTEROP_TENSORSTREAMER_H_
48#define DW_INTEROP_TENSORSTREAMER_H_
dwStatus
Status definition.
NVIDIA DriveWorks API: DNNTensor Structures and Methods
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
struct dwContextObject * dwContextHandle_t
Context handle.
dwDNNTensorType
Speficies the type of a tensor.
struct dwDNNTensorObject * dwDNNTensorHandle_t
Handles representing Deep Neural Network interface.
Specifies DNNTensor properties.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_producerSend(dwDNNTensorHandle_t tensor, dwDNNTensorStreamerHandle_t streamer)
Sends an tensor through the streamer acting as the producer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_consumerReceive(dwDNNTensorHandle_t *tensor, dwTime_t timeout_us, dwDNNTensorStreamerHandle_t streamer)
Receive a pointer to a dwDNNTensorHandle_t from the streamer, acting as a consumer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_initialize(dwDNNTensorStreamerHandle_t *streamer, const dwDNNTensorProperties *from, dwDNNTensorType to, dwContextHandle_t ctx)
Creates and initializes the tensor streamer capable of moving tensors between different API types.
struct dwDNNTensorStreamerObject * dwDNNTensorStreamerHandle_t
Handle for dnn tensor streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_setCUDAStream(cudaStream_t stream, dwDNNTensorStreamerHandle_t streamer)
Sets the CUDA stream for CUDA related streaming operations such as post and receive.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_getOutputProperties(dwDNNTensorProperties *props, dwDNNTensorStreamerHandle_t const streamer)
Get tensor properties of the tensor received from the streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_release(dwDNNTensorStreamerHandle_t streamer)
Releases the tensor streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_producerReturn(dwDNNTensorHandle_t *tensor, dwTime_t timeout_us, dwDNNTensorStreamerHandle_t streamer)
The producer streamer waits for the tensor sent to be returned by the consumer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_consumerReturn(dwDNNTensorHandle_t *tensor, dwDNNTensorStreamerHandle_t streamer)
Return the received tensor back to the producer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_getCUDAStream(cudaStream_t *stream, dwDNNTensorStreamerHandle_t streamer)
Get CUDA stream used by the tensor streamer.