Skip to content

Commit

Permalink
Make xsimd code compatible with #define small char found in some MS h…
Browse files Browse the repository at this point in the history
…eaders

Fix #1037
  • Loading branch information
serge-sans-paille committed Aug 2, 2024
1 parent e624857 commit 241665d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/xsimd/arch/generic/xsimd_generic_details.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ namespace xsimd
XSIMD_INLINE batch<uint32_t, A> fast_cast(batch<float, A> const& v, batch<uint32_t, A> const&, requires_arch<generic>) noexcept
{
auto is_large = v >= batch<float, A>(1u << 31);
auto small = bitwise_cast<float>(batch_cast<int32_t>(v));
auto large = bitwise_cast<float>(
auto small_v = bitwise_cast<float>(batch_cast<int32_t>(v));
auto large_v = bitwise_cast<float>(
batch_cast<int32_t>(v - batch<float, A>(1u << 31))
^ batch<int32_t, A>(1u << 31));
return bitwise_cast<uint32_t>(select(is_large, large, small));
return bitwise_cast<uint32_t>(select(is_large, large_v, small_v));
}
}

Expand Down

0 comments on commit 241665d

Please sign in to comment.