Sequoia
Loading...
Searching...
No Matches
DynamicGraphAllocationTestingUtilities.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2020. //
3// Distributed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. //
4// (See accompanying file LICENSE.md or copy at //
5// https://www.gnu.org/licenses/gpl-3.0.en.html) //
7
8#pragma once
9
14
15namespace sequoia::testing
16{
18 {
19 template <class T> using storage_type = typename custom_partitioned_sequence_generator<T, true, false, false>::storage_type;
20
21 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::agnostic};
22 };
23
25 {
26 template <class T> using storage_type = typename custom_bucketed_sequence_generator<T, true, false, false>::storage_type;
27
28 constexpr static maths::edge_sharing_preference edge_sharing{maths::edge_sharing_preference::agnostic};
29 };
30
31 template<class Graph>
33 {
34 using edge_allocator = typename Graph::edge_allocator_type;
35
37
38 [[nodiscard]]
39 edge_allocator operator()(const Graph& g) const
40 {
41 return g.get_edge_allocator();
42 }
43 };
44
45 template<class Graph>
47 {
48 using edge_partitions_allocator = decltype(Graph{}.get_edge_allocator(maths::partitions_allocator_tag{}));
50
51 [[nodiscard]]
52 edge_partitions_allocator operator()(const Graph& g) const
53 {
54 return g.get_edge_allocator(maths::partitions_allocator_tag{});
55 }
56 };
57
58 template<class Graph>
60 {
61 using node_allocator = typename Graph::node_weight_allocator_type;
63
64 [[nodiscard]]
65 node_allocator operator()(const Graph& g) const
66 {
67 return g.get_node_allocator();
68 }
69 };
70
71 template<class T>
73 {
75 };
76
77 template<class T>
78 using node_storage_generator_t = typename node_storage_generator<T>::type;
79}
Storage for partitioned data such that data within each partition is contiguous.
Definition: PartitionedData.hpp:63
Definition: PartitionedData.hpp:991
Definition: NodeStorage.hpp:272
Definition: Connectivity.hpp:172
Definition: DynamicGraphAllocationTestingUtilities.hpp:25
Definition: DynamicGraphAllocationTestingUtilities.hpp:18
Definition: DynamicGraphAllocationTestingUtilities.hpp:33
Definition: DynamicGraphAllocationTestingUtilities.hpp:47
Definition: DynamicGraphAllocationTestingUtilities.hpp:60
Definition: DynamicGraphAllocationTestingUtilities.hpp:73