summaryrefslogtreecommitdiffhomepage
path: root/eigen/bench/btl/generic_bench/init
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-25 14:17:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-25 14:17:07 +0100
commit35f7829af10c61e33dd2e2a7a015058e11a11ea0 (patch)
tree7135010dcf8fd0a49f3020d52112709bcb883bd6 /eigen/bench/btl/generic_bench/init
parent6e8724193e40a932faf9064b664b529e7301c578 (diff)
update
Diffstat (limited to 'eigen/bench/btl/generic_bench/init')
-rw-r--r--eigen/bench/btl/generic_bench/init/init_function.hh8
-rw-r--r--eigen/bench/btl/generic_bench/init/init_matrix.hh10
-rw-r--r--eigen/bench/btl/generic_bench/init/init_vector.hh2
3 files changed, 10 insertions, 10 deletions
diff --git a/eigen/bench/btl/generic_bench/init/init_function.hh b/eigen/bench/btl/generic_bench/init/init_function.hh
index 7b3bdba..e467cb6 100644
--- a/eigen/bench/btl/generic_bench/init/init_function.hh
+++ b/eigen/bench/btl/generic_bench/init/init_function.hh
@@ -30,23 +30,23 @@ double simple_function(int index_i, int index_j)
return index_i+index_j;
}
-double pseudo_random(int index)
+double pseudo_random(int /*index*/)
{
return std::rand()/double(RAND_MAX);
}
-double pseudo_random(int index_i, int index_j)
+double pseudo_random(int /*index_i*/, int /*index_j*/)
{
return std::rand()/double(RAND_MAX);
}
-double null_function(int index)
+double null_function(int /*index*/)
{
return 0.0;
}
-double null_function(int index_i, int index_j)
+double null_function(int /*index_i*/, int /*index_j*/)
{
return 0.0;
}
diff --git a/eigen/bench/btl/generic_bench/init/init_matrix.hh b/eigen/bench/btl/generic_bench/init/init_matrix.hh
index 67cbd20..6382d30 100644
--- a/eigen/bench/btl/generic_bench/init/init_matrix.hh
+++ b/eigen/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/eigen/bench/btl/generic_bench/init/init_vector.hh b/eigen/bench/btl/generic_bench/init/init_vector.hh
index efaf0c9..518e87d 100644
--- a/eigen/bench/btl/generic_bench/init/init_vector.hh
+++ b/eigen/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));
}
}