Skip to content

Commit 491245d

Browse files
committed
VerifyPeak: use floating point for error abs to keep static analyzer happy even though we don't care about the fractional part of the value
1 parent fd53517 commit 491245d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/Primitives/DualFFT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void VerifyPeak(
164164
uhz.PrettyPrint(peak_uhz, 6).c_str(),
165165
uhz.PrettyPrint(expectedPeakUhz, 6).c_str(),
166166
uhz.PrettyPrint(error_uhz, 6).c_str());
167-
REQUIRE(labs(error_uhz) < toleranceUhz);
167+
REQUIRE(fabs(error_uhz) < toleranceUhz);
168168
}
169169

170170
size_t FindPeak(AcceleratorBuffer<float>& buf, size_t start, size_t end)

0 commit comments

Comments
 (0)