Skip to content

Commit

Permalink
Formate tuning + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed May 24, 2024
1 parent 1c7ba48 commit 9fbef96
Show file tree
Hide file tree
Showing 87 changed files with 140 additions and 176 deletions.
12 changes: 7 additions & 5 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"' # quoted includes
Priority: 1
- Regex: '^<(benchmarks|tests)/' # benchmark includes
- Regex: '^<(benchmark_defaults|benchmark_utils|test_utils)' # benchmark/test includes
Priority: 2
- Regex: '^<cuco/' # cuco includes
Priority: 3
- Regex: '^<(thrust|cub|cuda)/' # CCCL includes
- Regex: '^<nvbench/' # nvbench includes
Priority: 4
- Regex: '^<(cooperative_groups|cuda.h|cuda_runtime|device_types|math_constants|nvtx3)' # CUDA includes
- Regex: '^<(thrust|cub|cuda)/' # CCCL includes
Priority: 5
- Regex: '^<.*\..*' # other system includes (e.g. with a '.')
- Regex: '^<(cooperative_groups|cuda.h|cuda_runtime|device_types|math_constants|nvtx3)' # CUDA includes
Priority: 6
- Regex: '^<[^.]+' # STL includes (no '.')
- Regex: '^<.*\..*' # other system includes (e.g. with a '.')
Priority: 7
- Regex: '^<[^.]+' # STL includes (no '.')
Priority: 8
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions benchmarks/distinct_count_estimator_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/distinct_count_estimator.cuh>
#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>

#include <nvbench/nvbench.cuh>

#include <cuda/functional>
#include <thrust/device_vector.h>
#include <thrust/iterator/transform_iterator.h>

#include <cuda/functional>

#include <cmath>
#include <cstddef>

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/hash_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <benchmark_defaults.hpp>

#include <cuco/hash_functions.cuh>

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/dynamic_map/contains_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/dynamic_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/dynamic_map/erase_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/dynamic_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/dynamic_map/find_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/dynamic_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/dynamic_map/insert_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/dynamic_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_map/contains_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_map/erase_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_map/find_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_map/insert_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_map.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_multimap/count_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_multimap.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_multimap/insert_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_multimap.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_multimap/query_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_multimap.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_multimap/retrieve_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_multimap.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/contains_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/find_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/insert_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/rehash_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/retrieve_all_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/hash_table/static_set/size_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <defaults.hpp>
#include <utils.hpp>
#include <benchmark_defaults.hpp>
#include <benchmark_utils.hpp>

#include <cuco/static_set.cuh>
#include <cuco/utility/key_generator.cuh>
Expand Down
6 changes: 2 additions & 4 deletions examples/static_map/count_by_key_example.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@

#include <cuco/static_map.cuh>

#include <cub/block/block_reduce.cuh>
#include <cuda/std/atomic>
#include <thrust/device_vector.h>
#include <thrust/logical.h>
#include <thrust/transform.h>

#include <cub/block/block_reduce.cuh>

#include <cuda/std/atomic>

#include <cmath>
#include <cstddef>
#include <cstdint>
Expand Down
3 changes: 1 addition & 2 deletions examples/static_map/custom_type_example.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@

#include <cuco/static_map.cuh>

#include <cuda/functional>
#include <thrust/device_vector.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>
#include <thrust/logical.h>
#include <thrust/transform.h>

#include <cuda/functional>

// User-defined key type
struct custom_key_type {
int32_t a;
Expand Down
3 changes: 1 addition & 2 deletions examples/static_set/device_subsets_example.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
#include <cuco/static_set_ref.cuh>
#include <cuco/storage.cuh>

#include <cuda/std/array>
#include <thrust/device_vector.h>
#include <thrust/reduce.h>
#include <thrust/scan.h>

#include <cooperative_groups.h>

#include <cuda/std/array>

#include <algorithm>
#include <cstddef>
#include <iostream>
Expand Down
1 change: 0 additions & 1 deletion include/cuco/detail/dynamic_map_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <cuco/detail/utility/cuda.cuh>

#include <cub/block/block_reduce.cuh>

#include <cuda/std/atomic>

#include <cooperative_groups.h>
Expand Down
3 changes: 1 addition & 2 deletions include/cuco/detail/hyperloglog/hyperloglog_ref.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
#include <cuco/utility/cuda_thread_scope.cuh>
#include <cuco/utility/traits.hpp>

#include <thrust/type_traits/is_contiguous_iterator.h>

#include <cuda/std/bit>
#include <cuda/std/span>
#include <cuda/std/utility>
#include <thrust/type_traits/is_contiguous_iterator.h>

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/detail/hyperloglog/kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <cuda/std/array>
#include <cuda/std/span>

#include <cstddef>

#include <cooperative_groups.h>

#include <cstddef>

namespace cuco::hyperloglog_ns::detail {
CUCO_SUPPRESS_KERNEL_WARNINGS

Expand Down
6 changes: 2 additions & 4 deletions include/cuco/detail/open_addressing/open_addressing_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
#include <cuco/storage.cuh>
#include <cuco/utility/traits.hpp>

#include <cub/device/device_select.cuh>
#include <cuda/atomic>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>

#include <cub/device/device_select.cuh>

#include <cuda/atomic>

#include <cmath>

namespace cuco {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
#include <cuco/pair.cuh>
#include <cuco/probing_scheme.cuh>

#include <cuda/atomic>
#include <thrust/distance.h>
#include <thrust/tuple.h>

#include <cuda/atomic>
#if defined(CUCO_HAS_CUDA_BARRIER)
#include <cuda/barrier>
#endif
Expand Down
3 changes: 1 addition & 2 deletions include/cuco/detail/static_map.inl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
#include <cuco/detail/utils.cuh>
#include <cuco/detail/utils.hpp>

#include <cub/device/device_select.cuh>
#include <thrust/iterator/transform_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/tuple.h>

#include <cub/device/device_select.cuh>

namespace cuco::legacy {

template <typename Key, typename Value, cuda::thread_scope Scope, typename Allocator>
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/detail/static_map/kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
#include <cuco/detail/utility/cuda.cuh>

#include <cub/block/block_reduce.cuh>

#include <cuda/atomic>
#include <iterator>

#include <cooperative_groups.h>

#include <iterator>

namespace cuco::static_map_ns::detail {
CUCO_SUPPRESS_KERNEL_WARNINGS

Expand Down
Loading

0 comments on commit 9fbef96

Please sign in to comment.