summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-fec/grc/ldpc_decoder_def_list.xml17
-rwxr-xr-xgr-fec/grc/ldpc_encoder_def_list.xml24
-rw-r--r--gr-fec/include/gnuradio/fec/ldpc_decoder.h8
-rwxr-xr-xgr-fec/include/gnuradio/fec/ldpc_encoder.h57
4 files changed, 56 insertions, 50 deletions
diff --git a/gr-fec/grc/ldpc_decoder_def_list.xml b/gr-fec/grc/ldpc_decoder_def_list.xml
index 9e21f245e7..22df93909f 100644
--- a/gr-fec/grc/ldpc_decoder_def_list.xml
+++ b/gr-fec/grc/ldpc_decoder_def_list.xml
@@ -9,7 +9,9 @@
<key>variable_ldpc_decoder_def</key>
<import>from gnuradio import fec</import>
<var_make>
-#if int($ndim())==1 #
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.ldpc_decoder.make($file, $sigma, $max_iter); #slurp
+#else if int($ndim())==1 #
self.$(id) = $(id) = map( (lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim1) ); #slurp
#else
self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
@@ -26,19 +28,22 @@ self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_decoder.make($fil
</param>
<param>
- <name>Threading Dimensions</name>
+ <name>Parallelism</name>
<key>ndim</key>
- <value></value>
+ <value>0</value>
<type>enum</type>
<option>
- <name>2</name>
- <key>2</key>
+ <name>0</name>
+ <key>0</key>
</option>
<option>
<name>1</name>
<key>1</key>
</option>
-
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
</param>
<param>
diff --git a/gr-fec/grc/ldpc_encoder_def_list.xml b/gr-fec/grc/ldpc_encoder_def_list.xml
index 9ec98b6240..5975f781dd 100755
--- a/gr-fec/grc/ldpc_encoder_def_list.xml
+++ b/gr-fec/grc/ldpc_encoder_def_list.xml
@@ -9,11 +9,14 @@
<key>variable_ldpc_encoder_def</key>
<import>from gnuradio import fec</import>
<var_make>
-#if int($ndim())==1 #
-self.$(id) = $(id) = map( (lambda a: fec.ldpc_encoder.make($file)), range(0,$dim1) ); #slurp
+#if int($ndim())==0 #
+self.$(id) = $(id) = fec.ldpc_encoder_make($file); #slurp
+#else if int($ndim())==1 #
+self.$(id) = $(id) = map( (lambda a: fec.ldpc_encoder_make($file)), range(0,$dim1) ); #slurp
#else
-self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_encoder.make($file)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
+self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_encoder_make($file)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
#end if</var_make>
+ <var_value>fec.ldpc_encoder_make($file)</var_value>
<make></make>
<!-- This definition below is wierd, it seems required for the GRC to be happy, im confused -->
@@ -26,25 +29,28 @@ self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_encoder.make($fil
</param>
<param>
- <name>Threading Dimensions</name>
+ <name>Parallelism</name>
<key>ndim</key>
- <value></value>
+ <value>0</value>
<type>enum</type>
<option>
- <name>2</name>
- <key>2</key>
+ <name>0</name>
+ <key>0</key>
</option>
<option>
<name>1</name>
<key>1</key>
</option>
-
+ <option>
+ <name>2</name>
+ <key>2</key>
+ </option>
</param>
<param>
<name>Dimension 1</name>
<key>dim1</key>
- <value>4</value>
+ <value>1</value>
<type>int</type>
<hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
</param>
diff --git a/gr-fec/include/gnuradio/fec/ldpc_decoder.h b/gr-fec/include/gnuradio/fec/ldpc_decoder.h
index bc264640ad..3a80dcb06e 100644
--- a/gr-fec/include/gnuradio/fec/ldpc_decoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_decoder.h
@@ -48,12 +48,8 @@ class FEC_API ldpc_decoder : public generic_decoder {
//plug into the generic fec api
int get_history();
float get_shift();
- int get_input_item_size();
- int get_output_item_size();
const char* get_conversion();
void generic_work(void *inBuffer, void *outbuffer);
- int get_output_size();
- int get_input_size();
int inputSize, outputSize;
@@ -69,6 +65,10 @@ class FEC_API ldpc_decoder : public generic_decoder {
static generic_decoder::sptr
make (std::string alist_file, float sigma=0.5, int max_iterations=50);
+ int get_output_size();
+ int get_input_size();
+ int get_input_item_size();
+ int get_output_item_size();
};
}
diff --git a/gr-fec/include/gnuradio/fec/ldpc_encoder.h b/gr-fec/include/gnuradio/fec/ldpc_encoder.h
index 86220e9c87..1ed02e8efe 100755
--- a/gr-fec/include/gnuradio/fec/ldpc_encoder.h
+++ b/gr-fec/include/gnuradio/fec/ldpc_encoder.h
@@ -23,44 +23,39 @@
#ifndef INCLUDED_LDPC_ENCODER_H
#define INCLUDED_LDPC_ENCODER_H
-#include <map>
-#include <string>
#include <gnuradio/fec/encoder.h>
-#include <vector>
-
#include <gnuradio/fec/cldpc.h>
#include <gnuradio/fec/alist.h>
+#include <map>
+#include <string>
+#include <vector>
namespace gr {
namespace fec {
-
-
-class FEC_API ldpc_encoder : public generic_encoder {
- //private constructor
- ldpc_encoder (std::string alist_file);
-
- //plug into the generic fec api
- void generic_work(void *inBuffer, void *outbuffer);
- int get_output_size();
- int get_input_size();
-
- // memory allocated for processing
- int outputSize;
- int inputSize;
- alist d_list;
- cldpc d_code;
-
- double rate() { return (1.0*get_input_size() / get_output_size()); }
- bool set_frame_size(unsigned int frame_size) { return false; }
-
- public:
- ~ldpc_encoder ();
- static generic_encoder::sptr make (std::string alist_file);
-
-};
-
-}
+ class FEC_API ldpc_encoder : public generic_encoder {
+ //private constructor
+ ldpc_encoder (std::string alist_file);
+
+ //plug into the generic fec api
+ void generic_work(void *inBuffer, void *outbuffer);
+
+ // memory allocated for processing
+ int outputSize;
+ int inputSize;
+ alist d_list;
+ cldpc d_code;
+
+ public:
+ ~ldpc_encoder ();
+ static generic_encoder::sptr make (std::string alist_file);
+ double rate() { return (1.0*get_input_size() / get_output_size()); }
+ bool set_frame_size(unsigned int frame_size) { return false; }
+ int get_output_size();
+ int get_input_size();
+ };
+
+ }
}
#endif /* INCLUDED_LDPC_ENCODER_H */