From e3e2d1d195a56fdfd34acf0738728f02dec430b1 Mon Sep 17 00:00:00 2001 From: Dmitry Razdoburdin <> Date: Tue, 25 Nov 2025 04:04:07 -0800 Subject: [PATCH 1/2] initial --- include/svs/core/data/simple.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/svs/core/data/simple.h b/include/svs/core/data/simple.h index df0a45c3..f56f6682 100644 --- a/include/svs/core/data/simple.h +++ b/include/svs/core/data/simple.h @@ -33,6 +33,7 @@ // stdlib #include +#include #include namespace svs { @@ -673,8 +674,9 @@ class SimpleData> { /// void add_block() { blocks_.emplace_back( - make_dims(blocksize().value(), lib::forward_extent(dimensions())), - allocator_.get_allocator() + std::make_unique( + make_dims(blocksize().value(), lib::forward_extent(dimensions())), + allocator_.get_allocator()) ); } @@ -727,12 +729,12 @@ class SimpleData> { const_value_type get_datum(size_t i) const { auto [block_id, data_id] = resolve(i); - return getindex(blocks_, block_id).slice(data_id); + return getindex(blocks_, block_id)->slice(data_id); } value_type get_datum(size_t i) { auto [block_id, data_id] = resolve(i); - return getindex(blocks_, block_id).slice(data_id); + return getindex(blocks_, block_id)->slice(data_id); } void prefetch(size_t i) const { lib::prefetch(get_datum(i)); } @@ -827,7 +829,7 @@ class SimpleData> { private: // The blocksize in terms of number of vectors. lib::PowerOfTwo blocksize_; - std::vector blocks_; + std::vector> blocks_; size_t dimensions_; size_t size_; Blocked allocator_; From 5ce6d0e4a8e99770d58eb1f215d51ae239714290 Mon Sep 17 00:00:00 2001 From: Dmitry Razdoburdin <> Date: Tue, 25 Nov 2025 04:11:26 -0800 Subject: [PATCH 2/2] linting --- include/svs/core/data/simple.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/svs/core/data/simple.h b/include/svs/core/data/simple.h index f56f6682..fc278687 100644 --- a/include/svs/core/data/simple.h +++ b/include/svs/core/data/simple.h @@ -32,8 +32,8 @@ #include "svs/lib/uuid.h" // stdlib -#include #include +#include #include namespace svs { @@ -673,11 +673,10 @@ class SimpleData> { /// Add a new data block to the end of the current collection of blocks. /// void add_block() { - blocks_.emplace_back( - std::make_unique( - make_dims(blocksize().value(), lib::forward_extent(dimensions())), - allocator_.get_allocator()) - ); + blocks_.emplace_back(std::make_unique( + make_dims(blocksize().value(), lib::forward_extent(dimensions())), + allocator_.get_allocator() + )); } ///