From e36650fcb4d9dc3ca4a31883d583758a4e6e8d60 Mon Sep 17 00:00:00 2001 From: John Platts Date: Fri, 27 Jan 2023 11:26:16 -0600 Subject: [PATCH] [PATCH] Fixed HWY_SCALAR BitCast to copy only sizeof(T) bytes Gbp-Pq: Name 06ea5ed21d28e2873dc8c80db2c8d03d047bed1c.patch --- hwy/ops/scalar-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwy/ops/scalar-inl.h b/hwy/ops/scalar-inl.h index c28f7b5..eeb1b6a 100644 --- a/hwy/ops/scalar-inl.h +++ b/hwy/ops/scalar-inl.h @@ -93,7 +93,7 @@ template HWY_API Vec1 BitCast(Sisd /* tag */, Vec1 v) { static_assert(sizeof(T) <= sizeof(FromT), "Promoting is undefined"); T to; - CopyBytes(&v.raw, &to); // not same size - ok to shrink + CopyBytes(&v.raw, &to); // not same size - ok to shrink return Vec1(to); } -- 2.30.2