From 60fc8caae84c7c07b979f3c28a1c8c6a76467d56 Mon Sep 17 00:00:00 2001 From: Daniel Seemaier Date: Wed, 24 Apr 2024 15:16:17 +0200 Subject: [PATCH] feat: use tbb allocator for fast reset array --- kaminpar-common/datastructures/fast_reset_array.h | 3 ++- kaminpar-common/parallel/tbb_malloc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kaminpar-common/datastructures/fast_reset_array.h b/kaminpar-common/datastructures/fast_reset_array.h index 1fd73b61..87142e8e 100644 --- a/kaminpar-common/datastructures/fast_reset_array.h +++ b/kaminpar-common/datastructures/fast_reset_array.h @@ -11,6 +11,7 @@ #include #include "kaminpar-common/assert.h" +#include "kaminpar-common/datastructures/scalable_vector.h" #include "kaminpar-common/heap_profiler.h" #include "kaminpar-common/ranges.h" @@ -116,7 +117,7 @@ template class FastResetArray { } private: - std::vector _data; + scalable_vector _data; std::vector _used_entries{}; IF_HEAP_PROFILING(heap_profiler::DataStructure *_struct); diff --git a/kaminpar-common/parallel/tbb_malloc.h b/kaminpar-common/parallel/tbb_malloc.h index 98db3b37..421b6052 100644 --- a/kaminpar-common/parallel/tbb_malloc.h +++ b/kaminpar-common/parallel/tbb_malloc.h @@ -25,6 +25,7 @@ template struct tbb_deleter { }; template using tbb_unique_ptr = std::unique_ptr>; +// template using tbb_unique_ptr = std::unique_ptr; template tbb_unique_ptr make_unique(const std::size_t size) { auto nbytes = sizeof(T) * size;