TensorRT转化代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
484B

  1. #ifndef __MACROS_H
  2. #define __MACROS_H
  3. #include <NvInfer.h>
  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. #if defined(_MSC_VER)
  12. #define API __declspec(dllimport)
  13. #else
  14. #define API
  15. #endif
  16. #endif // API_EXPORTS
  17. #if NV_TENSORRT_MAJOR >= 8
  18. #define TRT_NOEXCEPT noexcept
  19. #define TRT_CONST_ENQUEUE const
  20. #else
  21. #define TRT_NOEXCEPT
  22. #define TRT_CONST_ENQUEUE
  23. #endif
  24. #endif // __MACROS_H