TensorRT:Nvinfer.h-下篇

9:PluginV2类 

Pluginv2是新版本的插件接口,部分函数接口与V1是一致的

class IPluginV2
{
public:
    //获取TensorRT的版本,用于向后兼容
    //! \brief Return the API version with which this plugin was built.
    //!
    //! Do not override this method as it is used by the TensorRT library to maintain backwards-compatibility with plugins.
    //!
    virtual int getTensorRTVersion() const
    {
        return NV_TENSORRT_VERSION;
    }

    //获取插件的类型
    //! \brief Return the plugin type. Should match the plugin name returned by the corresponding plugin creator
    // \see IPluginCreator::getPluginName()
    //!
    virtual const char* getPluginType() const = 0;

    //获取插件的版本
    //! \brief Return the plugin version. Should match the plugin version returned by the corresponding plugin creator
    // \see IPluginCreator::getPluginVersion()
    //!
    virtual const char* getPluginVersion() const = 0;

    //获取输出数目
    //! \brief Get the number of outputs from the layer.
    //!
 

你可能感兴趣的:(目标检测-实现)