File tree Expand file tree Collapse file tree 6 files changed +34
-40
lines changed Expand file tree Collapse file tree 6 files changed +34
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE Debug)
1111find_package (CUDA REQUIRED)
1212
1313if (WIN32 )
14- enable_language (CUDA)
14+ enable_language (CUDA)
1515endif (WIN32 )
1616
1717include_directories (${PROJECT_SOURCE_DIR} /include )
Original file line number Diff line number Diff line change 11#ifndef ENTROPY_CALIBRATOR_H
22#define ENTROPY_CALIBRATOR_H
33
4- #include " NvInfer.h"
4+ #include < NvInfer.h>
55#include < string>
66#include < vector>
7-
8- #if NV_TENSORRT_MAJOR >= 8
9- #define TRT_NOEXCEPT noexcept
10- #else
11- #define TRT_NOEXCEPT
12- #endif
7+ #include " macros.h"
138
149// ! \class Int8EntropyCalibrator2
1510// !
Original file line number Diff line number Diff line change 2525#include < ostream>
2626#include < sstream>
2727#include < string>
28-
29- #if NV_TENSORRT_MAJOR >= 8
30- #define TRT_NOEXCEPT noexcept
31- #else
32- #define TRT_NOEXCEPT
33- #endif
28+ #include " macros.h"
3429
3530using Severity = nvinfer1::ILogger::Severity;
3631
Original file line number Diff line number Diff line change 1+ #ifndef __MACROS_H
2+ #define __MACROS_H
3+
4+ #ifdef API_EXPORTS
5+ #if defined(_MSC_VER )
6+ #define API __declspec(dllexport)
7+ #else
8+ #define API __attribute__((visibility("default")))
9+ #endif
10+ #else
11+
12+ #if defined(_MSC_VER )
13+ #define API __declspec(dllimport)
14+ #else
15+ #define API
16+ #endif
17+ #endif // API_EXPORTS
18+
19+ #if NV_TENSORRT_MAJOR >= 8
20+ #define TRT_NOEXCEPT noexcept
21+ #define TRT_CONST_ENQUEUE const
22+ #else
23+ #define TRT_NOEXCEPT
24+ #define TRT_CONST_ENQUEUE
25+ #endif
26+
27+ #endif // __MACROS_H
Original file line number Diff line number Diff line change 11#ifndef _YOLO_LAYER_H
22#define _YOLO_LAYER_H
33
4- #include " API.h"
54#include < vector>
65#include < string>
7- #include " NvInfer.h"
8-
9-
10- #if NV_TENSORRT_MAJOR >= 8
11- #define TRT_NOEXCEPT noexcept
12- #define TRT_CONST_ENQUEUE const
13- #else
14- #define TRT_NOEXCEPT
15- #define TRT_CONST_ENQUEUE
16- #endif
6+ #include < NvInfer.h>
7+ #include " macros.h"
178
189namespace Yolo
1910{
@@ -144,4 +135,4 @@ namespace nvinfer1
144135 REGISTER_TENSORRT_PLUGIN (YoloPluginCreator);
145136};
146137
147- #endif
138+ #endif // _YOLO_LAYER_H
You can’t perform that action at this time.
0 commit comments