summaryrefslogtreecommitdiff
path: root/gr-trellis/src/lib/trellis_siso_f.cc
diff options
context:
space:
mode:
authoranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>2006-08-30 18:33:26 +0000
committeranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>2006-08-30 18:33:26 +0000
commit07759120a1e53495aea91215d507977c83cfe431 (patch)
tree9997560b1ee4580792e588df014e4384fcd1f2aa /gr-trellis/src/lib/trellis_siso_f.cc
parent2dd336e418b5459558e7590e2d72347b1b689522 (diff)
Added a siso_combined block analogous to the viterbi_combined; useful for FSMs with a large output alphabet
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3452 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-trellis/src/lib/trellis_siso_f.cc')
-rw-r--r--gr-trellis/src/lib/trellis_siso_f.cc34
1 files changed, 22 insertions, 12 deletions
diff --git a/gr-trellis/src/lib/trellis_siso_f.cc b/gr-trellis/src/lib/trellis_siso_f.cc
index df364fc659..6d85481946 100644
--- a/gr-trellis/src/lib/trellis_siso_f.cc
+++ b/gr-trellis/src/lib/trellis_siso_f.cc
@@ -62,9 +62,9 @@ trellis_siso_f::trellis_siso_f (
d_SK (SK),
d_POSTI (POSTI),
d_POSTO (POSTO),
- d_SISO_TYPE (SISO_TYPE),
- d_alpha(FSM.S()*(K+1)),
- d_beta(FSM.S()*(K+1))
+ d_SISO_TYPE (SISO_TYPE)//,
+ //d_alpha(FSM.S()*(K+1)),
+ //d_beta(FSM.S()*(K+1))
{
int multiple;
if (d_POSTI && d_POSTO)
@@ -77,10 +77,16 @@ trellis_siso_f::trellis_siso_f (
throw std::runtime_error ("Not both POSTI and POSTO can be false.");
//printf("constructor: Multiple = %d\n",multiple);
set_output_multiple (d_K*multiple);
- //what is the meaning of relative rate for this?
- // it was suggested to use the one furthest from 1.0
- // let's do it.
- set_relative_rate ( multiple / ((double) d_FSM.I()) );
+ //what is the meaning of relative rate for a block with 2 inputs?
+ //set_relative_rate ( multiple / ((double) d_FSM.I()) );
+ // it turns out that the above gives problems in the scheduler, so
+ // let's try (assumption O>I)
+ //set_relative_rate ( multiple / ((double) d_FSM.O()) );
+ // I am tempted to automate like this
+ if(d_FSM.I() <= d_FSM.O())
+ set_relative_rate ( multiple / ((double) d_FSM.O()) );
+ else
+ set_relative_rate ( multiple / ((double) d_FSM.I()) );
}
@@ -129,11 +135,14 @@ void siso_algorithm(int I, int S, int O,
int S0,int SK,
bool POSTI, bool POSTO,
float (*p2mymin)(float,float),
- const float *priori, const float *prioro, float *post,
- std::vector<float> &alpha,
- std::vector<float> &beta)
+ const float *priori, const float *prioro, float *post//,
+ //std::vector<float> &alpha,
+ //std::vector<float> &beta
+ )
{
float norm,mm,minm;
+ std::vector<float> alpha(S*(K+1));
+ std::vector<float> beta(S*(K+1));
if(S0<0) { // initial state not specified
@@ -309,8 +318,9 @@ trellis_siso_f::general_work (int noutput_items,
d_POSTI,d_POSTO,
p2min,
&(in1[n*d_K*d_FSM.I()]),&(in2[n*d_K*d_FSM.O()]),
- &(out[n*d_K*multiple]),
- d_alpha,d_beta);
+ &(out[n*d_K*multiple])//,
+ //d_alpha,d_beta
+ );
}
}