The following commit has been merged in the master branch:
commit 8652253f1ffe68c08dfdd8fd0f47b17774396e41
Author: Andrei Zavada <[email protected]>
Date:   Wed Jul 24 00:03:32 2013 +0300

    fix 32bit build issue with size_t /= unsigned long

diff --git a/src/libsigproc/sigproc.cc b/src/libsigproc/sigproc.cc
index 730dd20..183c3e0 100644
--- a/src/libsigproc/sigproc.cc
+++ b/src/libsigproc/sigproc.cc
@@ -20,8 +20,8 @@ using namespace std;
 template void sigproc::smooth( valarray<TFloat>&, size_t);
 template void sigproc::normalize( valarray<TFloat>&);
 template valarray<TFloat> sigproc::derivative( const valarray<TFloat>&);
-template size_t sigproc::envelope( const SSignalRef<float>&, double, double, 
valarray<float>*, valarray<float>*, vector<size_t>*, vector<size_t>*);
-template size_t sigproc::envelope( const SSignalRef<double>&, double, double, 
valarray<double>*, valarray<double>*, vector<size_t>*, vector<size_t>*);
+template size_t sigproc::envelope( const SSignalRef<float>&, double, double, 
valarray<float>*, valarray<float>*, vector<unsigned long>*, vector<unsigned 
long>*);
+template size_t sigproc::envelope( const SSignalRef<double>&, double, double, 
valarray<double>*, valarray<double>*, vector<unsigned long>*, vector<unsigned 
long>*);
 template valarray<TFloat> sigproc::dzcdf( const SSignalRef<TFloat>&, double, 
double, size_t);
 template double sigproc::sig_diff( const valarray<TFloat>&, const 
valarray<TFloat>&, int);
 template double sigproc::phase_diff( const SSignalRef<TFloat>&, const 
SSignalRef<TFloat>&, size_t, size_t, double, double, unsigned, size_t);
diff --git a/src/libsigproc/sigproc.hh b/src/libsigproc/sigproc.hh
index 5cce45b..bbc5c8a 100644
--- a/src/libsigproc/sigproc.hh
+++ b/src/libsigproc/sigproc.hh
@@ -101,8 +101,8 @@ envelope( const SSignalRef<T>& in,
          double dt,
          valarray<T>* env_lp = nullptr,  // return interpolated
          valarray<T>* env_up = nullptr,  // return vector of points
-         vector<size_t> *mini_p = nullptr,
-         vector<size_t> *maxi_p = nullptr);
+         vector<unsigned long> *mini_p = nullptr,
+         vector<unsigned long> *maxi_p = nullptr);
 
 template <typename T>
 valarray<T>
diff --git a/src/libsigproc/sigproc.ii b/src/libsigproc/sigproc.ii
index 99a7b86..a3496f5 100644
--- a/src/libsigproc/sigproc.ii
+++ b/src/libsigproc/sigproc.ii
@@ -13,8 +13,8 @@ extern template void smooth( valarray<TFloat>&, size_t);
 extern template void normalize( valarray<TFloat>&);
 extern template valarray<TFloat> derivative( const valarray<TFloat>&);
 // this one is used for both T = float and double
-extern template size_t envelope( const SSignalRef<float>&, double, double, 
valarray<float>*, valarray<float>*, vector<size_t>*, vector<size_t>*);
-extern template size_t envelope( const SSignalRef<double>&, double, double, 
valarray<double>*, valarray<double>*, vector<size_t>*, vector<size_t>*);
+extern template size_t envelope( const SSignalRef<float>&, double, double, 
valarray<float>*, valarray<float>*, vector<unsigned long>*, vector<unsigned 
long>*);
+extern template size_t envelope( const SSignalRef<double>&, double, double, 
valarray<double>*, valarray<double>*, vector<unsigned long>*, vector<unsigned 
long>*);
 extern template valarray<TFloat> dzcdf( const SSignalRef<TFloat>&, double, 
double, size_t);
 extern template double sig_diff( const valarray<TFloat>&, const 
valarray<TFloat>&, int);
 extern template double phase_diff( const SSignalRef<TFloat>&, const 
SSignalRef<TFloat>&, size_t, size_t, double, double, unsigned, size_t);
@@ -112,14 +112,14 @@ envelope( const SSignalRef<T>& in,
          double dt_,
          valarray<T>* env_lp = nullptr,    // return interpolated
          valarray<T>* env_up = nullptr,
-         vector<size_t> *mini_p = nullptr, // return vector of extremum indices
-         vector<size_t> *maxi_p = nullptr)
+         vector<unsigned long> *mini_p = nullptr, // return vector of extremum 
indices
+         vector<unsigned long> *maxi_p = nullptr)
 {
        auto&   S = in.signal;
        ssize_t n_samples = S.size(),
                dh2 = dh_ * in.samplerate / 2;
 
-       vector<size_t>
+       vector<unsigned long>
                mini,
                maxi;
 
@@ -200,7 +200,7 @@ dzcdf( const SSignalRef<T>& in,
 
       // prepare structures for interpolation
        size_t out_size = (double)in.signal.size()/in.samplerate / dt;
-       vector<size_t> xi (out_size);
+       vector<unsigned long> xi (out_size);
        valarray<T> y (in.signal.size());
 
       // calculate the bloody zcdf

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to