当前位置:网站首页>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 :
边栏推荐
- Pytoch lightweight visualization tool wandb (local)
- 2020-01-01t00:00:00.000000z date format conversion
- 递归使用和多维数组对象变一维数组对象
- Yolov5 project based on QT
- Leetcode: dynamic planning template
- Summary of electromagnetic spectrum
- Download and install captura and configure ffmpeg in captura
- npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- 【AI实战】应用xgboost.XGBRegressor搭建空气质量预测模型(一)
- sigaction的使用
猜你喜欢

The calculation of stripe, kernel and padding in CNN

Recursion: depth first search
![C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions](/img/4a/1df03d9f3315debb4c335260ed39f2.jpg)
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions

Download and install captura and configure ffmpeg in captura

Small guide for rapid formation of manipulator (VIII): kinematic modeling (standard DH method)

Vs 2019 configuration tensorrt

PHP generates PDF tcpdf

渤、黄海的潮汐特征

Pytorch multi card distributed training distributeddataparallel usage

Introduction à mongodb
随机推荐
TCP/IP模型中的重磅嘉宾TCP--尚文网络奎哥
900w+ data, from 17s to 300ms, how to operate
The difference between static web pages and dynamic web pages & the difference between Web1.0 and Web2.0 & the difference between get and post
Node start server
[MySQL] the difference between left join, right join and join
Applet (continuous update)
Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences
可分离债券与可转债
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
[AI practice] Application xgboost Xgbregressor builds air quality prediction model (I)
Limit of one question per day
FileZilla Client下载安装
Web session management security issues
Use three JS make a simple 3D scene
com. fasterxml. jackson. databind. Exc.invalidformatexception problem
Summary of electromagnetic spectrum
Limit of one question per day
Pat class B common function Usage Summary
LVGL使用心得
监听对象中值变化及访问