[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 24/28: basic: set inplace on gr-basic math
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 24/28: basic: set inplace on gr-basic math blocks |
Date: |
Mon, 15 Aug 2016 00:47:07 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
nwest pushed a commit to annotated tag gr_basic_work
in repository gnuradio.
commit 64a5ba2d413fbeaf6f24bc182172ef9013bc8e71
Author: Josh Blum <address@hidden>
Date: Tue Nov 15 10:18:15 2011 -0800
basic: set inplace on gr-basic math blocks
---
gr-basic/lib/gr_basic_add.cc | 7 ++++++-
gr-basic/lib/gr_basic_add_const.cc | 1 +
gr-basic/lib/gr_basic_divide.cc | 4 +++-
gr-basic/lib/gr_basic_multiply.cc | 10 +++++++++-
gr-basic/lib/gr_basic_multiply_const.cc | 3 +++
gr-basic/lib/gr_basic_subtract.cc | 4 +++-
6 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/gr-basic/lib/gr_basic_add.cc b/gr-basic/lib/gr_basic_add.cc
index 614e1d7..1d5c4dd 100644
--- a/gr-basic/lib/gr_basic_add.cc
+++ b/gr-basic/lib/gr_basic_add.cc
@@ -40,6 +40,9 @@ public:
{
const int alignment_multiple = volk_get_alignment() /
(sizeof(float)*vlen);
set_output_multiple(std::max(1, alignment_multiple));
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
@@ -78,7 +81,9 @@ public:
),
_vlen(vlen)
{
- //NOP
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
diff --git a/gr-basic/lib/gr_basic_add_const.cc
b/gr-basic/lib/gr_basic_add_const.cc
index af305d8..959282b 100644
--- a/gr-basic/lib/gr_basic_add_const.cc
+++ b/gr-basic/lib/gr_basic_add_const.cc
@@ -50,6 +50,7 @@ public:
)
{
_val.resize(vlen);
+ this->set_inplace(true);
}
int work(
diff --git a/gr-basic/lib/gr_basic_divide.cc b/gr-basic/lib/gr_basic_divide.cc
index a3b1223..b79ddf1 100644
--- a/gr-basic/lib/gr_basic_divide.cc
+++ b/gr-basic/lib/gr_basic_divide.cc
@@ -39,7 +39,9 @@ public:
),
_vlen(vlen)
{
- //NOP
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
diff --git a/gr-basic/lib/gr_basic_multiply.cc
b/gr-basic/lib/gr_basic_multiply.cc
index 770ee77..30a3537 100644
--- a/gr-basic/lib/gr_basic_multiply.cc
+++ b/gr-basic/lib/gr_basic_multiply.cc
@@ -40,6 +40,9 @@ public:
{
const int alignment_multiple = volk_get_alignment() /
(sizeof(std::complex<float>)*vlen);
set_output_multiple(std::max(1, alignment_multiple));
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
@@ -79,6 +82,9 @@ public:
{
const int alignment_multiple = volk_get_alignment() /
(sizeof(float)*vlen);
set_output_multiple(std::max(1, alignment_multiple));
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
@@ -117,7 +123,9 @@ public:
),
_vlen(vlen)
{
- //NOP
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
diff --git a/gr-basic/lib/gr_basic_multiply_const.cc
b/gr-basic/lib/gr_basic_multiply_const.cc
index eb4a133..37f2575 100644
--- a/gr-basic/lib/gr_basic_multiply_const.cc
+++ b/gr-basic/lib/gr_basic_multiply_const.cc
@@ -53,6 +53,7 @@ public:
_val.resize(1);
const int alignment_multiple = volk_get_alignment() / (sizeof(type));
set_output_multiple(std::max(1, alignment_multiple));
+ this->set_inplace(true);
}
int work(
@@ -97,6 +98,7 @@ public:
_val.resize(1);
const int alignment_multiple = volk_get_alignment() / sizeof(type);
set_output_multiple(std::max(1, alignment_multiple));
+ this->set_inplace(true);
}
int work(
@@ -138,6 +140,7 @@ public:
)
{
_val.resize(vlen);
+ this->set_inplace(true);
}
int work(
diff --git a/gr-basic/lib/gr_basic_subtract.cc
b/gr-basic/lib/gr_basic_subtract.cc
index df46716..2476a5e 100644
--- a/gr-basic/lib/gr_basic_subtract.cc
+++ b/gr-basic/lib/gr_basic_subtract.cc
@@ -39,7 +39,9 @@ public:
),
_vlen(vlen)
{
- //NOP
+ //due to implementation, only first 2 ports can be inplaced
+ this->set_inplace(true, 0);
+ this->set_inplace(true, 1);
}
int work(
- [Commit-gnuradio] [gnuradio] annotated tag gr_basic_work created (now ac6eec1), git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 02/28: gr-basic: volkified the add fn for f32, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 14/28: basic: integrated volk routine for float multiply const, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 23/28: Merge branch 'inplace_blocks' of gnuradio.org:jblum into gr_basic, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 10/28: Volk: add 32fc_s32fc_multiply_32fc to profiler, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 06/28: basic: call volk for float32 multiplier types, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 09/28: Volk: added 32fc x scalar multiply, implemented in Orc & generic. Orc/SSE tested 10x faster than generic., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 25/28: core: added set_output_alignment (policy 2 version), git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 11/28: basic: use volk multiply scalar function for multiply_const fc32, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 24/28: basic: set inplace on gr-basic math blocks,
git <=
- [Commit-gnuradio] [gnuradio] 16/28: basic: performance tweak for sig source index mod, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 04/28: basic: added other basic operators, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 01/28: basic: attempt at new component, partial adder implementation, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 27/28: basic: added dynamic delay block, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 13/28: Volk: whoops, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 17/28: core: squashed in-place block work, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 07/28: basic add/mult const, needs test, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 15/28: basic: added super fast signal source, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 26/28: basic: use set_output_alignment in the basic math blocks, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 19/28: core: make in-place buffering enabled per port, git, 2016/08/14