mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add ger and lu with partial pivoting in BTL
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// minimal time for each measurement
|
||||
#define REAL_TYPE float
|
||||
// minimal time for each measurement
|
||||
#define MIN_TIME 1.0
|
||||
#define MIN_TIME 0.5
|
||||
// nb of point on bench curves
|
||||
#define NB_POINT 100
|
||||
// min vector size for axpy bench
|
||||
@@ -33,7 +33,7 @@
|
||||
// min matrix size for matrix vector product bench
|
||||
#define MIN_MV 5
|
||||
// max matrix size for matrix vector product bench
|
||||
#define MAX_MV 2048
|
||||
#define MAX_MV 3000
|
||||
// min matrix size for matrix matrix product bench
|
||||
#define MIN_MM 5
|
||||
// max matrix size for matrix matrix product bench
|
||||
@@ -41,13 +41,13 @@
|
||||
// min matrix size for LU bench
|
||||
#define MIN_LU 5
|
||||
// max matrix size for LU bench
|
||||
#define MAX_LU 2048
|
||||
#define MAX_LU 3000
|
||||
// max size for tiny vector and matrix
|
||||
#define TINY_MV_MAX_SIZE 16
|
||||
// default nb_sample for x86 timer
|
||||
#define DEFAULT_NB_SAMPLE 1000
|
||||
|
||||
// how many times we run a single bench (keep the best perf)
|
||||
#define NB_TRIES 3
|
||||
#define NB_TRIES 5
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,6 @@ double simple_function(int index_i, int index_j)
|
||||
|
||||
double pseudo_random(int index)
|
||||
{
|
||||
// INFOS("random="<<(std::rand()/double(RAND_MAX)));
|
||||
return std::rand()/double(RAND_MAX);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,13 +41,24 @@ BTL_DONT_INLINE void init_row(Vector & X, int size, int row){
|
||||
// [] operator for setting rows
|
||||
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++){
|
||||
init_row<init_function>(A[row],size,row);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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++)
|
||||
A[row].resize(size);
|
||||
for (int row=0; row<A.size() ; row++){
|
||||
A[row][row] = init_function(row,row);
|
||||
for (int col=0; col<row ; col++){
|
||||
double x = init_function(row,col);
|
||||
A[row][col] = A[col][row] = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
time_action = time_calculate(action);
|
||||
while (time_action < MIN_TIME)
|
||||
{
|
||||
//Action action(size);
|
||||
_nb_calc *= 2;
|
||||
action.initialize();
|
||||
time_action = time_calculate(action);
|
||||
@@ -65,7 +64,7 @@ public:
|
||||
time_action = time_action / (double(_nb_calc));
|
||||
|
||||
// check
|
||||
if (BtlConfig::Instance.checkResults)
|
||||
if (BtlConfig::Instance.checkResults && size<128)
|
||||
{
|
||||
action.initialize();
|
||||
action.calculate();
|
||||
|
||||
Reference in New Issue
Block a user