From: John Platts Date: Fri, 27 Jan 2023 17:26:16 +0000 (-0600) Subject: [PATCH] Fixed HWY_SCALAR BitCast to copy only sizeof(T) bytes X-Git-Tag: archive/raspbian/1.0.3-2+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e36650fcb4d9dc3ca4a31883d583758a4e6e8d60;p=highway.git [PATCH] Fixed HWY_SCALAR BitCast to copy only sizeof(T) bytes Gbp-Pq: Name 06ea5ed21d28e2873dc8c80db2c8d03d047bed1c.patch --- 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); }