highway_export.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Pseudo-generated file to handle both cmake & bazel build system.
  2. // Initial generation done using cmake code:
  3. // include(GenerateExportHeader)
  4. // generate_export_header(hwy EXPORT_MACRO_NAME HWY_DLLEXPORT EXPORT_FILE_NAME
  5. // hwy/highway_export.h)
  6. // code reformatted using clang-format --style=Google
  7. #ifndef HWY_DLLEXPORT_H
  8. #define HWY_DLLEXPORT_H
  9. #if !defined(HWY_SHARED_DEFINE)
  10. #define HWY_DLLEXPORT
  11. #define HWY_CONTRIB_DLLEXPORT
  12. #define HWY_TEST_DLLEXPORT
  13. #else // !HWY_SHARED_DEFINE
  14. #ifndef HWY_DLLEXPORT
  15. #if defined(hwy_EXPORTS)
  16. /* We are building this library */
  17. #ifdef _WIN32
  18. #define HWY_DLLEXPORT __declspec(dllexport)
  19. #else
  20. #define HWY_DLLEXPORT __attribute__((visibility("default")))
  21. #endif
  22. #else // defined(hwy_EXPORTS)
  23. /* We are using this library */
  24. #ifdef _WIN32
  25. #define HWY_DLLEXPORT __declspec(dllimport)
  26. #else
  27. #define HWY_DLLEXPORT __attribute__((visibility("default")))
  28. #endif
  29. #endif // defined(hwy_EXPORTS)
  30. #endif // HWY_DLLEXPORT
  31. #ifndef HWY_CONTRIB_DLLEXPORT
  32. #if defined(hwy_contrib_EXPORTS)
  33. /* We are building this library */
  34. #ifdef _WIN32
  35. #define HWY_CONTRIB_DLLEXPORT __declspec(dllexport)
  36. #else
  37. #define HWY_CONTRIB_DLLEXPORT __attribute__((visibility("default")))
  38. #endif
  39. #else // defined(hwy_contrib_EXPORTS)
  40. /* We are using this library */
  41. #ifdef _WIN32
  42. #define HWY_CONTRIB_DLLEXPORT __declspec(dllimport)
  43. #else
  44. #define HWY_CONTRIB_DLLEXPORT __attribute__((visibility("default")))
  45. #endif
  46. #endif // defined(hwy_contrib_EXPORTS)
  47. #endif // HWY_CONTRIB_DLLEXPORT
  48. #ifndef HWY_TEST_DLLEXPORT
  49. #if defined(hwy_test_EXPORTS)
  50. /* We are building this library */
  51. #ifdef _WIN32
  52. #define HWY_TEST_DLLEXPORT __declspec(dllexport)
  53. #else
  54. #define HWY_TEST_DLLEXPORT __attribute__((visibility("default")))
  55. #endif
  56. #else // defined(hwy_test_EXPORTS)
  57. /* We are using this library */
  58. #ifdef _WIN32
  59. #define HWY_TEST_DLLEXPORT __declspec(dllimport)
  60. #else
  61. #define HWY_TEST_DLLEXPORT __attribute__((visibility("default")))
  62. #endif
  63. #endif // defined(hwy_test_EXPORTS)
  64. #endif // HWY_TEST_DLLEXPORT
  65. #endif // !HWY_SHARED_DEFINE
  66. #endif /* HWY_DLLEXPORT_H */