Add missing definitions for class static members

The static members __HIP_Coordinates::x, ::y and ::z must be defined
outside the class. Otherwise, linker throws `undefined reference error`
when these definitions are needed in the HIP application.

Change-Id: Iabc09744b478c22e4b13cf9824877ec9cfdd4f7a
Ta zmiana jest zawarta w:
mshivama authored and Mahesha Shivamallappa committed 2020-09-30 03:38:24 -04:00
1 rodzic bf20337fc1
złożenie b8640f1f0d
Plik 1 zmieniony
+16
+16
Wyświetl plik
@@ -487,6 +487,22 @@ struct __HIP_Coordinates {
#endif
};
template <typename F>
#if !defined(_MSC_VER)
__attribute__((weak))
#endif
constexpr typename __HIP_Coordinates<F>::X __HIP_Coordinates<F>::x;
template <typename F>
#if !defined(_MSC_VER)
__attribute__((weak))
#endif
constexpr typename __HIP_Coordinates<F>::Y __HIP_Coordinates<F>::y;
template <typename F>
#if !defined(_MSC_VER)
__attribute__((weak))
#endif
constexpr typename __HIP_Coordinates<F>::Z __HIP_Coordinates<F>::z;
extern "C" __device__ __attribute__((const)) size_t __ockl_get_global_size(uint);
inline
__device__