From 77a622f2bb3356ee005a9413f6436373ec06efc2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 8 Jul 2008 17:20:17 +0000 Subject: add Cholesky and eigensolver benchmark --- bench/BenchUtil.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'bench/BenchUtil.h') diff --git a/bench/BenchUtil.h b/bench/BenchUtil.h index bb3c4611c..4afe61980 100644 --- a/bench/BenchUtil.h +++ b/bench/BenchUtil.h @@ -26,3 +26,43 @@ template void initMatrix_identity(MatrixType& mat) { mat.setIdentity(); } + +#ifndef __INTEL_COMPILER +#define DISABLE_SSE_EXCEPTIONS() { \ + int aux; \ + asm( \ + "stmxcsr %[aux] \n\t" \ + "orl $32832, %[aux] \n\t" \ + "ldmxcsr %[aux] \n\t" \ + : : [aux] "m" (aux)); \ +} +#else +#define DISABLE_SSE_EXCEPTIONS() +#endif + +#ifdef BENCH_GMM +#include +template +void eiToGmm(const EigenMatrixType& src, GmmMatrixType& dst) +{ + dst.resize(src.rows(),src.cols()); + for (int j=0; j +#include +#include +template +void eiToGsl(const EigenMatrixType& src, gsl_matrix** dst) +{ + for (int j=0; j