@@ -62,13 +62,13 @@ class TensorRTCalibrator : public nvinfer1::IInt8EntropyCalibrator2 {
6262 data_sizes_.push_back (binding_sizes);
6363 }
6464
65- int getBatchSize () const override { return batch_size_; }
65+ int getBatchSize () const noexcept override { return batch_size_; }
6666
6767 /* !
6868 * \brief TensorRT will call this method to get next batch of data to
6969 * calibrate with.
7070 */
71- bool getBatch (void * bindings[], const char * names[], int nbBindings) override {
71+ bool getBatch (void * bindings[], const char * names[], int nbBindings) noexcept override {
7272 AllocateBuffersIfNotAllocated ();
7373 CHECK_EQ (input_names_.size (), nbBindings);
7474 for (size_t i = 0 ; i < input_names_.size (); ++i) {
@@ -83,13 +83,13 @@ class TensorRTCalibrator : public nvinfer1::IInt8EntropyCalibrator2 {
8383 return (num_batches_calibrated_ < data_.size ());
8484 }
8585
86- const void * readCalibrationCache (size_t & length) override {
86+ const void * readCalibrationCache (size_t & length) noexcept override {
8787 if (calibration_cache_.empty ()) return nullptr ;
8888 length = calibration_cache_.size ();
8989 return calibration_cache_.data ();
9090 }
9191
92- void writeCalibrationCache (const void * cache, size_t length) override {
92+ void writeCalibrationCache (const void * cache, size_t length) noexcept override {
9393 calibration_cache_.assign (static_cast <const char *>(cache), length);
9494 }
9595
0 commit comments