GNU Radio C++ API Reference: argmax.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
argmax.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2007,2013,2018 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef ARGMAX_H
12#define ARGMAX_H
13
14#include <gnuradio/blocks/api.h>
15#include <gnuradio/sync_block.h>
16#include <cstdint>
17
18namespace gr {
19namespace blocks {
20
21/*!
22 * \brief Compares vectors from multiple streams and determines
23 * the index in the vector and stream number where the maximum
24 * value occurred.
25 * \ingroup math_operators_blk
26 *
27 * \details
28 * Data is passed in as a vector of length \p vlen from multiple
29 * input sources. It will look through these streams of \p vlen
30 * data items and output two streams:
31 *
32 * \li Stream 0 will contain the index value in the vector where
33 * the maximum value occurred.
34 *
35 * \li Stream 1 will contain the number of the input stream that
36 * held the maximum value.
37 */
38template <class T>
39 class BLOCKS_API argmax : virtual public sync_block
40{
41public:
42 typedef std::shared_ptr<argmax<T>> sptr;
43
44 static sptr make(size_t vlen);
45};
46
47 typedef argmax<float> argmax_fs;
48 typedef argmax<std::int32_t> argmax_is;
49 typedef argmax<std::int16_t> argmax_ss;
50} /* namespace blocks */
51} /* namespace gr */
52
53#endif /* ARGMAX_H */
gr::blocks::argmax
Compares vectors from multiple streams and determines the index in the vector and stream number where...
Definition argmax.h:40
gr::blocks::argmax::make
static sptr make(size_t vlen)
gr::blocks::argmax::sptr
std::shared_ptr< argmax< T > > sptr
Definition argmax.h:42
gr::sync_block::sync_block
sync_block(void)
Definition sync_block.h:28
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr::blocks::argmax_ss
argmax< std::int16_t > argmax_ss
Definition argmax.h:49
gr::blocks::argmax_is
argmax< std::int32_t > argmax_is
Definition argmax.h:48
gr::blocks::argmax_fs
argmax< float > argmax_fs
Definition argmax.h:47
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h