commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r4399 - gnuradio/branches/developers/michaelld/tt/gr-t


From: michaelld
Subject: [Commit-gnuradio] r4399 - gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib
Date: Tue, 6 Feb 2007 16:24:07 -0700 (MST)

Author: michaelld
Date: 2007-02-06 16:24:07 -0700 (Tue, 06 Feb 2007)
New Revision: 4399

Modified:
   gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/interleaver.cc
   
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.cc
   
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.h
Log:
Removed unneeded non-instantiation code.



Modified: 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/interleaver.cc
===================================================================
--- gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/interleaver.cc 
2007-02-06 22:15:29 UTC (rev 4398)
+++ gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/interleaver.cc 
2007-02-06 23:24:07 UTC (rev 4399)
@@ -91,14 +91,13 @@
   d_INTER.resize(d_K);
   d_DEINTER.resize(d_K);
 
-  srand(seed); 
+  srand(seed);
   std::vector<int> tmp(d_K);
   for(int i=0;i<d_K;i++) {
     d_INTER[i]=i;
     tmp[i] = rand(); 
   }
-  quicksort_index <int> (tmp,d_INTER,0,d_K-1); //got to resolve this...
-  //  quicksort_index1 (tmp,d_INTER,0,d_K-1);
+  quicksort_index <int> (tmp,d_INTER,0,d_K-1);
 
   // generate DEINTER table
   for(int i=0;i<d_K;i++) {

Modified: 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.cc
===================================================================
--- 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.cc 
    2007-02-06 22:15:29 UTC (rev 4398)
+++ 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.cc 
    2007-02-06 23:24:07 UTC (rev 4399)
@@ -42,10 +42,10 @@
     int j = right + 1;
     T pivot = p[left];
     do {
-      do 
+      do
        i++;
       while ((p[i] < pivot) && (i < right));
-      do 
+      do
        j--;
       while ((p[j] > pivot) && (j > left));
       if (i < j) {
@@ -60,45 +60,9 @@
   }
 }
 
-#if 1
 // instantiate an <int> version of the quicksort_index
 
-template <int>
-void
-SWAP
-(int & a, int & b);
-
 template
 void
 quicksort_index<int>
 (std::vector<int> & p, std::vector<int> & index, int left, int right);
-
-#else
-
-void quicksort_index1(std::vector<int> & p, std::vector<int> & index, int 
left, int right)
-{
-
-if (left < right) {
-    int i = left;
-    int j = right + 1;
-    int pivot = p[left];
-    do {
-        do
-            i++;
-        while ((p[i] < pivot) && (i < right));
-        do
-            j--;
-        while ((p[j] > pivot) && (j > left));
-        if (i < j) {
-            SWAP <int> (p[i],p[j]);
-            SWAP <int> (index[i],index[j]);
-        }
-    } while (i < j);
-    SWAP <int> (p[left], p[j]);
-    SWAP <int> (index[left], index[j]);
-    quicksort_index1 (p,index, left, j-1);
-    quicksort_index1 (p,index, j+1, right);
-}
-}
-
-#endif

Modified: 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.h
===================================================================
--- 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.h  
    2007-02-06 22:15:29 UTC (rev 4398)
+++ 
gnuradio/branches/developers/michaelld/tt/gr-trellis/src/lib/quicksort_index.h  
    2007-02-06 23:24:07 UTC (rev 4399)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2007 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -31,6 +31,5 @@
 template <class T>
 void quicksort_index (std::vector<T> & p, std::vector<int> & index,
                      int left, int right);
-// void quicksort_index1(std::vector<int> & p, std::vector<int> & index, int 
left, int right);
 
 #endif





reply via email to

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