NVIDIA DeepStream SDK API Reference

7.0 Release
infer_simple_context.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __NVDSINFERSERVER_SIMPLE_CONTEXT_H__
14 #define __NVDSINFERSERVER_SIMPLE_CONTEXT_H__
15 
16 #include "infer_base_backend.h"
17 #include "infer_base_context.h"
18 #include "infer_cuda_utils.h"
19 #include "infer_datatypes.h"
20 #include "infer_utils.h"
21 
22 namespace nvdsinferserver {
23 
24 
26 public:
28  ~InferSimpleContext() override;
29 
30 protected:
32  const ic::BackendParams& params, int maxBatchSize,
35  const ic::InferenceConfig& config, BaseBackend& backend) override;
36  NvDsInferStatus deinit() override;
37 
38 private:
39  // should not called
40  NvDsInferStatus createPreprocessor(
41  const ic::PreProcessParams& params,
42  std::vector<UniqPreprocessor>& processors) override;
43  NvDsInferStatus createPostprocessor(
44  const ic::PostProcessParams& params,
45  UniqPostprocessor& processor) override;
46  NvDsInferStatus allocateResource(
47  const ic::InferenceConfig& config) override;
48 
49  void getNetworkInputInfo(NvDsInferNetworkInfo& networkInfo) override
50  {
51  networkInfo = m_NetworkImageInfo;
52  }
53  void notifyError(NvDsInferStatus status) override {}
54  SharedCuStream& mainStream() override { return m_Stream; }
55 
56 private:
57  // Optional, not needed
58  NvDsInferNetworkInfo m_NetworkImageInfo{0, 0, 0};
59 
60  SharedCuStream m_Stream{nullptr};
61 };
62 
63 } // namespace nvdsinferserver
64 
65 #endif //__NVDSINFERSERVER_SIMPLE_CONTEXT_H__
nvdsinferserver
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
Definition: infer_custom_process.h:24
nvdsinferserver::InferSimpleContext::InferSimpleContext
InferSimpleContext()
nvdsinferserver::InferBaseContext::maxBatchSize
int maxBatchSize() const
Definition: infer_base_context.h:99
nvdsinferserver::InferSimpleContext::fixateInferenceInfo
NvDsInferStatus fixateInferenceInfo(const ic::InferenceConfig &config, BaseBackend &backend) override
infer_datatypes.h
Header file for the data types used in the inference processing.
nvdsinferserver::InferSimpleContext::~InferSimpleContext
~InferSimpleContext() override
nvdsinferserver::InferSimpleContext::deinit
NvDsInferStatus deinit() override
nvdsinferserver::InferSimpleContext::createNNBackend
NvDsInferStatus createNNBackend(const ic::BackendParams &params, int maxBatchSize, UniqBackend &backend)
infer_utils.h
Header file containing utility functions and classes used by the nvinferserver low level library.
nvdsinferserver::UniqBackend
std::unique_ptr< BaseBackend > UniqBackend
Definition: infer_base_backend.h:212
NvDsInferNetworkInfo
Holds information about the model network.
Definition: nvdsinfer.h:110
infer_cuda_utils.h
Header file declaring utility classes for CUDA memory management, CIDA streams and events.
nvdsinferserver::SharedCuStream
std::shared_ptr< CudaStream > SharedCuStream
Cuda based pointers.
Definition: infer_common.h:84
nvdsinferserver::InferBaseContext::backend
BaseBackend * backend()
Definition: infer_base_context.h:101
nvdsinferserver::InferBaseContext
The base class for handling the inference context.
Definition: infer_base_context.h:52
nvdsinferserver::InferBaseContext::config
const ic::InferenceConfig & config() const
Definition: infer_base_context.h:98
nvdsinferserver::InferSimpleContext
Definition: infer_simple_context.h:25
nvdsinferserver::UniqPostprocessor
std::unique_ptr< BasePostprocessor > UniqPostprocessor
Processor interfaces.
Definition: infer_common.h:98
nvdsinferserver::BaseBackend
Base class of inference backend processing.
Definition: infer_base_backend.h:40
infer_base_backend.h
Header file for inference processing backend base class.
infer_base_context.h
Header file of the base class for inference context.
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:218