summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--volk/Makefile.am5
-rw-r--r--volk/config/Makefile.am1
-rw-r--r--volk/config/lv_configure.m43
-rw-r--r--volk/configure.ac1
-rw-r--r--volk/include/volk/Makefile.am2
-rw-r--r--volk/include/volk/archs.xml4
-rw-r--r--volk/include/volk/make_set_simd.py3
-rw-r--r--volk/include/volk/volk_32f_sqrt_aligned16.h13
-rw-r--r--volk/lib/Makefile.am17
-rw-r--r--volk/lib/qa_32f_sqrt_aligned16.cc15
10 files changed, 55 insertions, 9 deletions
diff --git a/volk/Makefile.am b/volk/Makefile.am
index 3521dd0e4..c1cd9aace 100644
--- a/volk/Makefile.am
+++ b/volk/Makefile.am
@@ -24,7 +24,7 @@ ACLOCAL_AMFLAGS = -I config
include $(top_srcdir)/Makefile.common
EXTRA_DIST = bootstrap configure config.h.in volk_config.h
-SUBDIRS = config include lib
+SUBDIRS = config orc include lib
#if USE_PYTHON
#SUBDIRS += python
#endif
@@ -53,4 +53,5 @@ distclean-local:
-rm -f include/Makefile.in
-rm -f lib/Makefile.in
-rm -f python/Makefile.in
- -rm -f configure \ No newline at end of file
+ -rm -f configure
+ -rm -f orc/Makefile.in
diff --git a/volk/config/Makefile.am b/volk/config/Makefile.am
index 0e556c6e2..1d0041e35 100644
--- a/volk/config/Makefile.am
+++ b/volk/config/Makefile.am
@@ -45,6 +45,7 @@ m4macros = \
mkstemp.m4 \
onceonly.m4 \
pkg.m4 \
+ orc.m4 \
gcc_version_workaround.m4
diff --git a/volk/config/lv_configure.m4 b/volk/config/lv_configure.m4
index c7a5fe960..f98b2dc5b 100644
--- a/volk/config/lv_configure.m4
+++ b/volk/config/lv_configure.m4
@@ -100,6 +100,9 @@ dnl AM_CONDITIONAL([USE_PYTHON], [test "$with_python" = yes])
GR_PWIN32
GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS
+ dnl Check for liborc
+ ORC_CHECK
+
LDFLAGS="$LDFLAGS $LIBGNURADIO_CORE_EXTRA_LDFLAGS"
AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
diff --git a/volk/configure.ac b/volk/configure.ac
index 8f17e5065..8e2f5b8b9 100644
--- a/volk/configure.ac
+++ b/volk/configure.ac
@@ -76,6 +76,7 @@ AC_CONFIG_FILES([\
include/Makefile \
include/volk/Makefile \
lib/Makefile \
+ orc/Makefile \
volk.pc \
])
diff --git a/volk/include/volk/Makefile.am b/volk/include/volk/Makefile.am
index 04a43bd34..99276ab87 100644
--- a/volk/include/volk/Makefile.am
+++ b/volk/include/volk/Makefile.am
@@ -179,4 +179,4 @@ distclean-local:
rm -f Makefile.in
rm -f volk_environment_init.h
rm -f volk_mktables
- rm -f $(BUILT_SOURCES) \ No newline at end of file
+ rm -f $(BUILT_SOURCES)
diff --git a/volk/include/volk/archs.xml b/volk/include/volk/archs.xml
index b7c98500f..a828e5ad0 100644
--- a/volk/include/volk/archs.xml
+++ b/volk/include/volk/archs.xml
@@ -5,6 +5,10 @@
<flag>none</flag>
</arch>
+<arch name="orc" type="all">
+ <flag>lorc-0.4</flag>
+</arch>
+
<arch name="altivec" type="powerpc">
<flag>maltivec</flag>
</arch>
diff --git a/volk/include/volk/make_set_simd.py b/volk/include/volk/make_set_simd.py
index 842366b18..e568aebfa 100644
--- a/volk/include/volk/make_set_simd.py
+++ b/volk/include/volk/make_set_simd.py
@@ -111,6 +111,9 @@ def make_set_simd(dom) :
tempstring = tempstring + " AC_DEFINE(LV_HAVE_" + arch.swapcase() + ", 1, [always set "+ arch + "!])\n";
tempstring = tempstring + " ADDONS=\"\"\n";
tempstring = tempstring + " BUILT_ARCHS=\"generic\"\n";
+ tempstring = tempstring + " if test $HAVE_ORC = yes; then\n";
+ tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} orc\"\n";
+ tempstring = tempstring + " fi\n";
tempstring = tempstring + " _MAKE_FAKE_PROCCPU\n";
tempstring = tempstring + " OVERRULE_FLAG=\"no\"\n";
tempstring = tempstring + " if test -z \"$cf_with_lv_arch\"; then\n";
diff --git a/volk/include/volk/volk_32f_sqrt_aligned16.h b/volk/include/volk/volk_32f_sqrt_aligned16.h
index 0b2eaf251..f6996ad5f 100644
--- a/volk/include/volk/volk_32f_sqrt_aligned16.h
+++ b/volk/include/volk/volk_32f_sqrt_aligned16.h
@@ -58,6 +58,19 @@ static inline void volk_32f_sqrt_aligned16_generic(float* cVector, const float*
}
#endif /* LV_HAVE_GENERIC */
+#if LV_HAVE_ORC
+extern void volk_32f_sqrt_aligned16_orc_impl(float *, const float*, unsigned int);
+/*!
+ \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 sqrted
+ \param num_points The number of values in aVector and bVector to be sqrted together and stored into cVector
+*/
+static inline void volk_32f_sqrt_aligned16_orc(float* cVector, const float* aVector, unsigned int num_points){
+ volk_32f_sqrt_aligned16_orc_impl(cVector, aVector, num_points);
+}
+
+#endif /* LV_HAVE_ORC */
diff --git a/volk/lib/Makefile.am b/volk/lib/Makefile.am
index 814d438fd..1291b01cd 100644
--- a/volk/lib/Makefile.am
+++ b/volk/lib/Makefile.am
@@ -45,7 +45,9 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_CPPFLAGS) \
# list of programs run by "make check" and "make distcheck"
#TESTS = test_all
-
+#orc stuff gets built in the ORC directory conditional to ORC being enabled.
+#it gets linked in during the build of libvolk as an added library.
+#there might be a better way to do this.
lib_LTLIBRARIES = \
libvolk.la \
@@ -72,6 +74,9 @@ universal_CODE = \
generic_CODE = \
volk_cpu_generic.c
+
+orc_CODE = \
+ volk_cpu_orc.c
x86_CODE = \
volk_cpu_x86.c
@@ -133,10 +138,9 @@ endif
-libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
-libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
-
-libvolk_la_LIBADD =
+libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -lorc-0.4
+libvolk_runtime_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -lorc-0.4
+libvolk_la_LIBADD = ../orc/libvolk_orc.a
@@ -233,11 +237,12 @@ libvolk_qa_la_SOURCES = \
qa_32f_stddev_aligned16.cc \
qa_32f_stddev_and_mean_aligned16.cc
-libvolk_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
+libvolk_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 -lorc-0.4
libvolk_qa_la_LIBADD = \
libvolk.la \
libvolk_runtime.la \
+ ../orc/libvolk_orc.a \
$(CPPUNIT_LIBS)
# ----------------------------------------------------------------
diff --git a/volk/lib/qa_32f_sqrt_aligned16.cc b/volk/lib/qa_32f_sqrt_aligned16.cc
index 9a5f71de0..81d66dad7 100644
--- a/volk/lib/qa_32f_sqrt_aligned16.cc
+++ b/volk/lib/qa_32f_sqrt_aligned16.cc
@@ -52,6 +52,14 @@ void qa_32f_sqrt_aligned16::t1() {
total = (double)(end-start)/(double)CLOCKS_PER_SEC;
printf("generic_time: %f\n", total);
+ start = clock();
+ for(int count = 0; count < ITERS; ++count) {
+ volk_32f_sqrt_aligned16_manual(output0, input0, vlen, "orc");
+ }
+ end = clock();
+ total = (double)(end-start)/(double)CLOCKS_PER_SEC;
+ printf("orc_time: %f\n", total);
+
/*
for(int i = 0; i < 10; ++i) {
printf("inputs: %f\n", input0[i]);
@@ -93,6 +101,13 @@ void qa_32f_sqrt_aligned16::t1() {
printf("generic_time: %f\n", total);
start = clock();
for(int count = 0; count < ITERS; ++count) {
+ volk_32f_sqrt_aligned16_manual(output0, input0, vlen, "orc");
+ }
+ end = clock();
+ total = (double)(end-start)/(double)CLOCKS_PER_SEC;
+ printf("orc_time: %f\n", total);
+ start = clock();
+ for(int count = 0; count < ITERS; ++count) {
volk_32f_sqrt_aligned16_manual(output01, input0, vlen, "sse");
}
end = clock();