diff options
-rw-r--r-- | volk/config/orc.m4 | 67 | ||||
-rw-r--r-- | volk/orc/Makefile.am | 25 | ||||
-rw-r--r-- | volk/orc/volk_32f_sqrt_aligned16_orc_impl.orc | 4 |
3 files changed, 96 insertions, 0 deletions
diff --git a/volk/config/orc.m4 b/volk/config/orc.m4 new file mode 100644 index 000000000..3c501762d --- /dev/null +++ b/volk/config/orc.m4 @@ -0,0 +1,67 @@ +dnl pkg-config-based checks for Orc + +dnl specific: +dnl ORC_CHECK([REQUIRED_VERSION]) + +AC_DEFUN([ORC_CHECK], +[ + ORC_REQ=ifelse([$1], , "0.4.6", [$1]) + + AC_ARG_ENABLE(orc, + AC_HELP_STRING([--enable-orc],[use Orc if installed]), + [case "${enableval}" in + auto) enable_orc=auto ;; + yes) enable_orc=yes ;; + no) enable_orc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;; + esac + ], + [enable_orc=auto]) dnl Default value + + if test "x$enable_orc" != "xno" ; then + PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [ + AC_DEFINE(HAVE_ORC, 1, [Use Orc]) + if test "x$ORCC" = "x" ; then + ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` + fi + AC_SUBST(ORCC) + ORCC_FLAGS="--compat $ORC_REQ" + AC_SUBST(ORCC_FLAGS) + HAVE_ORC=yes + HAVE_ORCC=yes + if test "x$cross_compiling" = "xyes" ; then + HAVE_ORCC=no + fi + ], [ + if test "x$enable_orc" = "xyes" ; then + AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found]) + fi + AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) + HAVE_ORC=no + HAVE_ORCC=no + ]) + else + AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) + HAVE_ORC=no + HAVE_ORCC=no + fi + AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"]) + AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"]) + +])) + +AC_DEFUN([ORC_OUTPUT], +[ + if test "$HAVE_ORC" = yes ; then + printf "configure: *** Orc acceleration enabled.\n" + else + if test "x$enable_orc" = "xno" ; then + printf "configure: *** Orc acceleration disabled by --disable-orc.\n" + else + printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n" + printf " not found.\n" + fi + fi + printf "\n" +]) + diff --git a/volk/orc/Makefile.am b/volk/orc/Makefile.am new file mode 100644 index 000000000..f5aa7d45c --- /dev/null +++ b/volk/orc/Makefile.am @@ -0,0 +1,25 @@ +# +# Copyright 2008 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +include $(top_srcdir)/Makefile.common + +libvolk_orc_a_SOURCES = volk_32f_sqrt_aligned16_orc_impl.c +libvolk_orc_a_LDFLAGS = -lorc-0.4 +lib_LIBRARIES = libvolk_orc.a diff --git a/volk/orc/volk_32f_sqrt_aligned16_orc_impl.orc b/volk/orc/volk_32f_sqrt_aligned16_orc_impl.orc new file mode 100644 index 000000000..0983271db --- /dev/null +++ b/volk/orc/volk_32f_sqrt_aligned16_orc_impl.orc @@ -0,0 +1,4 @@ +.function volk_32f_sqrt_aligned16_orc_impl +.source 4 src +.dest 4 dst +sqrtf dst, src |