Skip to content

Commit

Permalink
Remove IncludeCategories from .clang-format (#1987)
Browse files Browse the repository at this point in the history
It was recently noticed that the `IncludeCategories`:
```
IncludeCategories:
  - Regex:           '^<ext/.*\.h>'
    Priority:        2
  - Regex:           '^<.*\.h>'
    Priority:        1
  - Regex:           '^<.*'
    Priority:        2
  - Regex:           '.*'
    Priority:        3
```
In the `.clang-format` are not really necessary as `ext` has no meaning in RAPIDS. This PR removes these.

Note these changes are being made in all repos:
* `cudf`: rapidsai/cudf#9876
* `rmm`: rapidsai/rmm#933
* `cuml`: rapidsai/cuml#4438

Authors:
  - Conor Hoekstra (https://github.com/codereport)

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)

URL: #1987
  • Loading branch information
codereport authored Dec 17, 2021
1 parent dec389c commit 2a09714
Show file tree
Hide file tree
Showing 87 changed files with 118 additions and 127 deletions.
9 changes: 0 additions & 9 deletions cpp/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ ForEachMacros:
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/detail/graph_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>

#include <cuco/detail/hash_functions.cuh>
#include <thrust/sort.h>
#include <thrust/tabulate.h>
#include <thrust/transform.h>
#include <cuco/detail/hash_functions.cuh>

#include <algorithm>
#include <numeric>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/legacy/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/
#pragma once
#include <unistd.h>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <memory>
#include <raft/handle.hpp>
#include <rmm/device_buffer.hpp>
#include <unistd.h>

namespace cugraph {
namespace legacy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#include <raft/handle.hpp>
#include <rmm/exec_policy.hpp>

#include <cub/cub.cuh>
#include <thrust/distance.h>
#include <thrust/functional.h>
#include <thrust/transform_reduce.h>
#include <thrust/tuple.h>
#include <thrust/type_traits/integer_sequence.h>
#include <cub/cub.cuh>

#include <type_traits>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/prims/property_op_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <raft/comms/comms.hpp>
#include <raft/device_atomics.cuh>

#include <cub/cub.cuh>
#include <thrust/detail/type_traits/iterator/is_discard_iterator.h>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/tuple.h>
#include <cub/cub.cuh>

#include <array>
#include <type_traits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <rmm/device_scalar.hpp>
#include <rmm/exec_policy.hpp>

#include <cub/cub.cuh>
#include <thrust/binary_search.h>
#include <thrust/distance.h>
#include <thrust/functional.h>
Expand All @@ -41,7 +42,6 @@
#include <thrust/transform_reduce.h>
#include <thrust/tuple.h>
#include <thrust/type_traits/integer_sequence.h>
#include <cub/cub.cuh>

#include <algorithm>
#include <cstdlib>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/utilities/thrust_tuple_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <raft/device_atomics.cuh>
#include <rmm/device_uvector.hpp>

#include <cub/cub.cuh>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/tuple.h>
#include <cub/cub.cuh>

#include <array>
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/visitors/cascaded_dispatch.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include "enum_mapping.hpp"
#include "graph_enum_mapping.hpp"

#include <cugraph/utilities/graph_traits.hpp>
#include "graph_factory.hpp"
#include <cugraph/utilities/graph_traits.hpp>

namespace cugraph {
namespace visitors {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/visitors/graph_enum_mapping.hpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#pragma once

#include <cugraph/graph.hpp>
#include "graph_enum.hpp"
#include <cugraph/graph.hpp>

namespace cugraph {
namespace visitors {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/cugraph_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <cugraph_c/cugraph_api.h>
#include <cugraph/api_helpers.hpp>
#include <cugraph_c/cugraph_api.h>

#include <cugraph/visitors/rw_visitor.hpp>

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <cugraph_c/error.h>
#include <c_api/error.hpp>
#include <cugraph_c/error.h>

extern "C" const char* cugraph_error_message(const cugraph_error_t* error)
{
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
#pragma once

#include <cugraph_c/graph.h>
#include <c_api/array.hpp>
#include <c_api/error.hpp>
#include <cugraph_c/graph.h>

#include <cugraph/graph.hpp>

Expand Down
8 changes: 4 additions & 4 deletions cpp/src/c_api/graph_sg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

#include <cugraph/detail/utility_wrappers.hpp>
#include <cugraph/graph_functions.hpp>
#include <cugraph/visitors/generic_cascaded_dispatch.hpp>
#include <cugraph_c/graph.h>

#include <c_api/abstract_functor.hpp>
#include <c_api/array.hpp>
#include <c_api/error.hpp>
#include <c_api/graph.hpp>

#include <cugraph/detail/utility_wrappers.hpp>
#include <cugraph/graph_functions.hpp>
#include <cugraph/visitors/generic_cascaded_dispatch.hpp>

#include <raft/handle.hpp>

namespace cugraph {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/centrality/betweenness_centrality.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#include <rmm/device_scalar.hpp>
#include <rmm/device_vector.hpp>

#include <raft/handle.hpp>
#include "betweenness_centrality.cuh"
#include "betweenness_centrality_kernels.cuh"
#include <raft/handle.hpp>

namespace cugraph {
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/legacy/ecg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <cugraph/utilities/error.hpp>
#include <utilities/graph_utils.cuh>

#include <thrust/random.h>
#include <rmm/exec_policy.hpp>
#include <thrust/random.h>

#include <ctime>

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/legacy/egonet.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <rmm/device_vector.hpp>
#include <rmm/exec_policy.hpp>

#include <thrust/transform.h>
#include <ctime>
#include <thrust/transform.h>

#include <cugraph/legacy/graph.hpp>

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/legacy/ktruss.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

#include <cugraph/utilities/error.hpp>

#include "Static/KTruss/KTruss.cuh"
#include <Hornet.hpp>
#include <StandardAPI.hpp>
#include <cugraph/algorithms.hpp>
#include "Static/KTruss/KTruss.cuh"

using namespace hornets_nest;

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/legacy/spectral_clustering.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

#include <cugraph/algorithms.hpp>

#include <thrust/transform.h>
#include <ctime>
#include <rmm/device_vector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/transform.h>

#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/legacy/triangles_counting.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#include <cuda_runtime.h>

#include <raft/cudart_utils.h>
#include <cugraph/algorithms.hpp>
#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>
#include <raft/cudart_utils.h>
#include <rmm/device_buffer.hpp>
#include <rmm/device_vector.hpp>

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/components/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#pragma once

#include <cstdio>
#include <cuda_runtime.h>
#include <execinfo.h>
#include <cstdio>
#include <iostream>
#include <memory>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/components/weak_cc.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include <raft/cudart_utils.h>
#include <raft/device_atomics.cuh>

#include <rmm/device_vector.hpp>
#include "utils.h"
#include <rmm/device_vector.hpp>

namespace MLCommon {

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/converters/COOtoCSR.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include <cugraph/functions.hpp>
#include "COOtoCSR.cuh"
#include <cugraph/functions.hpp>

namespace cugraph {

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/converters/COOtoCSR.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

#pragma once

#include <algorithm>
#include <thrust/extrema.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/scan.h>
#include <thrust/sort.h>
#include <thrust/tuple.h>
#include <algorithm>

#include <cugraph/utilities/error.hpp>
#include <rmm/exec_policy.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/converters/permute_graph.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "converters/COOtoCSR.cuh"
#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>
#include <rmm/device_vector.hpp>
#include <rmm/exec_policy.hpp>
#include <utilities/graph_utils.cuh>
#include "converters/COOtoCSR.cuh"

namespace cugraph {
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/detail/utility_wrappers.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include <raft/random/rng.hpp>

#include <thrust/sequence.h>
#include <rmm/exec_policy.hpp>
#include <thrust/sequence.h>

namespace cugraph {
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/sampling/random_walks.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

// Andrei Schaffer, [email protected]
//
#include <cugraph/algorithms.hpp>
#include "random_walks.cuh"
#include <cugraph/algorithms.hpp>

namespace cugraph {
// template explicit instantiation directives (EIDir's):
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/traversal/legacy/bfs.cu
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
*
*/

#include "bfs.cuh"
#include <algorithm>
#include <iomanip>
#include <limits>
#include "bfs.cuh"

#include <cugraph/legacy/graph.hpp>

#include <cugraph/utilities/error.hpp>
#include <utilities/graph_utils.cuh>
#include "bfs_kernels.cuh"
#include "mg/bfs.cuh"
#include "mg/common_utils.cuh"
#include "traversal_common.cuh"
#include <cugraph/utilities/error.hpp>
#include <utilities/graph_utils.cuh>

namespace cugraph {
namespace detail {
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/traversal/legacy/bfs_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
#include <iostream>

#include <raft/cudart_utils.h>
#include <cub/cub.cuh>
#include <raft/cudart_utils.h>

#include <cugraph/legacy/graph.hpp>
#include "traversal_common.cuh"
#include <cugraph/legacy/graph.hpp>

namespace cugraph {
namespace detail {
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/traversal/legacy/mg/bfs.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#pragma once

#include <raft/handle.hpp>
#include <rmm/device_vector.hpp>
#include "../traversal_common.cuh"
#include "common_utils.cuh"
#include "frontier_expand.cuh"
#include <raft/handle.hpp>
#include <rmm/device_vector.hpp>

namespace cugraph {

Expand Down
4 changes: 2 additions & 2 deletions cpp/src/traversal/legacy/mg/common_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

#include "../traversal_common.cuh"

#include <thrust/host_vector.h>
#include <cub/cub.cuh>
#include <rmm/device_vector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/host_vector.h>

#include <raft/cudart_utils.h>
#include <raft/integer_utils.h>
#include <raft/handle.hpp>
#include <raft/integer_utils.h>

namespace cugraph {

Expand Down
4 changes: 2 additions & 2 deletions cpp/src/traversal/legacy/mg/frontier_expand.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#pragma once

#include <cugraph/legacy/graph.hpp>
#include <rmm/device_vector.hpp>
#include "frontier_expand_kernels.cuh"
#include "vertex_binning.cuh"
#include <cugraph/legacy/graph.hpp>
#include <rmm/device_vector.hpp>

namespace cugraph {

Expand Down
Loading

0 comments on commit 2a09714

Please sign in to comment.