macros.h 462 B

123456789101112131415161718192021222324252627
  1. #ifndef __MACROS_H
  2. #define __MACROS_H
  3. #ifdef API_EXPORTS
  4. #if defined(_MSC_VER)
  5. #define API __declspec(dllexport)
  6. #else
  7. #define API __attribute__((visibility("default")))
  8. #endif
  9. #else
  10. #if defined(_MSC_VER)
  11. #define API __declspec(dllimport)
  12. #else
  13. #define API
  14. #endif
  15. #endif // API_EXPORTS
  16. #if NV_TENSORRT_MAJOR >= 8
  17. #define TRT_NOEXCEPT noexcept
  18. #define TRT_CONST_ENQUEUE const
  19. #else
  20. #define TRT_NOEXCEPT
  21. #define TRT_CONST_ENQUEUE
  22. #endif
  23. #endif // __MACROS_H