[med-svn] [aghermann] 01/34: debian g++ knows size_t and unsigned long are not the same thing!

andrei zavada hmmr-guest at moszumanska.debian.org
Sat Nov 23 00:46:47 UTC 2013


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

hmmr-guest pushed a commit to branch master
in repository aghermann.

commit 603eda3d1629777bbe335d12b121b7227f284866
Author: Andrei Zavada <hmmr at ra>
Date:   Sun Nov 10 15:51:53 2013 +0200

    debian g++ knows size_t and unsigned long are not the same thing!
---
 upstream/src/aghermann/ui/sf/channel.cc | 8 ++++----
 upstream/src/libsigfile/tsv.cc          | 2 +-
 upstream/src/libsigproc/sigproc.cc      | 4 ++--
 upstream/src/libsigproc/sigproc.hh      | 2 +-
 upstream/src/libsigproc/sigproc.ii      | 8 ++++----
 upstream/src/tools/edfcat.cc            | 2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/upstream/src/aghermann/ui/sf/channel.cc b/upstream/src/aghermann/ui/sf/channel.cc
index 5e9be74..28fd504 100644
--- a/upstream/src/aghermann/ui/sf/channel.cc
+++ b/upstream/src/aghermann/ui/sf/channel.cc
@@ -236,7 +236,7 @@ get_psd_course()
         auto tmp = crecording.course(
                 agh::make_profile_paramset<metrics::TType::psd>( psd.from, psd.upto));
         if ( resample_power ) {
-                auto xi = vector<unsigned long> (tmp.size());
+                auto xi = vector<size_t> (tmp.size());
                 for ( size_t i = 0; i < tmp.size(); ++i )
                         xi[i] = i;
                 psd.course = sigproc::interpolate<TFloat>( xi, 3600/_p.pagesize(), tmp, 3./3600);
@@ -250,7 +250,7 @@ get_psd_in_bands()
 {
         crecording.psd_profile.compute();
         if ( resample_power ) {
-                auto xi = vector<unsigned long> (crecording.psd_profile.steps());
+                auto xi = vector<size_t> (crecording.psd_profile.steps());
                 for ( size_t i = 0; i < xi.size(); ++i )
                         xi[i] = i;
                 for ( size_t b = 0; b <= psd.uppermost_band; ++b ) {
@@ -281,7 +281,7 @@ get_swu_course()
         auto tmp = crecording.course(
                 agh::make_profile_paramset<metrics::TType::swu>( swu.f0));
         if ( resample_power ) {
-                auto xi = vector<unsigned long> (tmp.size());
+                auto xi = vector<size_t> (tmp.size());
                 for ( size_t i = 0; i < tmp.size(); ++i )
                         xi[i] = i;
                 swu.course = sigproc::interpolate<TFloat>( xi, 3600/_p.pagesize(), tmp, 3./3600);
@@ -298,7 +298,7 @@ get_mc_course()
         auto tmp = crecording.course(
                 agh::make_profile_paramset<metrics::TType::mc>( mc.f0));
         if ( resample_power ) {
-                auto xi = vector<unsigned long> (tmp.size());
+                auto xi = vector<size_t> (tmp.size());
                 for ( size_t i = 0; i < tmp.size(); ++i )
                         xi[i] = i;
                 mc.course = sigproc::interpolate<TFloat>(
diff --git a/upstream/src/libsigfile/tsv.cc b/upstream/src/libsigfile/tsv.cc
index baeef74..bded285 100644
--- a/upstream/src/libsigfile/tsv.cc
+++ b/upstream/src/libsigfile/tsv.cc
@@ -267,7 +267,7 @@ _read_data()
         size_t r, ll = 0;
 
         if ( metadata["series"] == "irregular" ) {
-                vector<unsigned long> offsets;
+                vector<size_t> offsets;
                 do {
                         double ts;
                         if ( 1 != sscanf( _line0, "%lg%*[,\t]", &ts) ) {
diff --git a/upstream/src/libsigproc/sigproc.cc b/upstream/src/libsigproc/sigproc.cc
index 8abe55f..692aa1d 100644
--- a/upstream/src/libsigproc/sigproc.cc
+++ b/upstream/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<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 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 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/upstream/src/libsigproc/sigproc.hh b/upstream/src/libsigproc/sigproc.hh
index 6765ecf..484212c 100644
--- a/upstream/src/libsigproc/sigproc.hh
+++ b/upstream/src/libsigproc/sigproc.hh
@@ -77,7 +77,7 @@ resample( const valarray<double>& signal,
 
 template <typename T, class Container>
 valarray<T>
-interpolate( const vector<unsigned long>& xi,
+interpolate( const vector<size_t>& xi,
              unsigned samplerate, const Container& y, double dt);
 
 
diff --git a/upstream/src/libsigproc/sigproc.ii b/upstream/src/libsigproc/sigproc.ii
index 4d847f9..fb3fec6 100644
--- a/upstream/src/libsigproc/sigproc.ii
+++ b/upstream/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<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 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 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);
@@ -119,7 +119,7 @@ envelope( const SSignalRef<T>& in,
         ssize_t	n_samples = S.size(),
                 dh2 = dh_ * in.samplerate / 2;
 
-        vector<unsigned long>
+        vector<size_t>
                 mini,
                 maxi;
 
@@ -199,7 +199,7 @@ dzcdf( const SSignalRef<T>& in,
 
       // prepare structures for interpolation
         size_t out_size = (double)in.signal.size()/in.samplerate / dt;
-        vector<unsigned long> xi (out_size);
+        vector<size_t> xi (out_size);
         valarray<T> y (in.signal.size());
 
       // calculate the bloody zcdf
diff --git a/upstream/src/tools/edfcat.cc b/upstream/src/tools/edfcat.cc
index 031de8f..d33f453 100644
--- a/upstream/src/tools/edfcat.cc
+++ b/upstream/src/tools/edfcat.cc
@@ -229,7 +229,7 @@ preprocess( const valarray<TFloat>& x_, size_t samplerate,
         valarray<TFloat>
                 x = x_ - x_.sum()/x_.size(); // zeromean
 
-        vector<unsigned long>
+        vector<size_t>
                 mini, maxi;
         sigproc::envelope(
                 {x, samplerate}, samplerate/4, .25,

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list