From 00663f80e39beafcf2a316d56d6c6a90d0ec9711 Mon Sep 17 00:00:00 2001 From: Bimal Gaudel Date: Tue, 21 May 2024 09:07:45 -0400 Subject: [PATCH] Amend make dense_array.set(..) more generic. --- src/TiledArray/conversions/sparse_to_dense.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/TiledArray/conversions/sparse_to_dense.h b/src/TiledArray/conversions/sparse_to_dense.h index 4c8728bc94..7ee6e92049 100644 --- a/src/TiledArray/conversions/sparse_to_dense.h +++ b/src/TiledArray/conversions/sparse_to_dense.h @@ -52,13 +52,7 @@ to_dense(DistArray const& sparse_array) { Tile tile(sparse_array.find(ord).get().clone()); dense_array.set(ord, tile); } else { - if constexpr (detail::is_tensor_of_tensor_v) { - // `zero' tiles that satisfy detail::is_tensor_of_tensor_v - // will be left uninitialized - } else { - // see DistArray::set(ordinal, element_type) - dense_array.set(ord, 0); - } + dense_array.set(ord, typename Tile::value_type{}); } }