Skip to content

Commit

Permalink
Separate cuda/experimental when sorting includes (NVIDIA#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored and pciolkosz committed Aug 4, 2024
1 parent a0346b9 commit 4ecffd0
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,15 @@ IncludeCategories:
- Regex: '^<thrust/'
Priority: 3
SortPriority: 2
- Regex: '^<cuda/experimental'
Priority: 5
SortPriority: 4
- Regex: '^<cuda/'
Priority: 4
SortPriority: 3
- Regex: '^<[a-z_]*>$'
Priority: 5
SortPriority: 4
Priority: 6
SortPriority: 5
- Regex: '^<cuda'
Priority: 0
SortPriority: 0
Expand Down
5 changes: 3 additions & 2 deletions cudax/include/cuda/experimental/__event/event.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__detail/utility.cuh>
#include <cuda/experimental/__event/event_ref.cuh>
#include <cuda/std/__cuda/api_wrapper.h>
#include <cuda/std/cstddef>
#include <cuda/std/utility>

#include <cuda/experimental/__detail/utility.cuh>
#include <cuda/experimental/__event/event_ref.cuh>

namespace cuda::experimental
{
class timed_event;
Expand Down
5 changes: 3 additions & 2 deletions cudax/include/cuda/experimental/__event/timed_event.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__detail/utility.cuh>
#include <cuda/experimental/__event/event.cuh>
#include <cuda/std/__cuda/api_wrapper.h>
#include <cuda/std/chrono>
#include <cuda/std/cstddef>

#include <cuda/experimental/__detail/utility.cuh>
#include <cuda/experimental/__event/event.cuh>

namespace cuda::experimental
{
//! @brief An owning wrapper for a `cudaEvent_t` with timing enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#ifndef _CUDAX__HIERARCHY_HIERARCHY_DIMENSIONS
#define _CUDAX__HIERARCHY_HIERARCHY_DIMENSIONS

#include <cuda/experimental/__hierarchy/level_dimensions.cuh>
#include <cuda/std/__utility/declval.h>
#include <cuda/std/tuple>

#include <cuda/experimental/__hierarchy/level_dimensions.cuh>

#include <nv/target>

#if _CCCL_STD_VER >= 2017
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
#ifndef _CUDAX__HIERARCHY_LEVEL_DIMENSIONS
#define _CUDAX__HIERARCHY_LEVEL_DIMENSIONS

#include <cuda/experimental/__hierarchy/hierarchy_levels.cuh>
#include <cuda/std/type_traits>

#include <cuda/experimental/__hierarchy/hierarchy_levels.cuh>

#if _CCCL_STD_VER >= 2017
namespace cuda::experimental
{
Expand Down
3 changes: 2 additions & 1 deletion cudax/include/cuda/experimental/__launch/configuration.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#ifndef _CUDAX__LAUNCH_CONFIGURATION
#define _CUDAX__LAUNCH_CONFIGURATION

#include <cuda/experimental/hierarchy.cuh>
#include <cuda/std/span>
#include <cuda/std/tuple>

#include <cuda/experimental/hierarchy.cuh>

#if _CCCL_STD_VER >= 2017
namespace cuda::experimental
{
Expand Down
5 changes: 3 additions & 2 deletions cudax/include/cuda/experimental/__launch/launch.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
#define _CUDAX__LAUNCH_LAUNCH
#include <cuda_runtime.h>

#include <cuda/std/__exception/cuda_error.h>
#include <cuda/stream_ref>

#include <cuda/experimental/__launch/configuration.cuh>
#include <cuda/experimental/__launch/hierarchy_draft.cuh>
#include <cuda/experimental/__launch/kernel_launchers.cuh>
#include <cuda/std/__exception/cuda_error.h>
#include <cuda/stream_ref>

#if _CCCL_STD_VER >= 2017
namespace cuda::experimental
Expand Down
1 change: 1 addition & 0 deletions cudax/test/launch/launch_smoke.cu
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//===----------------------------------------------------------------------===//
#define LIBCUDACXX_ENABLE_EXCEPTIONS
#include <cuda/atomic>

#include <cuda/experimental/launch.cuh>

#include "../hierarchy/testing_common.cuh"
Expand Down

0 comments on commit 4ecffd0

Please sign in to comment.