summaryrefslogtreecommitdiff
path: root/gr-blocks/include
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-02-28 23:05:12 -0500
committerTom Rondeau <trondeau@vt.edu>2013-02-28 23:05:12 -0500
commit682b7c7c601446b64670f5041fa995ecffa06542 (patch)
treea642e64b1ed1aabab5fc61119f4e7f6c57ae835e /gr-blocks/include
parentff9e66ad7c9f22bf2741e760940bb6609848ede8 (diff)
parent4c164f4cbb7fc9284bec147809b078d0a8ed9f88 (diff)
Merge branch 'master' into next
Conflicts: gr-blocks/python/qa_argmax.py gr-blocks/python/qa_max.py
Diffstat (limited to 'gr-blocks/include')
-rw-r--r--gr-blocks/include/blocks/CMakeLists.txt2
-rw-r--r--gr-blocks/include/blocks/argmax_XX.h.t60
-rw-r--r--gr-blocks/include/blocks/max_XX.h.t58
3 files changed, 120 insertions, 0 deletions
diff --git a/gr-blocks/include/blocks/CMakeLists.txt b/gr-blocks/include/blocks/CMakeLists.txt
index fdf3b08766..deebbdd6b7 100644
--- a/gr-blocks/include/blocks/CMakeLists.txt
+++ b/gr-blocks/include/blocks/CMakeLists.txt
@@ -69,8 +69,10 @@ expand_h(add_const_XX ss ii ff cc)
expand_h(add_const_vXX ss ii ff cc)
expand_h(and_XX bb ss ii)
expand_h(and_const_XX bb ss ii)
+expand_h(argmax_XX fs is ss)
expand_h(divide_XX ss ii ff cc)
expand_h(integrate_XX ss ii ff cc)
+expand_h(max_XX ff ii ss)
expand_h(multiply_XX ss ii)
expand_h(multiply_const_XX ss ii)
expand_h(multiply_const_vXX ss ii ff cc)
diff --git a/gr-blocks/include/blocks/argmax_XX.h.t b/gr-blocks/include/blocks/argmax_XX.h.t
new file mode 100644
index 0000000000..4c25c1c8c4
--- /dev/null
+++ b/gr-blocks/include/blocks/argmax_XX.h.t
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Compares vectors from multiple streams and determines
+ * the index in the vector and stream number where the maximum
+ * value occurred.
+ * \ingroup math_blk
+ *
+ * Data is passed in as a vector of length \p vlen from multiple
+ * input sources. It will look through these streams of \p vlen
+ * data items and output two streams.
+ * Stream 0 will contain the index value in the vector where
+ * the maximum value occurred.
+ * Stream 1 will contain the number of the input stream that
+ * held the maximum value.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/max_XX.h.t b/gr-blocks/include/blocks/max_XX.h.t
new file mode 100644
index 0000000000..9e74bf3cac
--- /dev/null
+++ b/gr-blocks/include/blocks/max_XX.h.t
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013 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 GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Compares vectors from multiple streams and determines
+ * the maximum value from each vector over all streams.
+ * \ingroup math_blk
+ *
+ * Data is passed in as a vector of length \p vlen from multiple
+ * input sources. It will look through these streams of \p vlen
+ * data items and output two streams.
+ * Stream 0 will contain the index value in the vector where
+ * the maximum value occurred.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
+