当前位置:网站首页>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 :
边栏推荐
- Summary of determinant knowledge points in Chapter 1 of Linear Algebra (Jeff's self perception)
- 简易版 微信小程序开发之for指令、上传图片及展示效果优化
- Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi
- Ffmpeg download and installation tutorial and introduction
- Shardingsphere dynamic data source
- Recursion: depth first search
- navicat 导出数据库的表结构
- 2022年已过半,得抓紧
- FileZilla Client下载安装
- CEPH Shangwen network xUP Nange that releases the power of data
猜你喜欢

Ansible简介【暂未完成(半成品)】
![Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence](/img/60/bae0e8d92a53bcd2b2de3fb22b3b99.jpg)
Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence

Applet get user avatar and nickname

leetcode:动态规划模板

TCP/IP模型中的重磅嘉宾TCP--尚文网络奎哥

MongoDB簡介

IPv6过渡技术-6to4手工隧道配置实验--尚文网络奎哥

node,npm以及yarn下载安装

Vs 2019 configuration tensorrt

Limit of one question per day
随机推荐
Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences
Error in compiled file: error: unmapped character encoding GBK
如何迈向IPv6之IPv6过渡技术-尚文网络奎哥
Without sxid, suid & sgid will be in danger- Shangwen network xUP Nange
Elsevier latex submitted the article pdftex def Error: File `thumbnails/cas-email. jpeg‘ not found: using draf
编译文件时报错:错误: 编码GBK的不可映射字符
Solve high and send system Currenttimemillis Caton
leetcode:动态规划模板
Why does thread crash not cause JVM crash
node 开启服务器
没有sXid,suid&sgid将进入险境!-尚文网络xUP楠哥
Open Visual Studio 2010 hangs when opening a SQL file sql file
Tidal characteristics of the Bohai Sea and the Yellow Sea
【学习笔记】seckill-秒杀项目--(11)项目总结
FileZilla client download and installation
Use three JS make a simple 3D scene
Hi3536c v100r001c02spc040 cross compiler installation
动态规划:最长回文子串和子序列
错误 C2694 “void Logger::log(nvinfer1::ILogger::Severity,const char *)”: 重写虚函数的限制性异常规范比基类虚成员函数
Introduction to mongodb