[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/12: volk: add 32f_invsqrt_32f avx proto
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/12: volk: add 32f_invsqrt_32f avx proto kernel |
Date: |
Thu, 16 Jan 2014 20:33:25 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 36fff3e21f7fabde1517b425b152eece44a2b33c
Author: Nathan West <address@hidden>
Date: Tue Nov 26 13:43:03 2013 -0600
volk: add 32f_invsqrt_32f avx proto kernel
---
volk/kernels/volk/volk_32f_invsqrt_32f.h | 64 ++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/volk/kernels/volk/volk_32f_invsqrt_32f.h
b/volk/kernels/volk/volk_32f_invsqrt_32f.h
index 994eccf..c1d28c1 100644
--- a/volk/kernels/volk/volk_32f_invsqrt_32f.h
+++ b/volk/kernels/volk/volk_32f_invsqrt_32f.h
@@ -24,6 +24,37 @@ static inline float Q_rsqrt( float number )
return u.f;
}
+#ifdef LV_HAVE_AVX
+#include <immintrin.h>
+/*!
+\brief Sqrts 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 to be invsqrted
+\param num_points The number of values in aVector and bVector to be invsqrted
together and stored into cVector
+*/
+static inline void volk_32f_invsqrt_32f_a_avx(float* cVector, const float*
aVector, unsigned int num_points){
+ unsigned int number = 0;
+ const unsigned int eighthPoints = num_points / 8;
+
+ float* cPtr = cVector;
+ const float* aPtr = aVector;
+ __m256 aVal, cVal;
+ for (; number < eighthPoints; number++)
+ {
+ aVal = _mm256_load_ps(aPtr);
+ cVal = _mm256_rsqrt_ps(aVal);
+ _mm256_store_ps(cPtr, cVal);
+ aPtr += 8;
+ cPtr += 8;
+ }
+
+ number = eighthPoints * 8;
+ for(;number < num_points; number++)
+ *cPtr++ = Q_rsqrt(*aPtr++);
+
+}
+#endif /* LV_HAVE_AVX */
+
#ifdef LV_HAVE_SSE
#include <xmmintrin.h>
/*!
@@ -76,4 +107,37 @@ static inline void volk_32f_invsqrt_32f_generic(float*
cVector, const float* aVe
}
#endif /* LV_HAVE_GENERIC */
+#ifdef LV_HAVE_AVX
+#include <immintrin.h>
+/*!
+\brief Sqrts 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 to be invsqrted
+\param num_points The number of values in aVector and bVector to be invsqrted
together and stored into cVector
+*/
+static inline void volk_32f_invsqrt_32f_u_avx(float* cVector, const float*
aVector, unsigned int num_points){
+ unsigned int number = 0;
+ const unsigned int eighthPoints = num_points / 8;
+
+ float* cPtr = cVector;
+ const float* aPtr = aVector;
+ __m256 aVal, cVal;
+ for (; number < eighthPoints; number++)
+ {
+ aVal = _mm256_loadu_ps(aPtr);
+ cVal = _mm256_rsqrt_ps(aVal);
+ _mm256_storeu_ps(cPtr, cVal);
+ aPtr += 8;
+ cPtr += 8;
+ }
+
+ number = eighthPoints * 8;
+ for(;number < num_points; number++)
+ *cPtr++ = Q_rsqrt(*aPtr++);
+
+}
+#endif /* LV_HAVE_AVX */
+
+
+
#endif /* INCLUDED_volk_32f_invsqrt_32f_a_H */
- [Commit-gnuradio] [gnuradio] branch master updated (f7f28bb -> 67aa043), git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 09/12: Merge remote-tracking branch 'softerhardware/master', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 06/12: volk: add 32f_invsqrt_32f avx proto kernel,
git <=
- [Commit-gnuradio] [gnuradio] 04/12: digital: Allow for different lengths of pilot carrier- and -symbol allocations, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 12/12: Merge remote-tracking branch 'martin/ofdm-fixes', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 01/12: Support for >1 jack port, various sizes of jack buffers, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 03/12: digital: allow to change packet length tag name in GRC, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 08/12: volk: add 32fc_32f_multiply_32fc_a_avx protokernel, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 07/12: volk: add 32fc_32f_dot_prod_32fc u/a_avx protokernel, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 05/12: modtool: linkage info for OSX, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 11/12: Merge remote-tracking branch 'martin/modtool_osx', git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 02/12: digital: propagate tags to packet_header, git, 2014/01/16
- [Commit-gnuradio] [gnuradio] 10/12: Merge remote-tracking branch 'nwest/volk_avx', git, 2014/01/16