shared.cxx 390 B

123456789101112131415161718192021
  1. #include <type_traits>
  2. #ifdef __HIP_PLATFORM_HCC__
  3. # error "__HIP_PLATFORM_HCC__ propagated to C++ compilation!"
  4. #endif
  5. #ifdef __HIP_ROCclr__
  6. # error "__HIP_ROCclr__ propagated to C++ compilation!"
  7. #endif
  8. #ifdef _WIN32
  9. # define EXPORT __declspec(dllexport)
  10. #else
  11. # define EXPORT
  12. #endif
  13. EXPORT int shared_cxx_func(int x)
  14. {
  15. return x * x + std::integral_constant<int, 14>::value;
  16. }