Skip to content

Commit

Permalink
[pre-commit.ci] auto code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 5, 2024
1 parent a78629d commit 94c324b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
8 changes: 4 additions & 4 deletions benchmarks/static_map/insert_or_apply_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
#include <cuco/utility/key_generator.cuh>
#include <cuco/utility/reduction_functors.cuh>

#include <cuda/std/cmath>


#include <nvbench/nvbench.cuh>

#include <cuda/std/cmath>
#include <thrust/device_vector.h>
#include <thrust/transform.h>

Expand All @@ -45,7 +43,9 @@ std::enable_if_t<(sizeof(Key) == sizeof(Value)), void> static_map_insert_or_appl
auto const occupancy = state.get_float64("Occupancy");
auto const multiplicity = state.get_int64("Multiplicity");

std::size_t const size = static_cast<size_t>(cuda::std::ceil(static_cast<double>(num_keys) / static_cast<double>(multiplicity))) / occupancy;
std::size_t const size = static_cast<size_t>(cuda::std::ceil(static_cast<double>(num_keys) /
static_cast<double>(multiplicity))) /
occupancy;

thrust::device_vector<Key> keys(num_keys);

Expand Down
9 changes: 4 additions & 5 deletions include/cuco/detail/extent/extent.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
#include <cuco/storage.cuh>
#include <cuco/utility/fast_int.cuh>

#include <cuda/std/type_traits>

#include <cuda/std/cmath>

#include <cuda/std/type_traits>

namespace cuco {

Expand Down Expand Up @@ -93,8 +91,9 @@ template <int32_t CGSize, int32_t BucketSize, typename SizeType, std::size_t N>
(static_cast<uint64_t>(std::numeric_limits<SizeType>::max()) < max_prime)
? std::numeric_limits<SizeType>::max()
: static_cast<SizeType>(max_prime);
auto const size = static_cast<SizeType>(cuda::std::ceil(static_cast<double>(
std::max(static_cast<SizeType>(ext), static_cast<SizeType>(1))) / static_cast<double>(CGSize * BucketSize)));
auto const size = static_cast<SizeType>(cuda::std::ceil(
static_cast<double>(std::max(static_cast<SizeType>(ext), static_cast<SizeType>(1))) /
static_cast<double>(CGSize * BucketSize)));
if (size > max_value) { CUCO_FAIL("Invalid input extent"); }

if constexpr (N == dynamic_extent) {
Expand Down
6 changes: 3 additions & 3 deletions include/cuco/detail/prime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

#pragma once

#include <cuda/std/cmath>

#include <algorithm>
#include <array>
#include <cstdint>
#include <limits>
#include <cuda/std/cmath>


namespace cuco {
namespace detail {
Expand Down Expand Up @@ -20155,7 +20154,8 @@ constexpr T get_valid_capacity(T capacity) noexcept
if constexpr (not uses_vector_load) { return cg_size; }
}();

auto const c = static_cast<T>(cuda::std::ceil(static_cast<double>(capacity) / static_cast<double>(stride)));
auto const c =
static_cast<T>(cuda::std::ceil(static_cast<double>(capacity) / static_cast<double>(stride)));
auto const min_prime = std::lower_bound(primes.begin(), primes.end(), c);
return *min_prime * stride;
}
Expand Down
4 changes: 2 additions & 2 deletions include/cuco/detail/utility/cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#pragma once

#include <cuco/detail/error.hpp>

#include <cuda/std/cmath>

namespace cuco {
Expand Down Expand Up @@ -44,8 +45,7 @@ constexpr auto grid_size(index_type num,
int32_t block_size = default_block_size()) noexcept
{
return static_cast<int32_t>(
cuda::std::ceil(static_cast<double>(cg_size * num) / static_cast<double> (stride * block_size))
);
cuda::std::ceil(static_cast<double>(cg_size * num) / static_cast<double>(stride * block_size)));
}

/**
Expand Down

0 comments on commit 94c324b

Please sign in to comment.