[med-svn] [SCM] aghermann branch, master, updated. c17ba9679a3d69fb18f940607da6e2762f7892e1
Andrei Zavada
johnhommer at gmail.com
Thu Jul 25 19:59:03 UTC 2013
The following commit has been merged in the master branch:
commit 3f38862d247e4ca08c124c2646656b6fceac75fd
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Wed Jul 24 00:03:32 2013 +0300
fix 32bit build issue with size_t /= unsigned long
diff --git a/src/aghermann/ui/sf/channel.cc b/src/aghermann/ui/sf/channel.cc
index bb2506a..44cc8bb 100644
--- a/src/aghermann/ui/sf/channel.cc
+++ b/src/aghermann/ui/sf/channel.cc
@@ -213,7 +213,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<size_t> (tmp.size());
+ auto xi = vector<unsigned long> (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);
@@ -227,7 +227,7 @@ get_psd_in_bands()
{
crecording.psd_profile.compute();
if ( resample_power ) {
- auto xi = vector<size_t> (crecording.psd_profile.steps());
+ auto xi = vector<unsigned long> (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 ) {
@@ -258,7 +258,7 @@ get_swu_course()
auto tmp = crecording.course(
agh::make_profile_paramset<metrics::TType::swu>( swu.f0));
if ( resample_power ) {
- auto xi = vector<size_t> (tmp.size());
+ auto xi = vector<unsigned long> (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);
@@ -275,7 +275,7 @@ get_mc_course()
auto tmp = crecording.course(
agh::make_profile_paramset<metrics::TType::mc>( mc.f0));
if ( resample_power ) {
- auto xi = vector<size_t> (tmp.size());
+ auto xi = vector<unsigned long> (tmp.size());
for ( size_t i = 0; i < tmp.size(); ++i )
xi[i] = i;
mc.course = sigproc::interpolate<TFloat>(
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
More information about the debian-med-commit
mailing list