From 455291b6dd9948ce9963a81c38caa4eb59573132 Mon Sep 17 00:00:00 2001 From: Micaela Verucchi Date: Mon, 6 Apr 2020 19:11:39 +0200 Subject: [PATCH] Fix compile errors dut to Int8BatchStream Signed-off-by: Micaela Verucchi Davide Sapienza --- include/tkDNN/DetectionNN.h | 11 +++++++---- include/tkDNN/Int8BatchStream.h | 14 ++++++-------- src/Int8BatchStream.cpp | 5 +++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/include/tkDNN/DetectionNN.h b/include/tkDNN/DetectionNN.h index 101e75d..d884faf 100644 --- a/include/tkDNN/DetectionNN.h +++ b/include/tkDNN/DetectionNN.h @@ -11,13 +11,16 @@ #include #include #include -#include -#include - #include "tkdnn.h" -#define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib. +//#define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib. + +#ifdef OPENCV_CUDACONTRIB +#include +#include +#endif + namespace tk { namespace dnn { diff --git a/include/tkDNN/Int8BatchStream.h b/include/tkDNN/Int8BatchStream.h index fbc90f4..fc3863c 100644 --- a/include/tkDNN/Int8BatchStream.h +++ b/include/tkDNN/Int8BatchStream.h @@ -8,18 +8,16 @@ #include #include #include -#include "NvInfer.h" - #include #include +#include +#include +#include +#include -#include -#include -#include -#include - -#include "tkdnn.h" +#include "NvInfer.h" #include "utils.h" +#include "tkdnn.h" class BatchStream { diff --git a/src/Int8BatchStream.cpp b/src/Int8BatchStream.cpp index d4f1247..12d04da 100644 --- a/src/Int8BatchStream.cpp +++ b/src/Int8BatchStream.cpp @@ -1,5 +1,10 @@ #include "Int8BatchStream.h" +#include +#include +#include +#include + BatchStream::BatchStream(tk::dnn::dataDim_t dim, int batchSize, int maxBatches, const std::string& fileimglist, const std::string& filelabellist) { mBatchSize = batchSize;