Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b

Parent Directory (gnuradio/gnuradio-core/src/lib)

Kludge Summary of gnuradio/gnuradio-core/src/lib/general

Total Kludges 33
Total Subdirs 0

All Directories within gnuradio/gnuradio-core/src/lib/general

All Files within gnuradio/gnuradio-core/src/lib/general

Kludge Snippets in gnuradio/gnuradio-core/src/lib/general

gnuradio/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc

Category TODO
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
77        {
78          //assert (0 == noutput_items % d_align_interval);
79          unsigned ninputs = ninput_items_required.size();
80          for (unsigned int i = 0; i < ninputs; i++)
81            ninput_items_required[i] = std::max(noutput_items*d_nchan*2+ history() - 1,1024*d_nchan*2+ history() - 1);//TODO include the diffs found in determine input_items_required
82        }
83        
84        bool
85        gr_align_on_samplenumbers_ss::check_topology (int ninputs, int noutputs)
				

gnuradio/gnuradio-core/src/lib/general/gr_circular_file.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
64            if (d_fd < 0){
65              perror (filename);
66              exit (1);
67            }
68        #ifdef HAVE_MMAP	/* FIXME */
69            if(ftruncate (d_fd, size + HEADER_SIZE) != 0) {
70              perror (filename);
71              exit (1);
72            }
				

gnuradio/gnuradio-core/src/lib/general/gr_circular_file.h

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
26        /*
27         * writes input data into a circular buffer on disk.
28         *
29         * the file contains a fixed header:
30         *   0x0000:    int32 magic (0xEB021026)
31         *   0x0004:	int32 size in bytes of header (constant 4096)
32         *   0x0008:	int32 size in bytes of circular buffer (not including header)
33         *   0x000C:    int32 file offset to beginning of circular buffer
34         *   0x0010:    int32 byte offset from beginning of circular buffer to 
				

gnuradio/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
50          const gr_complex *in = (const gr_complex *) input_items[0];
51          short *out = (short *) output_items[0];
52        
53          for (int i = 0; i < noutput_items/2; i++){
54            *out++ = (short) lrintf(in[i].real());	// FIXME saturate?
55            *out++ = (short) lrintf(in[i].imag());
56          }
57          
58          return noutput_items;
				

gnuradio/gnuradio-core/src/lib/general/gr_fast_atan2f.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
128          REAL x_abs, y_abs, z;
129          REAL alpha, angle, base_angle;
130          int index;
131        
132          /* don't divide by zero! */		// FIXME could get hosed with -0.0
133          if ((y == 0.0) && (x == 0.0))
134            return 0.0;
135        
136          /* normalize to +/- 45 degree range */
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.h — 1

Category Kludge
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
33         * "director" feature to implement the magic.
34         * It's slow. Don't use it in a performance critical path.
35         *
36         * Override eval to define the behavior.
37         * Use calleval to invoke eval (this kludge is required to allow a
38         * python specific "shim" to be inserted.
39         */
40        class gr_feval_dd
41        {
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.h — 2

Category Kludge
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
61         * "director" feature to implement the magic.
62         * It's slow. Don't use it in a performance critical path.
63         *
64         * Override eval to define the behavior.
65         * Use calleval to invoke eval (this kludge is required to allow a
66         * python specific "shim" to be inserted.
67         */
68        class gr_feval_cc
69        {
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.h — 3

Category Kludge
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
89         * "director" feature to implement the magic.
90         * It's slow. Don't use it in a performance critical path.
91         *
92         * Override eval to define the behavior.
93         * Use calleval to invoke eval (this kludge is required to allow a
94         * python specific "shim" to be inserted.
95         */
96        class gr_feval_ll
97        {
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.h — 4

Category Kludge
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
117         * "director" feature to implement the magic.
118         * It's slow. Don't use it in a performance critical path.
119         *
120         * Override eval to define the behavior.
121         * Use calleval to invoke eval (this kludge is required to allow a
122         * python specific "shim" to be inserted.
123         */
124        class gr_feval
125        {
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.i — 1

Category Magic
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
23        
24        /*
25         * N.B., this is a _very_ non-standard SWIG .i file
26         *
27         * It contains a bunch of magic that is required to ensure that when
28         * these classes are used as base classes for python code,
29         * everything works when calling back from C++ into Python.
30         *
31         * The gist of the problem is that our C++ code is usually not holding
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.i — 2

Category Magic
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
37         * If you don't understand SWIG "directors" or the Python GIL,
38         * don't bother trying to understand what's going on in here.
39         *
40         * [We could eliminate a bunch of this hair by requiring SWIG 1.3.29
41         * or later and some additional magic declarations, but many systems
42         * aren't shipping that version yet.  Thus we kludge...]
43         */
44        
45        
				

gnuradio/gnuradio-core/src/lib/general/gr_feval.i — 3

Category Magic
Committer eb
Commit ID 2c1032480d2874f38af9b5b9d18e753e968619e5
136          virtual void calleval();
137        };
138        
139        /*
140         * These are the ones to derive from in Python.  They have the magic shim
141         * that ensures that we're holding the Python GIL when we enter Python land...
142         */
143        
144        %inline %{
				

gnuradio/gnuradio-core/src/lib/general/gr_fft_vfc.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
32        #include <string.h>
33        #include <cstdio>
34        
35        
36        // FIXME after this is working, change to use native real to complex fft.
37        // It should run twice as fast.
38        
39        
40        
				

gnuradio/gnuradio-core/src/lib/general/gr_kludge_copy.h

Category Kludge
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
33        /*!
34         * \brief output[i] = input[i]
35         * \ingroup misc_blk
36         *
37         * This is a short term kludge to work around a problem with the hierarchical block impl.
38         */
39        class gr_kludge_copy : public gr_sync_block
40        {
41          size_t		d_itemsize;
				

gnuradio/gnuradio-core/src/lib/general/gr_misc.h

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
27        
28        unsigned int 
29        gr_rounduppow2(unsigned int n);
30        
31        // FIXME should be template
32        void gr_zero_vector(std::vector<float> &v);
33        void gr_zero_vector(std::vector<double> &v);
34        void gr_zero_vector(std::vector<int> &v);
35        void gr_zero_vector(std::vector<gr_complex> &v);
				

gnuradio/gnuradio-core/src/lib/general/gr_mpsk_receiver_cc.cc

Category FIXME
Committer trondeau
Commit ID 28e086141aead2e43f958f0ae14d58cac557fa2d
118          for (unsigned i=0; i < ninputs; i++)
119            ninput_items_required[i] = (int) ceil((noutput_items * d_omega) + d_interp->ntaps());
120        }
121        
122        // FIXME add these back in an test difference in performance
123        float
124        gr_mpsk_receiver_cc::phase_error_detector_qpsk(gr_complex sample) const
125        {
126          float phase_error = 0;
				

gnuradio/gnuradio-core/src/lib/general/gr_nco.h

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
33         * \ingroup misc
34         */
35        
36        
37        //FIXME  Eventually generalize this to fixed point
38        
39        template<class o_type, class i_type> 
40        class gr_nco {
41        public:
				

gnuradio/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc

Category FIXME
Committer jcorgan
Commit ID 43819f0f33498239970b4479684f12aa080859e6
50        
51        void
52        gr_ofdm_sampler::forecast (int noutput_items, gr_vector_int &ninput_items_required)
53        {
54          // FIXME do we need more
55          //int nreqd  = (noutput_items-1) * d_symbol_length + d_fft_length;
56          int nreqd  = d_symbol_length + d_fft_length;
57          unsigned ninputs = ninput_items_required.size ();
58          for (unsigned i = 0; i < ninputs; i++)
				

gnuradio/gnuradio-core/src/lib/general/gr_prefs.h

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
28         * \brief Base class for representing user preferences a la windows INI files.
29         * \ingroup misc
30         *
31         * The real implementation is in Python, and is accessable from C++
32         * via the magic of SWIG directors.
33         */
34        
35        class gr_prefs
36        {
				

gnuradio/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
41        
42        std::vector<float> gr_pwr_squelch_cc::squelch_range() const
43        {
44          std::vector<float> r(3);
45          r[0] = -50.0;				// min	FIXME
46          r[1] = +50.0;				// max	FIXME
47          r[2] = (r[1] - r[0]) / 100;		// step size
48        
49          return r;
				

gnuradio/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
42        std::vector<float> gr_pwr_squelch_cc::squelch_range() const
43        {
44          std::vector<float> r(3);
45          r[0] = -50.0;				// min	FIXME
46          r[1] = +50.0;				// max	FIXME
47          r[2] = (r[1] - r[0]) / 100;		// step size
48        
49          return r;
50        }
				

gnuradio/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
41        
42        std::vector<float> gr_pwr_squelch_ff::squelch_range() const
43        {
44          std::vector<float> r(3);
45          r[0] = -50.0;				// min	FIXME
46          r[1] = +50.0;				// max	FIXME
47          r[2] = (r[1] - r[0]) / 100;		// step size
48        
49          return r;
				

gnuradio/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
42        std::vector<float> gr_pwr_squelch_ff::squelch_range() const
43        {
44          std::vector<float> r(3);
45          r[0] = -50.0;				// min	FIXME
46          r[1] = +50.0;				// max	FIXME
47          r[2] = (r[1] - r[0]) / 100;		// step size
48        
49          return r;
50        }
				

gnuradio/gnuradio-core/src/lib/general/gr_random.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
124        }
125        
126        /*
127         * Copied from The KC7WW / OH2BNS Channel Simulator
128         * FIXME Need to check how good this is at some point
129         */
130        
131        float gr_random::laplacian()
132        {
				

gnuradio/gnuradio-core/src/lib/general/gr_random.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
138        }
139        
140        /*
141         * Copied from The KC7WW / OH2BNS Channel Simulator
142         * FIXME Need to check how good this is at some point
143         */
144        
145          // 5 => scratchy, 8 => Geiger
146        
				

gnuradio/gnuradio-core/src/lib/general/gr_random.cc — 3

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
157         * Complex rayleigh is really gaussian I and gaussian Q
158         * It can also be generated by real rayleigh magnitude and
159         * uniform random angle 
160         * Adapted from The KC7WW / OH2BNS Channel Simulator
161         * FIXME Need to check how good this is at some point
162         */
163        
164        gr_complex gr_random::rayleigh_complex()
165        {
				

gnuradio/gnuradio-core/src/lib/general/gr_remez.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
849        
850          if (grid_density < 16)
851            punt ("gr_remez: grid_density is too low; must be >= 16");
852        
853          LOCAL_BUFFER (double, coeff, numtaps + 5);		// FIXME why + 5?
854          int err = remez (coeff, numtaps, numbands,
855        		   bands, response, weight, itype, grid_density);
856        
857          if (err == -1)
				

gnuradio/gnuradio-core/src/lib/general/gr_simple_correlator.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
105        {
106          d_state = ST_LOCKED;
107          int delta = sub_index (d_osi, d_transition_osi);
108          d_center_osi = add_index (d_transition_osi, delta/2);
109          d_center_osi = add_index (d_center_osi, 3);   // FIXME
110          d_bbi = 0;
111          fflush (stdout);
112          // fprintf (stderr, ">>> enter_locked  d_center_osi = %d\n", d_center_osi);
113        
				

gnuradio/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
90        std::vector<float>
91        gr_simple_squelch_cc::squelch_range() const
92        {
93          std::vector<float> r(3);
94          r[0] = -50.0;				// min	FIXME
95          r[1] = +50.0;				// max	FIXME
96          r[2] = (r[1] - r[0]) / 100;		// step size
97        
98          return r;
				

gnuradio/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
91        gr_simple_squelch_cc::squelch_range() const
92        {
93          std::vector<float> r(3);
94          r[0] = -50.0;				// min	FIXME
95          r[1] = +50.0;				// max	FIXME
96          r[2] = (r[1] - r[0]) / 100;		// step size
97        
98          return r;
99        }
				

gnuradio/gnuradio-core/src/lib/general/gr_squash_ff.cc

Category FIXME
Committer eb
Commit ID 8b9d8612e3e32a8037782e027690e14b29254335
54          for (unsigned int i = 0; i < d_onum; i++)
55            d_ogrid[i] = ogrid[i];
56        
57          d_accel = gsl_interp_accel_alloc();
58          d_spline = gsl_spline_alloc(gsl_interp_cspline, d_inum);	// FIXME check w/ Frank
59        }
60        
61        gr_squash_ff::~gr_squash_ff()
62        {
				

gnuradio/gnuradio-core/src/lib/general/gr_vco.h

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
32         * \brief base class template for Voltage Controlled Oscillator (VCO)
33         * \ingroup misc
34         */
35        
36        //FIXME  Eventually generalize this to fixed point
37        
38        template<class o_type, class i_type> 
39        class gr_vco {
40        public:
				

gnuradio/gnuradio-core/src/lib/general/gri_fft.cc

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
206            fftwf_free (d_inbuf);
207            throw std::runtime_error ("fftwf_malloc");
208          }
209        
210          // FIXME If there's ever a chance that the planning functions
211          // will be called in multiple threads, we've got to ensure single
212          // threaded access.  They are not thread-safe.
213          
214          gri_fftw_import_wisdom ();	// load prior wisdom from disk