TensorRT:Nvinfer.h-下篇

自古美人都是妖i 提交于 2020-08-18 14:31:20

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.
    //!
 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!