Projects
home:shafeipaozi
highway
_service:tar_scm:3ce50ffa85577140bdf088d8ee7830...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:3ce50ffa85577140bdf088d8ee7830b76ac2501c.patch of Package highway
From 2f1e5a23b1facc9aebc3bf71586ca226a80b0e40 Mon Sep 17 00:00:00 2001 From: John Platts <john_platts@hotmail.com> Date: Mon, 3 Jun 2024 07:04:07 -0500 Subject: [PATCH] Made fixes to generic_ops-inl.h BitShuffle impl on big-endian --- hwy/ops/generic_ops-inl.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hwy/ops/generic_ops-inl.h b/hwy/ops/generic_ops-inl.h index 0cb83276ea..cd3103345f 100644 --- a/hwy/ops/generic_ops-inl.h +++ b/hwy/ops/generic_ops-inl.h @@ -6922,9 +6922,17 @@ HWY_API V BitShuffle(V v, VI idx) { static_cast<uint64_t>(0x0102040810204080u); #endif + const auto k7 = Set(du8, uint8_t{0x07}); + + auto unmasked_byte_idx = BitCast(du8, ShiftRight<3>(BitCast(d_idx_shr, idx))); +#if HWY_IS_BIG_ENDIAN + // Need to invert the lower 3 bits of unmasked_byte_idx[i] on big-endian + // targets + unmasked_byte_idx = Xor(unmasked_byte_idx, k7); +#endif // HWY_IS_BIG_ENDIAN + const auto byte_idx = BitwiseIfThenElse( - Set(du8, uint8_t{0x07}), - BitCast(du8, ShiftRight<3>(BitCast(d_idx_shr, idx))), + k7, unmasked_byte_idx, BitCast(du8, Dup128VecFromValues(du64, uint64_t{0}, uint64_t{0x0808080808080808u}))); // We want to shift right by idx & 7 to extract the desired bit in `bytes`,
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2