diff --git a/hipamd/include/hip/amd_detail/amd_hip_vector_types.h b/hipamd/include/hip/amd_detail/amd_hip_vector_types.h index fd7c554ee2..fae00b9968 100644 --- a/hipamd/include/hip/amd_detail/amd_hip_vector_types.h +++ b/hipamd/include/hip/amd_detail/amd_hip_vector_types.h @@ -52,11 +52,25 @@ THE SOFTWARE. namespace std { using ::size_t; +template struct integral_constant { + static constexpr const _Tp value = __v; + typedef _Tp value_type; + typedef integral_constant type; + constexpr operator value_type() const { return value; } + constexpr value_type operator()() const { return value; } +}; +template constexpr const _Tp integral_constant<_Tp, __v>::value; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +template using bool_constant = integral_constant; +typedef bool_constant true_type; +typedef bool_constant false_type; + template struct enable_if {}; template struct enable_if { typedef __T type; }; -struct true_type { static const __constant__ bool value = true; }; -struct false_type { static const __constant__ bool value = false; }; template struct true_or_false_type : public false_type {}; template<> struct true_or_false_type : public true_type {};