[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/07: Fix abs block to work no matter the
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/07: Fix abs block to work no matter the input type; addresses issue #660. |
Date: |
Mon, 31 Mar 2014 18:04:31 +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 4e553afe7d5639fb54e886da0bf732772f22e77a
Author: Michael Dickens <address@hidden>
Date: Tue Mar 25 12:55:48 2014 -0400
Fix abs block to work no matter the input type; addresses issue #660.
---
gr-blocks/lib/abs_XX_impl.cc.t | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gr-blocks/lib/abs_XX_impl.cc.t b/gr-blocks/lib/abs_XX_impl.cc.t
index 2a701ad..6bb9f14 100644
--- a/gr-blocks/lib/abs_XX_impl.cc.t
+++ b/gr-blocks/lib/abs_XX_impl.cc.t
@@ -51,10 +51,12 @@ namespace gr {
{
@I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
@O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
- for(int i=0; i<noutput_items; i++)
- optr[i] = abs(iptr[i]);
-
+
+ for(int i=0; i<noutput_items; i++) {
+ @I_TYPE@ val = iptr[i];
+ optr[i] = ((val < ((@I_TYPE@)0)) ? -val : val);
+ }
+
return noutput_items;
}
- [Commit-gnuradio] [gnuradio] branch maint updated (2803328 -> c4eb231), git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 07/07: Revert "When specifying a const reference member variable in the constructor's initialization list, the argument must also be a const reference.", git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 02/07: Make compilers happy by adding in a proper return instruction to the pycallback_object fall-through converter, even though it will never actually be issued., git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 04/07: Fix abs block to work no matter the input type; addresses issue #660.,
git <=
- [Commit-gnuradio] [gnuradio] 03/07: Use LOG4CPP directories, not the library itself., git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 06/07: Merge remote-tracking branch 'michaelld/fix_abs_XX' into maint, git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 05/07: Merge remote-tracking branch 'michaelld/fix_clang_warnings' into maint, git, 2014/03/31
- [Commit-gnuradio] [gnuradio] 01/07: When specifying a const reference member variable in the constructor's initialization list, the argument must also be a const reference., git, 2014/03/31