GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
max_blk.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014,2015,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 
12 #ifndef MAX_BLK_H
13 #define MAX_BLK_H
14 
15 #include <gnuradio/blocks/api.h>
16 #include <gnuradio/sync_block.h>
17 #include <cstdint>
18 
19 namespace gr {
20 namespace blocks {
21 
22 /*!
23  * \brief Compares vectors from multiple streams and determines
24  * the maximum value from each vector over all streams.
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. If vlen_out == 1 then
30  * It will look through these streams of \p vlen
31  * data items and the output stream will contain the maximum value
32  * in the vector.
33  * If vlen_out == vlen and not equal to 1 then
34  * output will be a vector with individual items selected from
35  * the maximum corresponding input vector items.
36  */
37 template <class T>
38 class BLOCKS_API max_blk : virtual public sync_block
39 {
40 public:
41  // gr::blocks::max_blk::sptr
42  typedef std::shared_ptr<max_blk<T>> sptr;
43 
44  static sptr make(size_t vlen, size_t vlen_out = 1);
45 };
46 
50 } /* namespace blocks */
51 } /* namespace gr */
52 
53 #endif /* MAX_BLK_H */
Compares vectors from multiple streams and determines the maximum value from each vector over all str...
Definition: max_blk.h:39
std::shared_ptr< max_blk< T > > sptr
Definition: max_blk.h:42
static sptr make(size_t vlen, size_t vlen_out=1)
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
max_blk< std::int16_t > max_ss
Definition: max_blk.h:47
max_blk< std::int32_t > max_ii
Definition: max_blk.h:48
max_blk< float > max_ff
Definition: max_blk.h:49
GNU Radio logging wrapper.
Definition: basic_block.h:29