aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/generic_bench/init
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-03-07 23:11:38 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-03-07 23:11:38 +0100
commit33ca9b4ee690ed12bd072273ea0d24c5eaae77fd (patch)
treeda594d569232820e15e4a9f3f9f1bd2d85df291f /bench/btl/generic_bench/init
parentce41b72eb8b0657957893275e4936b0961bae80b (diff)
Add support for OSX in BTL and fix a few warnings
Diffstat (limited to 'bench/btl/generic_bench/init')
-rw-r--r--bench/btl/generic_bench/init/init_matrix.hh10
-rw-r--r--bench/btl/generic_bench/init/init_vector.hh2
2 files changed, 6 insertions, 6 deletions
diff --git a/bench/btl/generic_bench/init/init_matrix.hh b/bench/btl/generic_bench/init/init_matrix.hh
index 67cbd2073..6382d30c8 100644
--- a/bench/btl/generic_bench/init/init_matrix.hh
+++ b/bench/btl/generic_bench/init/init_matrix.hh
@@ -29,7 +29,7 @@ BTL_DONT_INLINE void init_row(Vector & X, int size, int row){
X.resize(size);
- for (int j=0;j<X.size();j++){
+ for (unsigned int j=0;j<X.size();j++){
X[j]=typename Vector::value_type(init_function(row,j));
}
}
@@ -42,7 +42,7 @@ BTL_DONT_INLINE void init_row(Vector & X, int size, int row){
template<double init_function(int,int),class Vector>
BTL_DONT_INLINE void init_matrix(Vector & A, int size){
A.resize(size);
- for (int row=0; row<A.size() ; row++){
+ for (unsigned int row=0; row<A.size() ; row++){
init_row<init_function>(A[row],size,row);
}
}
@@ -50,11 +50,11 @@ BTL_DONT_INLINE void init_matrix(Vector & A, int size){
template<double init_function(int,int),class Matrix>
BTL_DONT_INLINE void init_matrix_symm(Matrix& A, int size){
A.resize(size);
- for (int row=0; row<A.size() ; row++)
+ for (unsigned int row=0; row<A.size() ; row++)
A[row].resize(size);
- for (int row=0; row<A.size() ; row++){
+ for (unsigned int row=0; row<A.size() ; row++){
A[row][row] = init_function(row,row);
- for (int col=0; col<row ; col++){
+ for (unsigned int col=0; col<row ; col++){
double x = init_function(row,col);
A[row][col] = A[col][row] = x;
}
diff --git a/bench/btl/generic_bench/init/init_vector.hh b/bench/btl/generic_bench/init/init_vector.hh
index efaf0c92e..518e87dbe 100644
--- a/bench/btl/generic_bench/init/init_vector.hh
+++ b/bench/btl/generic_bench/init/init_vector.hh
@@ -29,7 +29,7 @@ void init_vector(Vector & X, int size){
X.resize(size);
- for (int i=0;i<X.size();i++){
+ for (unsigned int i=0;i<X.size();i++){
X[i]=typename Vector::value_type(init_function(i));
}
}