Skip to content

Commit

Permalink
fix(autoware_tensorrt_classifier): fix clang errors (#9508)
Browse files Browse the repository at this point in the history
Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Nov 29, 2024
1 parent 4c918a2 commit 996336f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,19 +270,19 @@ class Int8LegacyCalibrator : public nvinfer1::IInt8LegacyCalibrator
output.write(reinterpret_cast<const char *>(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);
Expand All @@ -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<const char *>(ptr), length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class TrtClassifier
std::vector<float> input_h_;
CudaUniquePtr<float[]> input_d_;

bool needs_output_decode_;
size_t out_elem_num_;
size_t out_elem_num_per_batch_;
CudaUniquePtr<float[]> out_prob_d_;
Expand Down

0 comments on commit 996336f

Please sign in to comment.