commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 13/43: fec: ldpc GRC compat cleanup


From: git
Subject: [Commit-gnuradio] [gnuradio] 13/43: fec: ldpc GRC compat cleanup
Date: Thu, 2 Apr 2015 19:15:50 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit d8b1d478e1caaef086b05602a45984212ef6402b
Author: Tim O'Shea <address@hidden>
Date:   Wed Apr 1 11:38:58 2015 -0700

    fec: ldpc GRC compat cleanup
---
 gr-fec/grc/ldpc_decoder_def_list.xml       | 17 +++++----
 gr-fec/grc/ldpc_encoder_def_list.xml       | 24 ++++++++-----
 gr-fec/include/gnuradio/fec/ldpc_decoder.h |  8 ++---
 gr-fec/include/gnuradio/fec/ldpc_encoder.h | 57 ++++++++++++++----------------
 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 9e21f24..22df939 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 9ec98b6..5975f78 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 bc26464..3a80dcb 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 86220e9..1ed02e8 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 */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]