Avoid compilation error while disabling ck::int4_t support

This commit is contained in:
Po-Yen, Chen
2022-08-19 09:54:03 -04:00
parent 51d0c6794c
commit 84843aa36f

View File

@@ -151,11 +151,16 @@ check_err(const std::vector<T>& out,
}
template <typename Out, typename Ref>
std::enable_if_t<(is_signed_integral_v<Out> ||
std::is_same_v<Out, ck::int4_t>)&&is_signed_integral_v<Ref> &&
(sizeof(Out) <= sizeof(Ref) && sizeof(Ref) <= sizeof(int64_t)) &&
!std::is_same_v<Out, bhalf_t>,
bool>
std::enable_if_t<
#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
(is_signed_integral_v<Out> || std::is_same_v<Out, ck::int4_t>)&&
#else
is_signed_integral_v<Out> &&
#endif
is_signed_integral_v<Ref> &&
(sizeof(Out) <= sizeof(Ref) && sizeof(Ref) <= sizeof(int64_t)) &&
!std::is_same_v<Out, bhalf_t>,
bool>
check_err(const std::vector<Out>& out,
const std::vector<Ref>& ref,
const std::string& msg = "Error: Incorrect results!",