From 6e21a1078c833ec54a84a61c1afd2d8d21e8a8f7 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 6 Sep 2011 20:26:00 -0400 Subject: trellis: removing generated files. --- .../src/lib/trellis_pccc_decoder_combined_cb.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_cb.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_cb.i | 73 ---------- .../src/lib/trellis_pccc_decoder_combined_ci.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_ci.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_ci.i | 73 ---------- .../src/lib/trellis_pccc_decoder_combined_cs.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_cs.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_cs.i | 73 ---------- .../src/lib/trellis_pccc_decoder_combined_fb.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_fb.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_fb.i | 73 ---------- .../src/lib/trellis_pccc_decoder_combined_fi.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_fi.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_fi.i | 73 ---------- .../src/lib/trellis_pccc_decoder_combined_fs.cc | 147 --------------------- .../src/lib/trellis_pccc_decoder_combined_fs.h | 124 ----------------- .../src/lib/trellis_pccc_decoder_combined_fs.i | 73 ---------- 18 files changed, 2064 deletions(-) delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.h delete mode 100644 gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i (limited to 'gr-trellis') diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc deleted file mode 100644 index d797ce410..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_cb_sptr -trellis_make_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_cb ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_cb::trellis_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_cb", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (unsigned char))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_cb::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_cb::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_cb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const gr_complex *in = (const gr_complex *) input_items[0]; - unsigned char *out = (unsigned char *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_cb; -typedef boost::shared_ptr trellis_pccc_decoder_combined_cb_sptr; - -trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_cb : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i deleted file mode 100644 index 9ae829c55..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_cb); - -trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_cb : public gr_block -{ -private: - trellis_pccc_decoder_combined_cb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc deleted file mode 100644 index 19201947e..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_ci_sptr -trellis_make_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_ci ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_ci::trellis_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_ci", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (int))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_ci::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_ci::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_ci::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const gr_complex *in = (const gr_complex *) input_items[0]; - int *out = (int *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_ci; -typedef boost::shared_ptr trellis_pccc_decoder_combined_ci_sptr; - -trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_ci : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i deleted file mode 100644 index 5644d6992..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_ci); - -trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_ci : public gr_block -{ -private: - trellis_pccc_decoder_combined_ci ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc deleted file mode 100644 index 0ab818bfd..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_cs_sptr -trellis_make_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_cs ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_cs::trellis_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_cs", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (short))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_cs::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_cs::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_cs::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const gr_complex *in = (const gr_complex *) input_items[0]; - short *out = (short *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_cs; -typedef boost::shared_ptr trellis_pccc_decoder_combined_cs_sptr; - -trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_cs : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i deleted file mode 100644 index 7614a81fc..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_cs); - -trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_cs : public gr_block -{ -private: - trellis_pccc_decoder_combined_cs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc deleted file mode 100644 index 0122dd7e9..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_fb_sptr -trellis_make_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fb ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_fb::trellis_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_fb", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (unsigned char))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_fb::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_fb::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_fb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const float *in = (const float *) input_items[0]; - unsigned char *out = (unsigned char *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_fb; -typedef boost::shared_ptr trellis_pccc_decoder_combined_fb_sptr; - -trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_fb : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i deleted file mode 100644 index 41e1a2f4f..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fb); - -trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_fb : public gr_block -{ -private: - trellis_pccc_decoder_combined_fb ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc deleted file mode 100644 index e87487087..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_fi_sptr -trellis_make_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fi ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_fi::trellis_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_fi", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (int))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_fi::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_fi::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_fi::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const float *in = (const float *) input_items[0]; - int *out = (int *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_fi; -typedef boost::shared_ptr trellis_pccc_decoder_combined_fi_sptr; - -trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_fi : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i deleted file mode 100644 index 202609ace..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fi); - -trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_fi : public gr_block -{ -private: - trellis_pccc_decoder_combined_fi ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc deleted file mode 100644 index bb822c699..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include "core_algorithms.h" - - -static const float INF = 1.0e9; - -trellis_pccc_decoder_combined_fs_sptr -trellis_make_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) -{ - return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fs ( - FSMo, STo0, SToK, - FSMi, STi0, STiK, - INTERLEAVER, - blocklength, - repetitions, - SISO_TYPE, - D, - TABLE,METRIC_TYPE, - scaling - )); -} - -trellis_pccc_decoder_combined_fs::trellis_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -) - : gr_block ("pccc_decoder_combined_fs", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (short))), - d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), - d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), - d_INTERLEAVER (INTERLEAVER), - d_blocklength (blocklength), - d_repetitions (repetitions), - d_SISO_TYPE (SISO_TYPE), - d_D (D), - d_TABLE (TABLE), - d_METRIC_TYPE (METRIC_TYPE), - d_scaling (scaling) -{ - assert(d_FSMo.I() == d_FSMi.I()); - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_blocklength); -} - -void trellis_pccc_decoder_combined_fs::set_scaling(float scaling) -{ - d_scaling = scaling; -} - - -void -trellis_pccc_decoder_combined_fs::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_blocklength == 0); - int input_required = d_D * noutput_items ; - ninput_items_required[0] = input_required; -} - - - -//=========================================================== - -int -trellis_pccc_decoder_combined_fs::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_blocklength == 0); - int nblocks = noutput_items / d_blocklength; - - float (*p2min)(float, float) = NULL; - if(d_SISO_TYPE == TRELLIS_MIN_SUM) - p2min = &min; - else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) - p2min = &min_star; - - - const float *in = (const float *) input_items[0]; - short *out = (short *) output_items[0]; - for (int n=0;n -#include -#include "calc_metric.h" -#include "siso_type.h" - -class trellis_pccc_decoder_combined_fs; -typedef boost::shared_ptr trellis_pccc_decoder_combined_fs_sptr; - -trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -/*! - * \ingroup coding_blk - */ -class trellis_pccc_decoder_combined_fs : public gr_block -{ - fsm d_FSMo; - fsm d_FSMi; - int d_STo0; - int d_SToK; - int d_STi0; - int d_STiK; - interleaver d_INTERLEAVER; - int d_blocklength; - int d_repetitions; - trellis_siso_type_t d_SISO_TYPE; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_METRIC_TYPE; - float d_scaling; - std::vector d_buffer; - - friend trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - - trellis_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling () const { return d_scaling; } - void set_scaling (float scaling); - - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i deleted file mode 100644 index b8bbf09d6..000000000 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fs); - -trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling -); - - -class trellis_pccc_decoder_combined_fs : public gr_block -{ -private: - trellis_pccc_decoder_combined_fs ( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, - int blocklength, - int repetitions, - trellis_siso_type_t SISO_TYPE, - int D, - const std::vector &TABLE, - trellis_metric_type_t METRIC_TYPE, - float scaling - ); - -public: - fsm FSM1 () const { return d_FSMo; } - fsm FSM2 () const { return d_FSMi; } - int ST10 () const { return d_STo0; } - int ST1K () const { return d_SToK; } - int ST20 () const { return d_STi0; } - int ST2K () const { return d_STiK; } - interleaver INTERLEAVER () const { return d_INTERLEAVER; } - int blocklength () const { return d_blocklength; } - int repetitions () const { return d_repetitions; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } - trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } - float scaling() const { return d_scaling; } - void set_scaling (float scaling); -}; -- cgit