[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 09/28: Volk: added 32fc x scalar multiply,
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 09/28: Volk: added 32fc x scalar multiply, implemented in Orc & generic. Orc/SSE tested 10x faster than generic. |
Date: |
Mon, 15 Aug 2016 00:47:05 +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 ad48f28c473a11fb35305f41ea00551c4afce252
Author: Nick Foster <address@hidden>
Date: Wed Nov 9 11:32:47 2011 -0800
Volk: added 32fc x scalar multiply, implemented in Orc & generic. Orc/SSE
tested 10x faster than generic.
---
.../include/volk/volk_32fc_s32fc_multiply_32fc_a.h | 46 ++++++++++++++++++++++
volk/lib/testqa.cc | 2 +-
.../volk_32fc_s32fc_multiply_32fc_a_orc_impl.orc | 18 +++++++++
3 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h
b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h
new file mode 100644
index 0000000..b27a725
--- /dev/null
+++ b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h
@@ -0,0 +1,46 @@
+#ifndef INCLUDED_volk_32fc_s32fc_multiply_32fc_a_H
+#define INCLUDED_volk_32fc_s32fc_multiply_32fc_a_H
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <volk/volk_complex.h>
+#include <float.h>
+
+#ifdef LV_HAVE_GENERIC
+ /*!
+ \brief Multiplies the two input complex vectors and stores their results
in the third vector
+ \param cVector The vector where the results will be stored
+ \param aVector One of the vectors to be multiplied
+ \param bVector One of the vectors to be multiplied
+ \param num_points The number of complex values in aVector and bVector to
be multiplied together and stored into cVector
+ */
+static inline void volk_32fc_s32fc_multiply_32fc_a_generic(lv_32fc_t* cVector,
const lv_32fc_t* aVector, const lv_32fc_t scalar, unsigned int num_points){
+ lv_32fc_t* cPtr = cVector;
+ const lv_32fc_t* aPtr = aVector;
+ unsigned int number = 0;
+
+ for(number = 0; number < num_points; number++){
+ *cPtr++ = (*aPtr++) * scalar;
+ }
+}
+#endif /* LV_HAVE_GENERIC */
+
+#ifdef LV_HAVE_ORC
+ /*!
+ \brief Multiplies the two input complex vectors and stores their results
in the third vector
+ \param cVector The vector where the results will be stored
+ \param aVector One of the vectors to be multiplied
+ \param bVector One of the vectors to be multiplied
+ \param num_points The number of complex values in aVector and bVector to
be multiplied together and stored into cVector
+ */
+extern void volk_32fc_s32fc_multiply_32fc_a_orc_impl(lv_32fc_t* cVector, const
lv_32fc_t* aVector, const lv_32fc_t scalar, unsigned int num_points);
+static inline void volk_32fc_s32fc_multiply_32fc_a_orc(lv_32fc_t* cVector,
const lv_32fc_t* aVector, const lv_32fc_t scalar, unsigned int num_points){
+ volk_32fc_s32fc_multiply_32fc_a_orc_impl(cVector, aVector, scalar,
num_points);
+}
+#endif /* LV_HAVE_ORC */
+
+
+
+
+
+#endif /* INCLUDED_volk_32fc_x2_multiply_32fc_a_H */
diff --git a/volk/lib/testqa.cc b/volk/lib/testqa.cc
index 62e62c2..9d1d1bc 100644
--- a/volk/lib/testqa.cc
+++ b/volk/lib/testqa.cc
@@ -4,6 +4,7 @@
//VOLK_RUN_TESTS(volk_16i_x5_add_quad_16i_x4_a, 1e-4, 2046, 10000);
//VOLK_RUN_TESTS(volk_16i_branch_4_state_8_a, 1e-4, 2046, 10000);
+VOLK_RUN_TESTS(volk_32fc_s32fc_multiply_32fc_a, 1e-4, 0, 20460, 10000);
VOLK_RUN_TESTS(volk_16ic_s32f_deinterleave_real_32f_a, 1e-5, 32768.0, 204600,
10000);
VOLK_RUN_TESTS(volk_16ic_deinterleave_real_8i_a, 0, 0, 20460, 10000);
VOLK_RUN_TESTS(volk_16ic_deinterleave_16i_x2_a, 0, 0, 20460, 10000);
@@ -90,4 +91,3 @@ VOLK_RUN_TESTS(volk_8i_convert_16i_a, 0, 0, 20460, 20000);
VOLK_RUN_TESTS(volk_8i_convert_16i_u, 0, 0, 20460, 2000);
VOLK_RUN_TESTS(volk_8i_s32f_convert_32f_a, 1e-4, 100, 20460, 2000);
VOLK_RUN_TESTS(volk_8i_s32f_convert_32f_u, 1e-4, 100, 20460, 2000);
-
diff --git a/volk/orc/volk_32fc_s32fc_multiply_32fc_a_orc_impl.orc
b/volk/orc/volk_32fc_s32fc_multiply_32fc_a_orc_impl.orc
new file mode 100644
index 0000000..2577e03
--- /dev/null
+++ b/volk/orc/volk_32fc_s32fc_multiply_32fc_a_orc_impl.orc
@@ -0,0 +1,18 @@
+.function volk_32fc_s32fc_multiply_32fc_a_orc_impl
+.source 8 src1
+.floatparam 8 scalar
+.dest 8 dst
+.temp 8 iqprod
+.temp 4 real
+.temp 4 imag
+.temp 4 ac
+.temp 4 bd
+.temp 8 swapped
+x2 mulf iqprod, src1, scalar
+splitql bd, ac, iqprod
+subf real, ac, bd
+swaplq swapped, src1
+x2 mulf iqprod, swapped, scalar
+splitql bd, ac, iqprod
+addf imag, ac, bd
+mergelq dst, real, imag
- [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 <=
- [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, 2016/08/14
- [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