[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuradio-commit
Subject: [Commit-gnuradio] [gnuradio] 13/22: volk: add neon versions for 32i bitwise operators
From: git () gnuradio ! org
Date: 2014-10-31 19:22:31
Message-ID: 20141031192231.4829C1A82A2 () hertz ! gnuradio ! org
[Download RAW message or body]
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 34670fd911d4f491d5b6c6140b703619283d1432
Author: Nathan West <nathan.west@okstate.edu>
Date: Mon Oct 20 19:07:29 2014 -0500
volk: add neon versions for 32i bitwise operators
---
volk/kernels/volk/volk_32i_x2_and_32i.h | 34 +++++++++++++++++++++++++++++++++
volk/kernels/volk/volk_32i_x2_or_32i.h | 34 +++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
diff --git a/volk/kernels/volk/volk_32i_x2_and_32i.h \
b/volk/kernels/volk/volk_32i_x2_and_32i.h index b33a60e..c138540 100644
--- a/volk/kernels/volk/volk_32i_x2_and_32i.h
+++ b/volk/kernels/volk/volk_32i_x2_and_32i.h
@@ -65,6 +65,40 @@ static inline void volk_32i_x2_and_32i_a_sse(int32_t* cVector, \
const int32_t* aV }
#endif /* LV_HAVE_SSE */
+#ifdef LV_HAVE_NEON
+#include <arm_neon.h>
+/*!
+ \brief Ands the two input vectors and store their results in the third vector
+ \param cVector The vector where the results will be stored
+ \param aVector One of the vectors
+ \param bVector One of the vectors
+ \param num_points The number of values in aVector and bVector to be anded together \
and stored into cVector +*/
+static inline void volk_32i_x2_and_32i_neon(int32_t* cVector, const int32_t* \
aVector, const int32_t* bVector, unsigned int num_points){ + int32_t* cPtr = \
cVector; + const int32_t* aPtr = aVector;
+ const int32_t* bPtr= bVector;
+ unsigned int number = 0;
+ unsigned int quarter_points = num_points / 4;
+
+ int32x4_t a_val, b_val, c_val;
+
+ for(number = 0; number < quarter_points; number++){
+ a_val = vld1q_s32(aPtr);
+ b_val = vld1q_s32(bPtr);
+ c_val = vandq_s32(a_val, b_val);
+ vst1q_s32(cPtr, c_val);
+ aPtr += 4;
+ bPtr += 4;
+ cPtr += 4;
+ }
+
+ for(number = quarter_points * 4; number < num_points; number++){
+ *cPtr++ = (*aPtr++) & (*bPtr++);
+ }
+}
+#endif /* LV_HAVE_NEON */
+
#ifdef LV_HAVE_GENERIC
/*!
\brief Ands the two input vectors and store their results in the third vector
diff --git a/volk/kernels/volk/volk_32i_x2_or_32i.h \
b/volk/kernels/volk/volk_32i_x2_or_32i.h index a8556a3..544a71c 100644
--- a/volk/kernels/volk/volk_32i_x2_or_32i.h
+++ b/volk/kernels/volk/volk_32i_x2_or_32i.h
@@ -65,6 +65,40 @@ static inline void volk_32i_x2_or_32i_a_sse(int32_t* cVector, \
const int32_t* aVe }
#endif /* LV_HAVE_SSE */
+#ifdef LV_HAVE_NEON
+#include <arm_neon.h>
+/*!
+ \brief Ands the two input vectors and store their results in the third vector
+ \param cVector The vector where the results will be stored
+ \param aVector One of the vectors
+ \param bVector One of the vectors
+ \param num_points The number of values in aVector and bVector to be anded together \
and stored into cVector +*/
+static inline void volk_32i_x2_or_32i_neon(int32_t* cVector, const int32_t* aVector, \
const int32_t* bVector, unsigned int num_points){ + int32_t* cPtr = cVector;
+ const int32_t* aPtr = aVector;
+ const int32_t* bPtr= bVector;
+ unsigned int number = 0;
+ unsigned int quarter_points = num_points / 4;
+
+ int32x4_t a_val, b_val, c_val;
+
+ for(number = 0; number < quarter_points; number++){
+ a_val = vld1q_s32(aPtr);
+ b_val = vld1q_s32(bPtr);
+ c_val = vorrq_s32(a_val, b_val);
+ vst1q_s32(cPtr, c_val);
+ aPtr += 4;
+ bPtr += 4;
+ cPtr += 4;
+ }
+
+ for(number = quarter_points * 4; number < num_points; number++){
+ *cPtr++ = (*aPtr++) | (*bPtr++);
+ }
+}
+#endif /* LV_HAVE_NEON */
+
#ifdef LV_HAVE_GENERIC
/*!
\brief Ors the two input vectors and store their results in the third vector
_______________________________________________
Commit-gnuradio mailing list
Commit-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/commit-gnuradio
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic