volk: proposed solutions to bugs 582/583

582 and 583 are probably compiler bugs, and an upstream bug has been filed
on launchpad with Linaro GCC. A static cast of the tolerance is not happening
on armhf architectures. The work around forces a cast by using the values
immediately after assignment.
volk: fixup QA's fcompare to test all differences

This addresses bug 627 by adding a fabs call when checking if a number
is close to 0. If this is the case we also make sure the other buffer
is within tolerance. For the normal test case wrap the percent difference
in fabs rather than just the difference.
volk: add avx u/a protokernel for 32f_x3sum_of_poly_32f

The threshold differences have to change for volk_profile because
of rounding errors. It was passing previously because of a bug in
VOLK QA (bug 627) that has since been resolved.
volk/qa: For complex series, check the EVM rather than real/imag separately

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
volk: enabling unaligned protokernels for rotator

Added ifdefs so that the existing unaligned kernels get built and
tested.
volk/rotator: Fix the volk_32fc_s32fc_x2_rotator_32fc_generic kernel

abs() is an int function ...

Call the right one depending on the language now.

Note that I explicitely did the selection here rather than add a lv_abs()
function in volk_complex.h because there is no GCC extension for abs() that
would return the right type, so I'd have to stick to the cabs() function
which would force a double cast back and forth.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
volk/rotator: Fix the renormalization process (missing sqrt)

Note: We use _mm_sqrt_ps followed by _mm_div_ps rather than using the
      faster _mm_rsqrt_ps followed by _mm_mul_ps. It's slower but it
      avoids some numerical errors that show up clearly on spectrum
      as an image up to -80 dBc. Here the image is at -120 dBc.

      This is in the renormalization process anyway so the cost is
      spread on a fair amount of samples.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
volk/rotator: Tighten the tolerance to 1e-3 in QA

It doesn't quite pass with 1e-4 yet :(

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
volk/rotator: Fix some debug printf accessing array out-of-bound

Those are disabled by default, but enabling them for debugging will
result in warnings, so might as well fix them.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
volk/rotator: Use more precise phase_inc in volk_profile

The kernels all expect the phase_inc to be a unity vector. Any error on
this will compound and ultimatly make it fail

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Merge branch 'volk-qa-fixes'

Conflicts:
	volk/apps/volk_profile.cc
blocks: Add QA tests for the rotator rotateN function which uses VOLK

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
blocks/rotator: Make the input data 'const'

The volk kernels are const and there is no reason to clobber the input

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
blocks: Add a new rotator_cc block to perform frequency shifting

It internally uses the rotator.h helper that was already present,
which in turn makes uses of VOLK rotator kernel

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Merge remote-tracking branch 'nwest/volk-sum_of_poly'
Merge branch 'master' into next