From 996336fc51a3df332e7fc0466c56aaee4cc875f7 Mon Sep 17 00:00:00 2001 From: kobayu858 <129580202+kobayu858@users.noreply.github.com> Date: Fri, 29 Nov 2024 14:23:51 +0900 Subject: [PATCH] fix(autoware_tensorrt_classifier): fix clang errors (#9508) Signed-off-by: kobayu858 --- .../include/autoware/tensorrt_classifier/calibrator.hpp | 8 ++++---- .../autoware/tensorrt_classifier/tensorrt_classifier.hpp | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/calibrator.hpp b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/calibrator.hpp index 0977621894920..3d5d6f6538b15 100644 --- a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/calibrator.hpp +++ b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/calibrator.hpp @@ -270,19 +270,19 @@ class Int8LegacyCalibrator : public nvinfer1::IInt8LegacyCalibrator output.write(reinterpret_cast(cache), length); } - double getQuantile() const noexcept + double getQuantile() const noexcept override { printf("Quantile %f\n", m_quantile); return m_quantile; } - double getRegressionCutoff(void) const noexcept + double getRegressionCutoff(void) const noexcept override { printf("Cutoff %f\n", m_cutoff); return m_cutoff; } - const void * readHistogramCache(std::size_t & length) noexcept + const void * readHistogramCache(std::size_t & length) noexcept override { hist_cache_.clear(); std::ifstream input(histogram_cache_file_, std::ios::binary); @@ -301,7 +301,7 @@ class Int8LegacyCalibrator : public nvinfer1::IInt8LegacyCalibrator } return length ? &hist_cache_[0] : nullptr; } - void writeHistogramCache(void const * ptr, std::size_t length) noexcept + void writeHistogramCache(void const * ptr, std::size_t length) noexcept override { std::ofstream output(histogram_cache_file_, std::ios::binary); output.write(reinterpret_cast(ptr), length); diff --git a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp index 345e663441557..ee16343b956d1 100644 --- a/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp +++ b/perception/autoware_tensorrt_classifier/include/autoware/tensorrt_classifier/tensorrt_classifier.hpp @@ -107,7 +107,6 @@ class TrtClassifier std::vector input_h_; CudaUniquePtr input_d_; - bool needs_output_decode_; size_t out_elem_num_; size_t out_elem_num_per_batch_; CudaUniquePtr out_prob_d_;