From e0f58aeb62913c0ca91cb6c9bcdc294f6b1db242 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Tue, 10 Sep 2013 10:47:41 +0200 Subject: [PATCH] gf : clean product mesh - reinterpret array is much simple. clean old code after check on various compilers --- triqs/gfs/meshes/product.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/triqs/gfs/meshes/product.hpp b/triqs/gfs/meshes/product.hpp index ee2b8514..b600151b 100644 --- a/triqs/gfs/meshes/product.hpp +++ b/triqs/gfs/meshes/product.hpp @@ -180,7 +180,9 @@ namespace triqs { namespace gfs { template arrays::array_view reinterpret_linear_array(mesh_product const & m, arrays::array_view const & A) { - static int constexpr rank = sizeof...(Meshes); + return { {m.all_size_as_mini_vector()}, A.storage()}; + } + /* static int constexpr rank = sizeof...(Meshes); typedef arrays::array_view return_t; typedef typename return_t::indexmap_type im_t; auto l = m.all_size_as_mini_vector(); @@ -188,7 +190,11 @@ namespace triqs { namespace gfs { std::ptrdiff_t s= 1; for (int u=0; u