Skip to content

Commit

Permalink
feat: use tbb allocator for fast reset array
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Apr 24, 2024
1 parent 669fce1 commit 60fc8ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kaminpar-common/datastructures/fast_reset_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <vector>

#include "kaminpar-common/assert.h"
#include "kaminpar-common/datastructures/scalable_vector.h"
#include "kaminpar-common/heap_profiler.h"
#include "kaminpar-common/ranges.h"

Expand Down Expand Up @@ -116,7 +117,7 @@ template <typename Value, typename Size = std::size_t> class FastResetArray {
}

private:
std::vector<value_type> _data;
scalable_vector<value_type> _data;
std::vector<size_type> _used_entries{};

IF_HEAP_PROFILING(heap_profiler::DataStructure *_struct);
Expand Down
1 change: 1 addition & 0 deletions kaminpar-common/parallel/tbb_malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ template <typename T> struct tbb_deleter {
};

template <typename T> using tbb_unique_ptr = std::unique_ptr<T, tbb_deleter<T>>;
// template <typename T> using tbb_unique_ptr = std::unique_ptr<T>;

template <typename T> tbb_unique_ptr<T> make_unique(const std::size_t size) {
auto nbytes = sizeof(T) * size;
Expand Down

0 comments on commit 60fc8ca

Please sign in to comment.