[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 05/09: volk/rotator: Fix the volk_32fc_s32f
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 05/09: volk/rotator: Fix the volk_32fc_s32fc_x2_rotator_32fc_generic kernel |
Date: |
Tue, 28 Jan 2014 20:10:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 796dcf960bc8fd630e1f0ca0cb5ea5861769b611
Author: Sylvain Munaut <address@hidden>
Date: Sat Jan 25 22:55:34 2014 +0100
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 <address@hidden>
---
volk/kernels/volk/volk_32fc_s32fc_x2_rotator_32fc.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/volk/kernels/volk/volk_32fc_s32fc_x2_rotator_32fc.h
b/volk/kernels/volk/volk_32fc_s32fc_x2_rotator_32fc.h
index e25d2a4..84fe39f 100644
--- a/volk/kernels/volk/volk_32fc_s32fc_x2_rotator_32fc.h
+++ b/volk/kernels/volk/volk_32fc_s32fc_x2_rotator_32fc.h
@@ -26,7 +26,11 @@ static inline void
volk_32fc_s32fc_x2_rotator_32fc_generic(lv_32fc_t* outVector,
*outVector++ = *inVector++ * (*phase);
(*phase) *= phase_inc;
}
- (*phase) /= abs((*phase));
+#ifdef __cplusplus
+ (*phase) /= std::abs((*phase));
+#else
+ (*phase) /= cabsf((*phase));
+#endif
}
for(i = 0; i < num_points%ROTATOR_RELOAD; ++i) {
*outVector++ = *inVector++ * (*phase);
- [Commit-gnuradio] [gnuradio] branch maint updated (30c7c0e -> eac6823), git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 03/09: volk/qa: For complex series, check the EVM rather than real/imag separately, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 09/09: volk/rotator: Use more precise phase_inc in volk_profile, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 05/09: volk/rotator: Fix the volk_32fc_s32fc_x2_rotator_32fc_generic kernel,
git <=
- [Commit-gnuradio] [gnuradio] 07/09: volk/rotator: Tighten the tolerance to 1e-3 in QA, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 08/09: volk/rotator: Fix some debug printf accessing array out-of-bound, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 06/09: volk/rotator: Fix the renormalization process (missing sqrt), git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 01/09: volk: proposed solutions to bugs 582/583, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 02/09: volk: fixup QA's fcompare to test all differences, git, 2014/01/28
- [Commit-gnuradio] [gnuradio] 04/09: volk: enabling unaligned protokernels for rotator, git, 2014/01/28