aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-12-12 11:39:07 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2009-12-12 11:39:07 +0100
commitd088ee35f644f9178270f0c3dc8c76011d208099 (patch)
tree47001aacbb83eba02c38d93ec97fbe09e7c8497c /unsupported
parent494a88685ee995b34da0f3b79a68fa06c0ee63ff (diff)
Added to possibility to compile unit tests at maximum warning level.
Silenced (amongst others) many conversion related warnings.
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/FFT4
-rw-r--r--unsupported/Eigen/src/BVH/BVAlgorithms.h4
-rw-r--r--unsupported/Eigen/src/BVH/KdBVH.h4
-rw-r--r--unsupported/Eigen/src/FFT/ei_kissfft_impl.h4
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h2
-rw-r--r--unsupported/test/Complex.cpp2
-rw-r--r--unsupported/test/FFT.cpp8
7 files changed, 16 insertions, 12 deletions
diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT
index fc2efc1d6..a43cd8d97 100644
--- a/unsupported/Eigen/FFT
+++ b/unsupported/Eigen/FFT
@@ -160,7 +160,7 @@ class FFT
dst.resize( (src.size()>>1)+1);
else
dst.resize(src.size());
- fwd(&dst[0],&src[0],src.size());
+ fwd(&dst[0],&src[0],static_cast<int>(src.size()));
}
template<typename InputDerived, typename ComplexDerived>
@@ -224,7 +224,7 @@ class FFT
dst.resize( 2*(src.size()-1) );
else
dst.resize( src.size() );
- inv( &dst[0],&src[0],dst.size() );
+ inv( &dst[0],&src[0],static_cast<int>(dst.size()) );
}
// TODO: multi-dimensional FFTs
diff --git a/unsupported/Eigen/src/BVH/BVAlgorithms.h b/unsupported/Eigen/src/BVH/BVAlgorithms.h
index 47c49be7f..63725763a 100644
--- a/unsupported/Eigen/src/BVH/BVAlgorithms.h
+++ b/unsupported/Eigen/src/BVH/BVAlgorithms.h
@@ -74,6 +74,8 @@ struct ei_intersector_helper1
bool intersectObject(const Object1 &obj) { return intersector.intersectObjectObject(obj, stored); }
Object2 stored;
Intersector &intersector;
+private:
+ ei_intersector_helper1& operator=(const ei_intersector_helper1&);
};
template<typename Volume2, typename Object2, typename Object1, typename Intersector>
@@ -216,6 +218,8 @@ struct ei_minimizer_helper2
Scalar minimumOnObject(const Object2 &obj) { return minimizer.minimumOnObjectObject(stored, obj); }
Object1 stored;
Minimizer &minimizer;
+private:
+ ei_minimizer_helper2& operator=(const ei_minimizer_helper2&);
};
/** Given two BVH's, runs the query on their cartesian product encapsulated by \a minimizer.
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index ec47254af..c4719607f 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -107,7 +107,7 @@ public:
children.clear();
objects.insert(objects.end(), begin, end);
- int n = objects.size();
+ int n = static_cast<int>(objects.size());
if(n < 2)
return; //if we have at most one object, we don't need any internal nodes
@@ -149,7 +149,7 @@ public:
return;
}
- int numBoxes = boxes.size();
+ int numBoxes = static_cast<int>(boxes.size());
int idx = index * 2;
if(children[idx + 1] < numBoxes) { //second index is always bigger
diff --git a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h
index 2dff2bd00..dbd92132e 100644
--- a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h
+++ b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h
@@ -247,7 +247,7 @@ struct ei_kiss_cpx_fft
int u,k,q1,q;
Complex * twiddles = &m_twiddles[0];
Complex t;
- int Norig = m_twiddles.size();
+ int Norig = static_cast<int>(m_twiddles.size());
Complex * scratchbuf = &m_scratchBuf[0];
for ( u=0; u<m; ++u ) {
@@ -262,7 +262,7 @@ struct ei_kiss_cpx_fft
int twidx=0;
Fout[ k ] = scratchbuf[0];
for (q=1;q<p;++q ) {
- twidx += fstride * k;
+ twidx += static_cast<int>(fstride) * k;
if (twidx>=Norig) twidx-=Norig;
t=scratchbuf[q] * twiddles[twidx];
Fout[ k ] += t;
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
index add000c44..9c0d2e53f 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -292,7 +292,7 @@ void MatrixExponential<MatrixType>::computeUV(float)
} else {
const float maxnorm = 3.925724783138660f;
m_squarings = std::max(0, (int)ceil(log2(m_l1norm / maxnorm)));
- MatrixType A = *m_M / std::pow(Scalar(2), Scalar(m_squarings));
+ MatrixType A = *m_M / std::pow(Scalar(2), Scalar(static_cast<RealScalar>(m_squarings)));
pade7(A);
}
}
diff --git a/unsupported/test/Complex.cpp b/unsupported/test/Complex.cpp
index 969e3f4f9..9ea91cf42 100644
--- a/unsupported/test/Complex.cpp
+++ b/unsupported/test/Complex.cpp
@@ -40,7 +40,7 @@ template <typename T>
void take_std( std::complex<T> * dst, int n )
{
for (int i=0;i<n;++i)
- dst[i] = std::complex<T>(i,i);
+ dst[i] = std::complex<T>(static_cast<float>(i),static_cast<float>(i));
cout << dst[n-1] << endl;
}
diff --git a/unsupported/test/FFT.cpp b/unsupported/test/FFT.cpp
index b029ba655..056be2ef3 100644
--- a/unsupported/test/FFT.cpp
+++ b/unsupported/test/FFT.cpp
@@ -46,10 +46,10 @@ complex<long double> promote(long double x) { return complex<long double>( x);
long double difpower=0;
cerr <<"idx\ttruth\t\tvalue\t|dif|=\n";
long double pi = acos((long double)-1);
- for (size_t k0=0;k0<size_t(fftbuf.size());++k0) {
+ for (int k0=0;k0<fftbuf.size();++k0) {
complex<long double> acc = 0;
long double phinc = -2.*k0* pi / timebuf.size();
- for (size_t k1=0;k1<size_t(timebuf.size());++k1) {
+ for (int k1=0;k1<timebuf.size();++k1) {
acc += promote( timebuf[k1] ) * exp( complex<long double>(0,k1*phinc) );
}
totalpower += norm(acc);
@@ -67,8 +67,8 @@ complex<long double> promote(long double x) { return complex<long double>( x);
{
long double totalpower=0;
long double difpower=0;
- size_t n = min( buf1.size(),buf2.size() );
- for (size_t k=0;k<n;++k) {
+ int n = min( buf1.size(),buf2.size() );
+ for (int k=0;k<n;++k) {
totalpower += (norm( buf1[k] ) + norm(buf2[k]) )/2.;
difpower += norm(buf1[k] - buf2[k]);
}