forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/openimageio: Fix AVX-512 round function
See also: AcademySoftwareFoundation/OpenImageIO#4119 Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
- Loading branch information
1 parent
cf6892b
commit 07f2ff7
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4119 | ||
--- a/src/include/OpenImageIO/simd.h | ||
+++ b/src/include/OpenImageIO/simd.h | ||
@@ -10180,7 +10180,7 @@ OIIO_FORCEINLINE vfloat16 floor (const vfloat16& a) | ||
OIIO_FORCEINLINE vfloat16 round (const vfloat16& a) | ||
{ | ||
#if OIIO_SIMD_AVX >= 512 | ||
- return _mm512_roundscale_ps (a, (1<<4) | 3); // scale=1, round to nearest smaller mag int | ||
+ return _mm512_roundscale_ps (a, (_MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC)); | ||
#else | ||
return vfloat16(round(a.lo()), round(a.hi())); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters