@@ -78,7 +78,7 @@ namespace nvinfer1
7878 assert (d == a + length);
7979 }
8080
81- void YoloLayerPlugin::serialize (void * buffer) const
81+ void YoloLayerPlugin::serialize (void * buffer) const TRT_NOEXCEPT
8282 {
8383 using namespace Tn ;
8484 char * d = static_cast <char *>(buffer), *a = d;
@@ -95,17 +95,17 @@ namespace nvinfer1
9595 assert (d == a + getSerializationSize ());
9696 }
9797
98- size_t YoloLayerPlugin::getSerializationSize () const
98+ size_t YoloLayerPlugin::getSerializationSize () const TRT_NOEXCEPT
9999 {
100100 return sizeof (mClassCount ) + sizeof (mThreadCount ) + sizeof (mKernelCount ) + sizeof (Yolo::YoloKernel) * mYoloKernel .size () + sizeof (mNetWidth ) + sizeof (mNetHeight ) + sizeof (mMaxOutObject );
101101 }
102102
103- int YoloLayerPlugin::initialize ()
103+ int YoloLayerPlugin::initialize () TRT_NOEXCEPT
104104 {
105105 return 0 ;
106106 }
107107
108- Dims YoloLayerPlugin::getOutputDimensions (int index, const Dims* inputs, int nbInputDims)
108+ Dims YoloLayerPlugin::getOutputDimensions (int index, const Dims* inputs, int nbInputDims) TRT_NOEXCEPT
109109 {
110110 // output the result to channel
111111 int totalsize = mMaxOutObject * sizeof (Detection) / sizeof (float );
@@ -114,63 +114,63 @@ namespace nvinfer1
114114 }
115115
116116 // Set plugin namespace
117- void YoloLayerPlugin::setPluginNamespace (const char * pluginNamespace)
117+ void YoloLayerPlugin::setPluginNamespace (const char * pluginNamespace) TRT_NOEXCEPT
118118 {
119119 mPluginNamespace = pluginNamespace;
120120 }
121121
122- const char * YoloLayerPlugin::getPluginNamespace () const
122+ const char * YoloLayerPlugin::getPluginNamespace () const TRT_NOEXCEPT
123123 {
124124 return mPluginNamespace ;
125125 }
126126
127127 // Return the DataType of the plugin output at the requested index
128- DataType YoloLayerPlugin::getOutputDataType (int index, const nvinfer1::DataType* inputTypes, int nbInputs) const
128+ DataType YoloLayerPlugin::getOutputDataType (int index, const nvinfer1::DataType* inputTypes, int nbInputs) const TRT_NOEXCEPT
129129 {
130130 return DataType::kFLOAT ;
131131 }
132132
133133 // Return true if output tensor is broadcast across a batch.
134- bool YoloLayerPlugin::isOutputBroadcastAcrossBatch (int outputIndex, const bool * inputIsBroadcasted, int nbInputs) const
134+ bool YoloLayerPlugin::isOutputBroadcastAcrossBatch (int outputIndex, const bool * inputIsBroadcasted, int nbInputs) const TRT_NOEXCEPT
135135 {
136136 return false ;
137137 }
138138
139139 // Return true if plugin can use input that is broadcast across batch without replication.
140- bool YoloLayerPlugin::canBroadcastInputAcrossBatch (int inputIndex) const
140+ bool YoloLayerPlugin::canBroadcastInputAcrossBatch (int inputIndex) const TRT_NOEXCEPT
141141 {
142142 return false ;
143143 }
144144
145- void YoloLayerPlugin::configurePlugin (const PluginTensorDesc* in, int nbInput, const PluginTensorDesc* out, int nbOutput)
145+ void YoloLayerPlugin::configurePlugin (const PluginTensorDesc* in, int nbInput, const PluginTensorDesc* out, int nbOutput) TRT_NOEXCEPT
146146 {
147147 }
148148
149149 // Attach the plugin object to an execution context and grant the plugin the access to some context resource.
150- void YoloLayerPlugin::attachToContext (cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator)
150+ void YoloLayerPlugin::attachToContext (cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator) TRT_NOEXCEPT
151151 {
152152 }
153153
154154 // Detach the plugin object from its execution context.
155- void YoloLayerPlugin::detachFromContext () {}
155+ void YoloLayerPlugin::detachFromContext () TRT_NOEXCEPT {}
156156
157- const char * YoloLayerPlugin::getPluginType () const
157+ const char * YoloLayerPlugin::getPluginType () const TRT_NOEXCEPT
158158 {
159159 return " YoloLayer_TRT" ;
160160 }
161161
162- const char * YoloLayerPlugin::getPluginVersion () const
162+ const char * YoloLayerPlugin::getPluginVersion () const TRT_NOEXCEPT
163163 {
164164 return " 1" ;
165165 }
166166
167- void YoloLayerPlugin::destroy ()
167+ void YoloLayerPlugin::destroy () TRT_NOEXCEPT
168168 {
169169 delete this ;
170170 }
171171
172172 // Clone the plugin
173- IPluginV2IOExt* YoloLayerPlugin::clone () const
173+ IPluginV2IOExt* YoloLayerPlugin::clone () const TRT_NOEXCEPT
174174 {
175175 YoloLayerPlugin* p = new YoloLayerPlugin (mClassCount , mNetWidth , mNetHeight , mMaxOutObject , mYoloKernel );
176176 p->setPluginNamespace (mPluginNamespace );
@@ -254,7 +254,7 @@ namespace nvinfer1
254254 }
255255
256256
257- int YoloLayerPlugin::enqueue (int batchSize, const void *const * inputs, void ** outputs, void * workspace, cudaStream_t stream)
257+ int YoloLayerPlugin::enqueue (int batchSize, const void *const * inputs, void *TRT_CONST_ENQUEUE * outputs, void * workspace, cudaStream_t stream) TRT_NOEXCEPT
258258 {
259259 forwardGpu ((const float *const *)inputs, (float *)outputs[0 ], stream, batchSize);
260260 return 0 ;
@@ -271,22 +271,22 @@ namespace nvinfer1
271271 mFC .fields = mPluginAttributes .data ();
272272 }
273273
274- const char * YoloPluginCreator::getPluginName () const
274+ const char * YoloPluginCreator::getPluginName () const TRT_NOEXCEPT
275275 {
276276 return " YoloLayer_TRT" ;
277277 }
278278
279- const char * YoloPluginCreator::getPluginVersion () const
279+ const char * YoloPluginCreator::getPluginVersion () const TRT_NOEXCEPT
280280 {
281281 return " 1" ;
282282 }
283283
284- const PluginFieldCollection* YoloPluginCreator::getFieldNames ()
284+ const PluginFieldCollection* YoloPluginCreator::getFieldNames () TRT_NOEXCEPT
285285 {
286286 return &mFC ;
287287 }
288288
289- IPluginV2IOExt* YoloPluginCreator::createPlugin (const char * name, const PluginFieldCollection* fc)
289+ IPluginV2IOExt* YoloPluginCreator::createPlugin (const char * name, const PluginFieldCollection* fc) TRT_NOEXCEPT
290290 {
291291 int class_count = -1 ;
292292 int input_w = -1 ;
@@ -321,7 +321,7 @@ namespace nvinfer1
321321 return obj;
322322 }
323323
324- IPluginV2IOExt* YoloPluginCreator::deserializePlugin (const char * name, const void * serialData, size_t serialLength)
324+ IPluginV2IOExt* YoloPluginCreator::deserializePlugin (const char * name, const void * serialData, size_t serialLength) TRT_NOEXCEPT
325325 {
326326 // This object will be deleted when the network is destroyed, which will
327327 // call YoloLayerPlugin::destroy()
0 commit comments