当前位置:网站首页>Error c2694 "void logger:: log (nvinfer1:: ilogger:: severity, const char *)": rewrite the restrictive exception specification of virtual functions than base class virtual member functions
Error c2694 "void logger:: log (nvinfer1:: ilogger:: severity, const char *)": rewrite the restrictive exception specification of virtual functions than base class virtual member functions
2022-07-03 03:41:00 【AI vision netqi】
tensorrt c++ Report errors :
error C2694 “void Logger::log(nvinfer1::ILogger::Severity,const char *)”: The restrictive exception specification of overriding virtual functions is better than that of base class virtual member functions
problem :“Looser throw specifier for ‘xxxxxxxxxx’”
Example :
looser throw specifier for ‘virtual void Logger::log(nvinfer1::ILogger::Severity, const char*)’
solve : Reference link
Add... To the function noexcept
because , stay tensorrt8.0 The definition of function in version is :
void Logger::log(Severity severity, const char* msg) noexcept
Therefore, the corresponding function of error reporting is also changed to :
virtual void log(Severity severity, const char* msg) noexcept override;
My modified code :
void log(Severity severity, const char* msg) noexcept override
{
LogStreamConsumer(mReportableSeverity, severity) << "[TRT] " << std::string(msg) << std::endl;
}
Other reports of error Looser throw specifier The same solution , increase noexcept.
problem 2:nvinfer plugin call
Reference link :https://blog.csdn.net/XCCCCZ/article/details/121301106
An error is as follows :yololayer.h(54): warning: function “nvinfer1::IPluginV2::enqueue(int32_t, const void *const *, void *const *, void *, cudaStream_t)” is hidden by “nvinfer1::YoloLayerPlugin::enqueue” – virtual function override intended?
yololayer.cu(156): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
yololayer.cu(299): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
yololayer.cu(308): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
resolvent : take virtual int enqueue(int batchSize, const voidconst * inputs, void** outputs, void workspace, cudaStream_t stream) override; Change to virtual int32_t enqueue(int32_t batchSize, void const* const* inputs, void* const* outputs, void* workspace, cudaStream_t stream) noexcept;
————————————————
Copyright notice : This paper is about CSDN Blogger 「 Cloud autumn water slow 」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/yunqiushuiman/article/details/125477748
This article is about the same :
边栏推荐
- 2020-01-01t00:00:00.000000z date format conversion
- 【全民编程】《软件编程-讲课视频》【零基础入门到实战应用】
- 错误 C2694 “void Logger::log(nvinfer1::ILogger::Severity,const char *)”: 重写虚函数的限制性异常规范比基类虚成员函数
- [learning notes] seckill - seckill project - (11) project summary
- VS克隆时显示403错误
- Pytorch轻量级可视化工具wandb(local)
- Ansible introduction [unfinished (semi-finished products)]
- Applet (continuous update)
- C# WebRequest POST模式 ,基于“Basic Auth”口令认证模式,使用multipart/form-data方式上传文件及提交其他数据
- sigaction的使用
猜你喜欢
Application of derivative in daily question
NPM: the 'NPM' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is corr
Docker install and start MySQL service
Ffmpeg recording screen and screenshot
Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi
IPv6 transition technology-6to4 manual tunnel configuration experiment -- Kuige of Shangwen network
Ansible简介【暂未完成(半成品)】
LVGL使用心得
MongoDB复制集【主从复制】
900w+ data, from 17s to 300ms, how to operate
随机推荐
Elsevier latex 提交文章 pdftex.def Error: File `thumbnails/cas-email.jpeg‘ not found: using draf
【AI实战】应用xgboost.XGBRegressor搭建空气质量预测模型(一)
C # webrequest post mode, based on "basic auth" password authentication mode, uploads files and submits other data using multipart / form data mode
Basic operations of mongodb [add, delete, modify, query]
2022年已过半,得抓紧
Hi3536C V100R001C02SPC040 交叉编译器安装
ffmpeg录制屏幕和截屏
node 开启服务器
递归:快速排序,归并排序和堆排序
CEPH Shangwen network xUP Nange that releases the power of data
User value is the last word in the competition of mobile phone market
Recursion: depth first search
Captura下载安装及在Captura配置FFmpeg
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
UMI route interception (simple and rough)
Error in compiled file: error: unmapped character encoding GBK
Some preliminary preparations for QQ applet development: make an appointment for a development account, download and install developer tools, and create QQ applet
静态网页 和 动态网页的区别 & WEB1.0和WEB2.0的区别 & GET 和 POST 的区别
Lvgl usage experience
Docker install and start MySQL service