diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-03-09 16:13:47 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-03-09 16:13:47 +0000 |
commit | 9d9d81ad71a52c33ba4db9f8a6059d435d279316 (patch) | |
tree | d12a85ca594af99b04ce32f652ae67bf0baf228b /bench/BenchUtil.h | |
parent | f64311e07de95694187e5d6d5d2e3cd118302076 (diff) |
* basic support for multicore CPU via a .evalOMP() which
internaly uses OpenMP if enabled at compile time.
* added a bench/ folder with a couple benchmarks and benchmark tools.
Diffstat (limited to 'bench/BenchUtil.h')
-rw-r--r-- | bench/BenchUtil.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/bench/BenchUtil.h b/bench/BenchUtil.h new file mode 100644 index 000000000..bb3c4611c --- /dev/null +++ b/bench/BenchUtil.h @@ -0,0 +1,28 @@ + +#include <Eigen/Core> +#include "BenchTimer.h" + +using namespace std; +USING_PART_OF_NAMESPACE_EIGEN + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition.hpp> +#include <boost/preprocessor/seq.hpp> +#include <boost/preprocessor/array.hpp> +#include <boost/preprocessor/arithmetic.hpp> +#include <boost/preprocessor/comparison.hpp> +#include <boost/preprocessor/punctuation.hpp> +#include <boost/preprocessor/punctuation/comma.hpp> +#include <boost/preprocessor/stringize.hpp> + +template<typename MatrixType> void initMatrix_random(MatrixType& mat) __attribute__((noinline)); +template<typename MatrixType> void initMatrix_random(MatrixType& mat) +{ + mat.setRandom();// = MatrixType::random(mat.rows(), mat.cols()); +} + +template<typename MatrixType> void initMatrix_identity(MatrixType& mat) __attribute__((noinline)); +template<typename MatrixType> void initMatrix_identity(MatrixType& mat) +{ + mat.setIdentity(); +} |