diff options
author | Martin Braun <martin.braun@ettus.com> | 2014-06-03 19:16:04 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-07-07 22:25:44 +0200 |
commit | 1e4ef3e31f7c24bfd466fbeebadc59c87fdd0bf9 (patch) | |
tree | cc435c7b13229c7c0f858cf7697ee466fe880f88 /gr-blocks/include | |
parent | 84827e9d7b39f06b3fa33c5d8eba38fbd72a43ca (diff) |
blocks: Added multiply_matrix_cc
Diffstat (limited to 'gr-blocks/include')
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/CMakeLists.txt | 3 | ||||
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t (renamed from gr-blocks/include/gnuradio/blocks/multiply_matrix_ff.h) | 28 |
2 files changed, 17 insertions, 14 deletions
diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt index c0e20ae015..bf0c1e8e4f 100644 --- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt +++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt @@ -78,6 +78,7 @@ expand_h(moving_average_XX ss ii ff cc) expand_h(multiply_XX ss ii) expand_h(multiply_const_XX ss ii) expand_h(multiply_const_vXX ss ii ff cc) +expand_h(multiply_matrix_XX ff cc) expand_h(mute_XX ss ii ff cc) expand_h(not_XX bb ss ii) expand_h(or_XX bb ss ii) @@ -219,7 +220,7 @@ install(FILES vector_to_streams.h wavfile_sink.h wavfile_source.h - multiply_matrix_ff.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/blocks + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/blocks COMPONENT "blocks_devel" ) diff --git a/gr-blocks/include/gnuradio/blocks/multiply_matrix_ff.h b/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t index 90bb68824d..25e7212105 100644 --- a/gr-blocks/include/gnuradio/blocks/multiply_matrix_ff.h +++ b/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t @@ -20,8 +20,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_H -#define INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_H +// @WARNING@ + +#ifndef @GUARD_NAME@ +#define @GUARD_NAME@ #include <gnuradio/blocks/api.h> #include <gnuradio/sync_block.h> @@ -36,9 +38,9 @@ namespace gr { * This block is similar to gr::blocks::multiply_const_ff, the difference * being it can handle several inputs and outputs, and the input-to-output * relation can be described by the following mathematical equation: - * \[ + * \f[ * y(k) = A x(k) \, , \, y \in \mathbb{R}^N, x \in \mathbb{R}^M, A \in \mathbb{R}^{N \times M} - * \] + * \f] * \$y(k)\$ and \$x(i)\$ are column-vectors describing the elements on the input port * at time step \$k\$ (this is a sync block with no memory). * @@ -47,16 +49,16 @@ namespace gr { * - Simulation of static MIMO-Channels (in that case, \$A\$ is the channel matrix) * * This block features a special tag propagation mode: When setting the tag propagation policy - * to gr::blocks::multiply_matrix_ff::TPP_SELECT_BY_MATRIX, a tag is propagated from input k - * to output l if \$(A)_{l,k} \neq 0\$. + * to gr::blocks::@NAME@::TPP_SELECT_BY_MATRIX, a tag is propagated from input k + * to output l if \f$(A)_{l,k} \neq 0\f$. * * A message port (\p set_A) allows to set the matrix. *Note*: It is not possible to change * the dimension of the matrix after initialization, as this affects the I/O signature! */ - class BLOCKS_API multiply_matrix_ff : virtual public gr::sync_block + class BLOCKS_API @NAME@ : virtual public gr::sync_block { public: - typedef boost::shared_ptr<multiply_matrix_ff> sptr; + typedef boost::shared_ptr<@NAME@> sptr; /*! * \param A The matrix @@ -64,14 +66,14 @@ namespace gr { * Note this can be any gr::block::tag_propagation_policy_t value, or TPP_SELECT_BY_MATRIX. */ static sptr make( - std::vector<std::vector<float> > A, + std::vector<std::vector<@O_TYPE@> > A, gr::block::tag_propagation_policy_t tag_propagation_policy=gr::block::TPP_ALL_TO_ALL ); //! Returns the current matrix - virtual const std::vector<std::vector<float> >& get_A() const = 0; + virtual const std::vector<std::vector<@O_TYPE@> >& get_A() const = 0; //! Sets the matrix to a new value \p new_A. Returns true if the new matrix was valid and could be changed. - virtual bool set_A(const std::vector<std::vector<float> > &new_A) = 0; + virtual bool set_A(const std::vector<std::vector<@O_TYPE@> > &new_A) = 0; /*! * \brief Set the policy by the scheduler to determine how tags are moved downstream. @@ -83,10 +85,10 @@ namespace gr { static const int TPP_SELECT_BY_MATRIX = 999; static const std::string MSG_PORT_NAME_SET_A; }; - const std::string multiply_matrix_ff::MSG_PORT_NAME_SET_A = "set_A"; + const std::string @NAME@::MSG_PORT_NAME_SET_A = "set_A"; } // namespace blocks } // namespace gr -#endif /* INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_H */ +#endif /* @GUARD_NAME */ |