Skip to content

Commit

Permalink
Reorder and add missing includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeepyjack committed Jul 18, 2022
1 parent 42ced35 commit 60dcc65
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 70 deletions.
3 changes: 2 additions & 1 deletion benchmarks/bloom_filter/bloom_filter_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*/

#include <cuco/bloom_filter.cuh>
#include <cuda_runtime_api.h>

#include <nvbench/nvbench.cuh>

#include <thrust/count.h>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
Expand Down
5 changes: 3 additions & 2 deletions examples/bloom_filter/bloom_filter_example.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
* limitations under the License.
*/

#include <iostream>
#include <cuco/bloom_filter.cuh>

#include <thrust/count.h>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
#include <thrust/sequence.h>

#include <cuco/bloom_filter.cuh>
#include <iostream>

int main(void)
{
Expand Down
20 changes: 9 additions & 11 deletions include/cuco/bloom_filter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

#pragma once

#include <cooperative_groups.h>
#include <cub/cub.cuh>
#include <cuda/std/atomic>
#include <memory>
#include <thrust/distance.h>
#include <thrust/functional.h>

#include <cuco/allocator.hpp>
#include <cuco/detail/bloom_filter_kernels.cuh>
#include <cuco/detail/error.hpp>
#include <cuco/detail/hash_functions.cuh>
#include <cuco/detail/utils.hpp>

#include <cooperative_groups.h>

#include <cuda/std/atomic>
#if defined(CUDART_VERSION) && (CUDART_VERSION >= 11000) && defined(__CUDA_ARCH__) && \
(__CUDA_ARCH__ >= 700)
#define CUCO_HAS_CUDA_BARRIER
Expand All @@ -34,10 +34,8 @@
#include <cuda/barrier>
#endif

#include <cuco/detail/bloom_filter_kernels.cuh>
#include <cuco/detail/error.hpp>
#include <cuco/detail/hash_functions.cuh>
#include <cuco/detail/util.hpp>
#include <cstddef>
#include <memory>

namespace cuco {

Expand Down
10 changes: 10 additions & 0 deletions include/cuco/detail/bloom_filter.inl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
* limitations under the License.
*/

#include <cuco/detail/hash_functions.cuh>
#include <cuco/detail/utils.hpp>

#include <cuda/std/atomic>

#include <algorithm>
#include <cstddef>
#include <iterator>
#include <memory>

namespace cuco {

template <typename Key, cuda::thread_scope Scope, typename Allocator, typename Slot>
Expand Down
5 changes: 4 additions & 1 deletion include/cuco/detail/bloom_filter_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* limitations under the License.
*/

#include <cuda/std/atomic>

#include <cstddef>

namespace cuco {
namespace detail {
namespace cg = cooperative_groups;

/**
* @brief Initializes each slot in the flat `slot` storage.
Expand Down
53 changes: 0 additions & 53 deletions include/cuco/detail/util.hpp

This file was deleted.

7 changes: 5 additions & 2 deletions tests/bloom_filter/bloom_filter_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include <utils.hpp>

#include <cuco/bloom_filter.cuh>

#include <thrust/device_vector.h>
#include <thrust/sequence.h>
#include <utils.hpp>

#include <catch2/catch.hpp>

template <typename Key, typename Slot, std::size_t NumSlots>
__global__ void shared_memory_filter_kernel(bool* key_found)
Expand Down

0 comments on commit 60dcc65

Please sign in to comment.