From 842b54fe8051fb334da98652e9ea47533c646c33 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 10 Jun 2010 22:11:31 +0200 Subject: make the cache size mechanism future proof by adding level 2 parameters --- test/product_large.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/product_large.cpp') diff --git a/test/product_large.cpp b/test/product_large.cpp index 519213236..0351d134c 100644 --- a/test/product_large.cpp +++ b/test/product_large.cpp @@ -49,5 +49,22 @@ void test_product_large() MatrixXf a = MatrixXf::Random(10,4), b = MatrixXf::Random(4,10), c = a; VERIFY_IS_APPROX((a = a * b), (c * b).eval()); } + + { + // check the functions to setup blocking sizes compile and do not segfault + // FIXME check they do what they are supposed to do !! + std::ptrdiff_t l1 = ei_random(10000,20000); + std::ptrdiff_t l2 = ei_random(1000000,2000000); + setCpuCacheSizes(l1,l2); + VERIFY(l1==l1CacheSize()); + VERIFY(l2==l2CacheSize()); + std::ptrdiff_t k1 = ei_random(10,100)*16; + std::ptrdiff_t m1 = ei_random(10,100)*16; + std::ptrdiff_t n1 = ei_random(10,100)*16; + setBlockingSizes(k1,m1,n1); + std::ptrdiff_t k, m, n; + getBlockingSizes(k,m,n); + VERIFY(k==k1 && m==m1 && n==n1); + } #endif } -- cgit v1.2.3