From 76fe2e1b34b4388ea3d9585bc840a0bab20ee5be Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 19 Oct 2008 17:06:11 +0000 Subject: add/update some benchmark files used to test/compare sparse module features --- bench/BenchSparseUtil.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'bench/BenchSparseUtil.h') diff --git a/bench/BenchSparseUtil.h b/bench/BenchSparseUtil.h index 35c9a5263..26a2f47f2 100644 --- a/bench/BenchSparseUtil.h +++ b/bench/BenchSparseUtil.h @@ -72,3 +72,23 @@ void eiToMtl(const EigenSparseMatrix& src, MtlSparse& dst) ins[it.index()][j] = it.value(); } #endif + +#ifdef CSPARSE +extern "C" { +#include "cs.h" +} +void eiToCSparse(const EigenSparseMatrix& src, cs* &dst) +{ + cs* aux = cs_spalloc (0, 0, 1, 1, 1); + for (int j=0; j