Skip to content

Commit

Permalink
Mostly flatten the folder structure of libcu++ (#1630)
Browse files Browse the repository at this point in the history
* Rename internal only header files to `__meow_`

We want to name the folder cotnaining the subheaders as `__meow` so that we then can easily expose the internal header without any further code movement

* Move all internal subfolders up to `cuda/std`

We do not need the deep nested structure anymore, as a first step move all internal subfolders of `cuda/std/detail/libcxx/include` to `cuda/std`

* Drop `__cccl_config` file in libcxx

* Move `ptx` files from `cuda/std/__cuda` into `cuda/__ptx`

* Adopt internal test files to new folder structure
  • Loading branch information
miscco authored Apr 18, 2024
1 parent 05fadcf commit 29a24f4
Show file tree
Hide file tree
Showing 681 changed files with 2,719 additions and 2,750 deletions.
2 changes: 1 addition & 1 deletion ci/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -z "$major" ] || [ -z "$minor" ] || [ -z "$patch" ]; then
fi

# Version file paths
CCCL_VERSION_FILE="libcudacxx/include/cuda/std/detail/libcxx/include/__cccl/version.h"
CCCL_VERSION_FILE="libcudacxx/include/cuda/std/__cccl/version.h"
THRUST_VERSION_FILE="thrust/thrust/version.h"
CUB_VERSION_FILE="cub/cub/version.cuh"
CCCL_CMAKE_VERSION_FILE="lib/cmake/cccl/cccl-config-version.cmake"
Expand Down
2 changes: 1 addition & 1 deletion cub/test/catch2_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <tuple>
#include <type_traits>

#include "cuda/std/detail/libcxx/include/__cccl/diagnostic.h"
#include "cuda/std/__cccl/diagnostic.h"
#include "test_util_vec.h"
#include <metal.hpp>

Expand Down
12 changes: 10 additions & 2 deletions libcudacxx/include/cuda/__cccl_config
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
// under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
// SPDX-FileCopyrightText: Copyright (c) 2023-24 NVIDIA CORPORATION & AFFILIATES.
//
//===----------------------------------------------------------------------===//

#ifndef _CUDA__CCCL_CONFIG
#define _CUDA__CCCL_CONFIG

#include <cuda/std/detail/libcxx/include/__cccl_config>
#include <cuda/std/__cccl/attributes.h>
#include <cuda/std/__cccl/compiler.h>
#include <cuda/std/__cccl/diagnostic.h>
#include <cuda/std/__cccl/dialect.h>
#include <cuda/std/__cccl/execution_space.h>
#include <cuda/std/__cccl/ptx_isa.h>
#include <cuda/std/__cccl/system_header.h>
#include <cuda/std/__cccl/version.h>
#include <cuda/std/__cccl/visibility.h>

#endif // _CUDA__CCCL_CONFIG
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# include <cuda/__memory_resource/resource.h>
# include <cuda/__memory_resource/resource_ref.h>
# include <cuda/std/__cuda/api_wrapper.h>
# include <cuda/std/detail/libcxx/include/__new/bad_alloc.h>
# include <cuda/std/__new/bad_alloc.h>

# if _CCCL_STD_VER >= 2014

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# include <cuda/__memory_resource/resource.h>
# include <cuda/__memory_resource/resource_ref.h>
# include <cuda/std/__cuda/api_wrapper.h>
# include <cuda/std/detail/libcxx/include/__new/bad_alloc.h>
# include <cuda/std/__new/bad_alloc.h>

# if _CCCL_STD_VER >= 2014

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
#if !defined(_CCCL_COMPILER_MSVC_2017)

# if !defined(_CCCL_CUDA_COMPILER_NVCC) && !defined(_CCCL_CUDA_COMPILER_NVHPC)
# include <cuda_runtime_api.h>
# include <cuda_runtime.h>
# endif // !_CCCL_CUDA_COMPILER_NVCC && !_CCCL_CUDA_COMPILER_NVHPC

# include <cuda/__memory_resource/get_property.h>
# include <cuda/__memory_resource/properties.h>
# include <cuda/__memory_resource/resource.h>
# include <cuda/__memory_resource/resource_ref.h>
# include <cuda/std/__cuda/api_wrapper.h>
# include <cuda/std/detail/libcxx/include/__new/bad_alloc.h>
# include <cuda/std/__new/bad_alloc.h>

# if _CCCL_STD_VER >= 2014

Expand Down
8 changes: 4 additions & 4 deletions libcudacxx/include/cuda/__memory_resource/get_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

#if !defined(_CCCL_COMPILER_MSVC_2017)

# include <cuda/std/detail/libcxx/include/__concepts/same_as.h>
# include <cuda/std/detail/libcxx/include/__type_traits/remove_const_ref.h>
# include <cuda/std/detail/libcxx/include/__type_traits/void_t.h>
# include <cuda/std/detail/libcxx/include/__utility/declval.h>
# include <cuda/std/__concepts/same_as.h>
# include <cuda/std/__type_traits/remove_const_ref.h>
# include <cuda/std/__type_traits/void_t.h>
# include <cuda/std/__utility/declval.h>

# if _CCCL_STD_VER >= 2014

Expand Down
8 changes: 4 additions & 4 deletions libcudacxx/include/cuda/__memory_resource/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#if !defined(_CCCL_COMPILER_MSVC_2017)

# include <cuda/__memory_resource/get_property.h>
# include <cuda/std/detail/libcxx/include/__concepts/all_of.h>
# include <cuda/std/detail/libcxx/include/__concepts/equality_comparable.h>
# include <cuda/std/detail/libcxx/include/__concepts/same_as.h>
# include <cuda/std/detail/libcxx/include/__type_traits/decay.h>
# include <cuda/std/__concepts/all_of.h>
# include <cuda/std/__concepts/equality_comparable.h>
# include <cuda/std/__concepts/same_as.h>
# include <cuda/std/__type_traits/decay.h>
# include <cuda/stream_ref>

# if _CCCL_STD_VER >= 2014
Expand Down
8 changes: 4 additions & 4 deletions libcudacxx/include/cuda/__memory_resource/resource_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

# include <cuda/__memory_resource/get_property.h>
# include <cuda/__memory_resource/resource.h>
# include <cuda/std/__concepts/_One_of.h>
# include <cuda/std/__concepts/all_of.h>
# include <cuda/std/__memory/addressof.h>
# include <cuda/std/__type_traits/is_base_of.h>
# include <cuda/std/cstddef>
# include <cuda/std/detail/libcxx/include/__concepts/_One_of.h>
# include <cuda/std/detail/libcxx/include/__concepts/all_of.h>
# include <cuda/std/detail/libcxx/include/__memory/addressof.h>
# include <cuda/std/detail/libcxx/include/__type_traits/is_base_of.h>
# include <cuda/stream_ref>

# if _CCCL_STD_VER >= 2014
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

#include <nv/target> // __CUDA_MINIMUM_ARCH__ and friends

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# pragma system_header
#endif // no system header

#include <cuda/__ptx/ptx_dot_variants.h>
#include <cuda/__ptx/ptx_helper_functions.h>
#include <cuda/std/cstdint>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_dot_variants.h>
#include <cuda/std/detail/libcxx/include/__cuda/ptx/ptx_helper_functions.h>

_LIBCUDACXX_BEGIN_NAMESPACE_CUDA_PTX

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef _CUDA_PTX_DOT_VARIANTS_H_
#define _CUDA_PTX_DOT_VARIANTS_H_

#include <cuda/std/detail/libcxx/include/__type_traits/integral_constant.h> // std::integral_constant
#include <cuda/std/__type_traits/integral_constant.h> // std::integral_constant

#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
# pragma GCC system_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#ifndef _CUDA_PTX_HELPER_FUNCTIONS_H_
#define _CUDA_PTX_HELPER_FUNCTIONS_H_

#include <cuda/std/__type_traits/integral_constant.h>
#include <cuda/std/cstddef> // size_t
#include <cuda/std/cstdint> // uint32_t
#include <cuda/std/detail/libcxx/include/__type_traits/integral_constant.h>

#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
# pragma GCC system_header
Expand Down
Loading

0 comments on commit 29a24f4

Please sign in to comment.