Closed argilo closed 11 months ago
We could use long long int
cf. Int types.
However, the fundamental int types just feel broken.
I assume we should #include <cstdint>
and use fixed width integer types.
In this specific case int64_t
would be correct. Though, this type is marked optional.
If we change this line: https://github.com/gnuradio/volk/blob/d5b317c17efd23f6c6cd9a52584123e1a7545452/lib/qa_utils.cc#L493 to
if (((unsigned int)abs(int64_t(((t*)(in1))[i]) - int64_t(((t*)(in2))[i]))) > tol) {
we should be good. Technically, a #include <cstdint>
line is required as well.
The
icompare
function casts all inputs toint
before comparing & printing them. This prevents errors in upper bits from being caught, and makes it difficult to diagnose failures.https://github.com/gnuradio/volk/blob/e853e9bb5693c7800840b736e77db52d713d553e/lib/qa_utils.cc#L463-L480