From bf6823cb3cbd4633cc42a756456193af2a9ccb59 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Mon, 3 Jun 2024 12:52:54 +0100 Subject: [PATCH] Fix clang-format Signed-off-by: Sven van Haastregt --- .../conversions/conversions_data_info.h | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/test_conformance/conversions/conversions_data_info.h b/test_conformance/conversions/conversions_data_info.h index 291cfa8dc6..9d2cbc606c 100644 --- a/test_conformance/conversions/conversions_data_info.h +++ b/test_conformance/conversions/conversions_data_info.h @@ -83,7 +83,9 @@ struct DataInitBase : public DataInitInfo virtual void conv_array(void *out, void *in, size_t n) {} virtual void conv_array_sat(void *out, void *in, size_t n) {} virtual void init(const cl_uint &, const cl_uint &) {} - virtual void set_allow_zero_array(uint8_t *allow, void *out, void *in, size_t n) {} + virtual void set_allow_zero_array(uint8_t *allow, void *out, void *in, + size_t n) + {} }; template @@ -135,7 +137,9 @@ struct DataInfoSpec : public DataInitBase } void init(const cl_uint &, const cl_uint &) override; - void set_allow_zero_array(uint8_t *allow, void *out, void *in, size_t n) override { + void set_allow_zero_array(uint8_t *allow, void *out, void *in, + size_t n) override + { for (size_t i = 0; i < n; i++) set_allow_zero(&allow[i], &((OutType *)out)[i], &((InType *)in)[i]); } @@ -731,26 +735,23 @@ void DataInfoSpec::set_allow_zero(uint8_t *allow, OutType *out, InType *in) { - // from double - if (std::is_same::value) - *allow |= IsDoubleSubnormal(*in); - // from float - if (std::is_same::value) - *allow |= IsFloatSubnormal(*in); - // from half - if (is_in_half()) - *allow |= IsHalfSubnormal(*in); - - // handle the cases that the converted result is subnormal - // from double - if (std::is_same::value) - *allow |= IsDoubleSubnormal(*out); - // from float - if (std::is_same::value) - *allow |= IsFloatSubnormal(*out); - // from half - if (is_out_half()) - *allow |= IsHalfSubnormal(*out); + // from double + if (std::is_same::value) + *allow |= IsDoubleSubnormal(*in); + // from float + if (std::is_same::value) *allow |= IsFloatSubnormal(*in); + // from half + if (is_in_half()) *allow |= IsHalfSubnormal(*in); + + // handle the cases that the converted result is subnormal + // from double + if (std::is_same::value) + *allow |= IsDoubleSubnormal(*out); + // from float + if (std::is_same::value) + *allow |= IsFloatSubnormal(*out); + // from half + if (is_out_half()) *allow |= IsHalfSubnormal(*out); } template