Skip to content

Commit 06abbc7

Browse files
[pre-commit.ci] auto code formatting
1 parent fc57b32 commit 06abbc7

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

benchmarks/dynamic_map/retrieve_all_bench.cu

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,21 @@ std::enable_if_t<(sizeof(Key) != sizeof(Value)), void> dynamic_map_retrieve_all(
7272
}
7373

7474
NVBENCH_BENCH_TYPES(dynamic_map_retrieve_all,
75-
NVBENCH_TYPE_AXES(defaults::KEY_TYPE_RANGE,
76-
defaults::VALUE_TYPE_RANGE,
77-
nvbench::type_list<distribution::unique>))
78-
.set_name("dynamic_map_retrieve_all_unique_capacity")
79-
.set_type_axes_names({"Key", "Value", "Distribution"})
80-
.set_max_noise(defaults::MAX_NOISE)
81-
.add_int64_axis("NumInputs", defaults::N_RANGE)
82-
.add_int64_axis("InitSize", {defaults::INITIAL_SIZE});
75+
NVBENCH_TYPE_AXES(defaults::KEY_TYPE_RANGE,
76+
defaults::VALUE_TYPE_RANGE,
77+
nvbench::type_list<distribution::unique>))
78+
.set_name("dynamic_map_retrieve_all_unique_capacity")
79+
.set_type_axes_names({"Key", "Value", "Distribution"})
80+
.set_max_noise(defaults::MAX_NOISE)
81+
.add_int64_axis("NumInputs", defaults::N_RANGE)
82+
.add_int64_axis("InitSize", {defaults::INITIAL_SIZE});
8383

8484
NVBENCH_BENCH_TYPES(dynamic_map_retrieve_all,
85-
NVBENCH_TYPE_AXES(defaults::KEY_TYPE_RANGE,
86-
defaults::VALUE_TYPE_RANGE,
87-
nvbench::type_list<distribution::unique>))
88-
.set_name("dynamic_map_retrieve_all_fixed_capacity")
89-
.set_type_axes_names({"Key", "Value", "Distribution"})
90-
.set_max_noise(defaults::MAX_NOISE)
91-
.add_int64_axis("NumInputs", {defaults::N})
92-
.add_int64_axis("InitSize", {defaults::INITIAL_SIZE});
85+
NVBENCH_TYPE_AXES(defaults::KEY_TYPE_RANGE,
86+
defaults::VALUE_TYPE_RANGE,
87+
nvbench::type_list<distribution::unique>))
88+
.set_name("dynamic_map_retrieve_all_fixed_capacity")
89+
.set_type_axes_names({"Key", "Value", "Distribution"})
90+
.set_max_noise(defaults::MAX_NOISE)
91+
.add_int64_axis("NumInputs", {defaults::N})
92+
.add_int64_axis("InitSize", {defaults::INITIAL_SIZE});

include/cuco/detail/dynamic_map.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ std::pair<KeyOut, ValueOut> dynamic_map<Key, Value, Scope, Allocator>::retrieve_
245245
auto constexpr block_size = 128;
246246
auto constexpr stride = 1;
247247

248-
auto const capacity = get_capacity();
249-
auto grid_size = (capacity + stride * block_size - 1) / (stride * block_size);
248+
auto const capacity = get_capacity();
249+
auto grid_size = (capacity + stride * block_size - 1) / (stride * block_size);
250250

251251
std::vector<size_t> submap_cap_prefix(submaps_.size());
252252
std::inclusive_scan(

include/cuco/detail/dynamic_map_kernels.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ CUCO_KERNEL void find(InputIt first,
487487
}
488488
}
489489

490-
491490
/**
492491
* @brief Retrieves all of the keys and their associated values.
493492
*
@@ -511,7 +510,8 @@ CUCO_KERNEL void find(InputIt first,
511510
* perform `retrieve_all` operations on each underlying `static_map`
512511
* @param num_submaps The number of submaps in the map
513512
* @param capacity The total number of slots of all submaps
514-
* @param d_num_out Pointer to the device memory location where the number of keys/vals retrieved are stored
513+
* @param d_num_out Pointer to the device memory location where the number of keys/vals retrieved
514+
* are stored
515515
* @param cap_prefix_sum Array of prefix sums of the number of slots in each submap
516516
* @return Pair of iterators indicating the last elements in the output
517517
*/

include/cuco/dynamic_map.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
#include <cstddef>
2929
#include <memory>
30+
#include <numeric>
3031
#include <type_traits>
3132
#include <vector>
32-
#include <numeric>
3333

3434
namespace cuco {
3535

@@ -447,7 +447,7 @@ class dynamic_map {
447447
std::pair<KeyOut, ValueOut> retrieve_all(KeyOut keys_out,
448448
ValueOut values_out,
449449
cudaStream_t stream = 0) const;
450-
450+
451451
/**
452452
* @brief Indicates whether the keys in the range `[first, last)` are contained in the map.
453453
*

tests/dynamic_map/retrieve_all_test.cu

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020

2121
#include <cuda/std/functional>
2222
#include <thrust/device_vector.h>
23-
#include <thrust/sort.h>
2423
#include <thrust/equal.h>
25-
#include <thrust/sequence.h>
2624
#include <thrust/iterator/zip_iterator.h>
25+
#include <thrust/sequence.h>
26+
#include <thrust/sort.h>
2727

2828
#include <catch2/catch_template_test_macros.hpp>
2929

30-
3130
TEMPLATE_TEST_CASE_SIG("dynamic_map retrieve_all tests",
3231
"",
3332
((typename Key, typename Value), Key, Value),
@@ -60,8 +59,8 @@ TEMPLATE_TEST_CASE_SIG("dynamic_map retrieve_all tests",
6059
thrust::device_vector<Key> retrieved_keys(num_keys);
6160
thrust::device_vector<Value> retrieved_values(num_keys);
6261

63-
auto [keys_out, values_out] = map.retrieve_all(retrieved_keys.begin(),
64-
retrieved_values.begin());
62+
auto [keys_out, values_out] =
63+
map.retrieve_all(retrieved_keys.begin(), retrieved_values.begin());
6564

6665
REQUIRE(keys_out == retrieved_keys.end());
6766
REQUIRE(values_out == retrieved_values.end());
@@ -71,7 +70,8 @@ TEMPLATE_TEST_CASE_SIG("dynamic_map retrieve_all tests",
7170
thrust::sort(thrust::device, retrieved_values.begin(), retrieved_values.end());
7271

7372
REQUIRE(thrust::equal(thrust::device, d_keys.begin(), d_keys.end(), retrieved_keys.begin()));
74-
REQUIRE(thrust::equal(thrust::device, d_values.begin(), d_values.end(), retrieved_values.begin()));
73+
REQUIRE(
74+
thrust::equal(thrust::device, d_values.begin(), d_values.end(), retrieved_values.begin()));
7575
}
7676

7777
SECTION("retrieve_all after partial erase")
@@ -93,8 +93,8 @@ TEMPLATE_TEST_CASE_SIG("dynamic_map retrieve_all tests",
9393
thrust::device_vector<Key> retrieved_keys(num_keys / 2);
9494
thrust::device_vector<Value> retrieved_values(num_keys / 2);
9595

96-
auto [keys_out, values_out] = map.retrieve_all(retrieved_keys.begin(),
97-
retrieved_values.begin());
96+
auto [keys_out, values_out] =
97+
map.retrieve_all(retrieved_keys.begin(), retrieved_values.begin());
9898

9999
REQUIRE(std::distance(retrieved_keys.begin(), keys_out) == num_keys / 2);
100100
REQUIRE(std::distance(retrieved_values.begin(), values_out) == num_keys / 2);
@@ -114,8 +114,8 @@ TEMPLATE_TEST_CASE_SIG("dynamic_map retrieve_all tests",
114114
thrust::device_vector<Key> retrieved_keys(0);
115115
thrust::device_vector<Value> retrieved_values(0);
116116

117-
auto [keys_out, values_out] = map.retrieve_all(retrieved_keys.begin(),
118-
retrieved_values.begin());
117+
auto [keys_out, values_out] =
118+
map.retrieve_all(retrieved_keys.begin(), retrieved_values.begin());
119119

120120
REQUIRE(keys_out == retrieved_keys.begin());
121121
REQUIRE(values_out == retrieved_values.begin());

0 commit comments

Comments
 (0)