-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert 32f->32i: fix compiler warnings about loss of int precision
Compilers warn that converting INT_MAX to float leads to INT_MAX+1 as float value. That's absolutely not surprising: bits(single precision float mantissa) < bits(int), so an int of value 2^N - 1 must inherently be non-representable for N close to bits(int), and MAX_INT = 2³²-1. So, the upround that I'm doing here explicitly is always done, on every machine I could think of, and so what this compiler warning silencing does is always done, anyways. Finally makes VOLK a zero-warning compile on my clang16 x68_64 avx2 machine. Signed-off-by: Marcus Müller <[email protected]>
- Loading branch information
1 parent
a26a1b8
commit ea6fcca
Showing
1 changed file
with
7 additions
and
7 deletions.
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