summaryrefslogtreecommitdiff
path: root/volk/include
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-01-11 15:17:55 -0800
committerNick Foster <nick@nerdnetworks.org>2011-01-11 15:17:55 -0800
commit5b45b875ed58fd66234764a05da42c6eaff22c4d (patch)
tree8fa375c3ebbef7c7597c67f45b12d2790a6d5deb /volk/include
parent70e978b7fdc0285b56ed3ec7be3f10dc3d922504 (diff)
Volk: Added more Orc routines (including complex multiply). Started redoing the testing framework so it's easier to add new archs to tests.
Diffstat (limited to 'volk/include')
-rw-r--r--volk/include/volk/volk_32f_normalize_aligned16.h15
-rw-r--r--volk/include/volk/volk_32fc_32f_multiply_aligned16.h13
-rw-r--r--volk/include/volk/volk_32fc_multiply_aligned16.h17
3 files changed, 45 insertions, 0 deletions
diff --git a/volk/include/volk/volk_32f_normalize_aligned16.h b/volk/include/volk/volk_32f_normalize_aligned16.h
index 1aabb1d9d3..27fb5f7faa 100644
--- a/volk/include/volk/volk_32f_normalize_aligned16.h
+++ b/volk/include/volk/volk_32f_normalize_aligned16.h
@@ -60,6 +60,21 @@ static inline void volk_32f_normalize_aligned16_generic(float* vecBuffer, const
}
#endif /* LV_HAVE_GENERIC */
+#if LV_HAVE_ORC
+/*!
+ \brief Normalizes 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 normalizeed
+ \param bVector One of the vectors to be normalizeed
+ \param num_points The number of values in aVector and bVector to be normalizeed together and stored into cVector
+*/
+extern void volk_32f_normalize_aligned16_orc_impl(float* vecBuffer, const float scalar, unsigned int num_points);
+static inline void volk_32f_normalize_aligned16_orc(float* vecBuffer, const float scalar, unsigned int num_points){
+ float invscalar = 1.0 / scalar;
+ volk_32f_normalize_aligned16_orc_impl(vecBuffer, invscalar, num_points);
+}
+#endif /* LV_HAVE_GENERIC */
+
diff --git a/volk/include/volk/volk_32fc_32f_multiply_aligned16.h b/volk/include/volk/volk_32fc_32f_multiply_aligned16.h
index 436656ca06..304ed8e2d0 100644
--- a/volk/include/volk/volk_32fc_32f_multiply_aligned16.h
+++ b/volk/include/volk/volk_32fc_32f_multiply_aligned16.h
@@ -76,6 +76,19 @@ static inline void volk_32fc_32f_multiply_aligned16_generic(lv_32fc_t* cVector,
}
#endif /* LV_HAVE_GENERIC */
+#if LV_HAVE_ORC
+ /*!
+ \brief Multiplies the input complex vector with the input lv_32fc_t vector and store their results in the third vector
+ \param cVector The vector where the results will be stored
+ \param aVector The complex vector to be multiplied
+ \param bVector The vectors containing the lv_32fc_t values to be multiplied against each complex value in aVector
+ \param num_points The number of values in aVector and bVector to be multiplied together and stored into cVector
+ */
+extern void volk_32fc_32f_multiply_aligned16_orc_impl(lv_32fc_t* cVector, const lv_32fc_t* aVector, const float* bVector, unsigned int num_points);
+static inline void volk_32fc_32f_multiply_aligned16_orc(lv_32fc_t* cVector, const lv_32fc_t* aVector, const float* bVector, unsigned int num_points){
+ volk_32fc_32f_multiply_aligned16_orc_impl(cVector, aVector, bVector, num_points);
+}
+#endif /* LV_HAVE_GENERIC */
diff --git a/volk/include/volk/volk_32fc_multiply_aligned16.h b/volk/include/volk/volk_32fc_multiply_aligned16.h
index 6a1649fdb4..c8f2418c32 100644
--- a/volk/include/volk/volk_32fc_multiply_aligned16.h
+++ b/volk/include/volk/volk_32fc_multiply_aligned16.h
@@ -4,6 +4,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <volk/volk_complex.h>
+#include <float.h>
#if LV_HAVE_SSE3
#include <pmmintrin.h>
@@ -72,6 +73,22 @@ static inline void volk_32fc_multiply_aligned16_generic(lv_32fc_t* cVector, cons
}
#endif /* LV_HAVE_GENERIC */
+#if 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_multiply_aligned16_orc_impl(lv_32fc_t* cVector, const lv_32fc_t* aVector, const lv_32fc_t* bVector, float mask, unsigned int num_points);
+static inline void volk_32fc_multiply_aligned16_orc(lv_32fc_t* cVector, const lv_32fc_t* aVector, const lv_32fc_t* bVector, unsigned int num_points){
+ static const float mask = -0.0;
+ volk_32fc_multiply_aligned16_orc_impl(cVector, aVector, bVector, mask, num_points);
+}
+#endif /* LV_HAVE_ORC */
+
+