From 9d9d81ad71a52c33ba4db9f8a6059d435d279316 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 9 Mar 2008 16:13:47 +0000 Subject: * 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. --- bench/BenchUtil.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bench/BenchUtil.h (limited to 'bench/BenchUtil.h') 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 +#include "BenchTimer.h" + +using namespace std; +USING_PART_OF_NAMESPACE_EIGEN + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template void initMatrix_random(MatrixType& mat) __attribute__((noinline)); +template void initMatrix_random(MatrixType& mat) +{ + mat.setRandom();// = MatrixType::random(mat.rows(), mat.cols()); +} + +template void initMatrix_identity(MatrixType& mat) __attribute__((noinline)); +template void initMatrix_identity(MatrixType& mat) +{ + mat.setIdentity(); +} -- cgit v1.2.3