TensorRT 8.6.1
NvInferRuntimeCommon.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2023 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 NV_INFER_RUNTIME_COMMON_H
14#define NV_INFER_RUNTIME_COMMON_H
15
26#include "NvInferRuntimeBase.h"
28
29namespace nvinfer1
30{
48
50{
51public:
53 using PluginLibraryHandle = void*;
65 virtual bool registerCreator(IPluginCreator& creator, AsciiChar const* const pluginNamespace) noexcept = 0;
66
75 virtual IPluginCreator* const* getPluginCreatorList(int32_t* const numCreators) const noexcept = 0;
76
88 virtual IPluginCreator* getPluginCreator(AsciiChar const* const pluginName, AsciiChar const* const pluginVersion,
89 AsciiChar const* const pluginNamespace = "") noexcept
90 = 0;
91
92 // @cond SuppressDoxyWarnings
93 IPluginRegistry() = default;
94 IPluginRegistry(IPluginRegistry const&) = delete;
96 IPluginRegistry& operator=(IPluginRegistry const&) & = delete;
97 IPluginRegistry& operator=(IPluginRegistry&&) & = delete;
98// @endcond
99
100protected:
101 virtual ~IPluginRegistry() noexcept = default;
102
103public:
113 //
120 virtual void setErrorRecorder(IErrorRecorder* const recorder) noexcept = 0;
121
137 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
138
154 virtual bool deregisterCreator(IPluginCreator const& creator) noexcept = 0;
155
164 virtual bool isParentSearchEnabled() const = 0;
165
173 virtual void setParentSearchEnabled(bool const enabled) = 0;
174
183 virtual PluginLibraryHandle loadLibrary(AsciiChar const* pluginPath) noexcept = 0;
184
191 virtual void deregisterLibrary(PluginLibraryHandle handle) noexcept = 0;
192};
193
194} // namespace nvinfer1
195
196#endif /* NV_INFER_RUNTIME_COMMON_H */
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeBase.h:694
Plugin creator class for user implemented layers.
Definition: NvInferRuntimePlugin.h:803
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:50
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
Get the ErrorRecorder assigned to this interface.
virtual PluginLibraryHandle loadLibrary(AsciiChar const *pluginPath) noexcept=0
Load and register a shared library of plugins.
void * PluginLibraryHandle
Pointer for plugin library handle.
Definition: NvInferRuntimeCommon.h:53
virtual bool isParentSearchEnabled() const =0
Return whether the parent registry will be searched if a plugin is not found in this registry default...
virtual bool registerCreator(IPluginCreator &creator, AsciiChar const *const pluginNamespace) noexcept=0
Register a plugin creator. Returns false if one with same type is already registered.
virtual IPluginCreator * getPluginCreator(AsciiChar const *const pluginName, AsciiChar const *const pluginVersion, AsciiChar const *const pluginNamespace="") noexcept=0
Return plugin creator based on plugin name, version, and namespace associated with plugin during netw...
virtual void setErrorRecorder(IErrorRecorder *const recorder) noexcept=0
Set the ErrorRecorder for this interface.
virtual void setParentSearchEnabled(bool const enabled)=0
Set whether the parent registry will be searched if a plugin is not found in this registry.
virtual void deregisterLibrary(PluginLibraryHandle handle) noexcept=0
Deregister plugins associated with a library. Any resources acquired when the library was loaded will...
virtual IPluginCreator *const * getPluginCreatorList(int32_t *const numCreators) const noexcept=0
Return all the registered plugin creators and the number of registered plugin creators....
virtual bool deregisterCreator(IPluginCreator const &creator) noexcept=0
Deregister a previously registered plugin creator.
The TensorRT API version 1 namespace.
char_t AsciiChar
Definition: NvInferRuntimeBase.h:94

  Copyright © 2024 NVIDIA Corporation
  Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact