From 5b45b875ed58fd66234764a05da42c6eaff22c4d Mon Sep 17 00:00:00 2001
From: Nick Foster <nick@nerdnetworks.org>
Date: Tue, 11 Jan 2011 15:17:55 -0800
Subject: Volk: Added more Orc routines (including complex multiply). Started
 redoing the testing framework so it's easier to add new archs to tests.

---
 volk/include/volk/volk_32f_normalize_aligned16.h     | 15 +++++++++++++++
 volk/include/volk/volk_32fc_32f_multiply_aligned16.h | 13 +++++++++++++
 volk/include/volk/volk_32fc_multiply_aligned16.h     | 17 +++++++++++++++++
 3 files changed, 45 insertions(+)

(limited to 'volk/include')

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 */
+
+
 
 
 
-- 
cgit v1.2.3