Skip to content

Commit

Permalink
fix(fmath.h): One more fast_exp fix (AcademySoftwareFoundation#4275)
Browse files Browse the repository at this point in the history
In PR AcademySoftwareFoundation#4268, I accidentally changed the clause addressing what is
seemingly a bug with older MSVS. I'm just putting things back the way
they were. It's not a new change, just restoring this line closer to the
way it was about 3 commits back.

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz authored May 26, 2024
1 parent ae8aa8f commit becf0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/OpenImageIO/fmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ template<typename T>
OIIO_FORCEINLINE OIIO_HOSTDEVICE T fast_exp2 (const T& xval) {
using namespace simd;
typedef typename T::vint_t intN;
#if OIIO_SIMD_SSE || OIIO_SIMD_NEON
#if (OIIO_SIMD_SSE || OIIO_SIMD_NEON) && !OIIO_MSVS_BEFORE_2022
// See float specialization for explanations
T x = clamp (xval, T(-126.0f), T(126.0f));
intN m (x); x -= T(m);
Expand Down

0 comments on commit becf0f6

Please sign in to comment.