diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-06-10 22:11:31 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-06-10 22:11:31 +0200 |
commit | 842b54fe8051fb334da98652e9ea47533c646c33 (patch) | |
tree | 40ce63b91acd31e41982ed418dcd332e4d50e071 /test/product_large.cpp | |
parent | 986f65c402f3e351f41fdfec8031d8a9065b4dfa (diff) |
make the cache size mechanism future proof by adding level 2 parameters
Diffstat (limited to 'test/product_large.cpp')
-rw-r--r-- | test/product_large.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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<int>(10000,20000); + std::ptrdiff_t l2 = ei_random<int>(1000000,2000000); + setCpuCacheSizes(l1,l2); + VERIFY(l1==l1CacheSize()); + VERIFY(l2==l2CacheSize()); + std::ptrdiff_t k1 = ei_random<int>(10,100)*16; + std::ptrdiff_t m1 = ei_random<int>(10,100)*16; + std::ptrdiff_t n1 = ei_random<int>(10,100)*16; + setBlockingSizes<float>(k1,m1,n1); + std::ptrdiff_t k, m, n; + getBlockingSizes<float>(k,m,n); + VERIFY(k==k1 && m==m1 && n==n1); + } #endif } |