Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing includes with the help of inshpect #1129

Merged
merged 63 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
621ce9d
Add inshpect CI action
msimberg Dec 5, 2023
dfab9f8
Simplify inshpect config file
msimberg Dec 8, 2023
7e7144e
Enable inshpect includes check
msimberg Dec 8, 2023
83ea397
Add more file extensions to inshpect config
msimberg Dec 8, 2023
9b3f002
Fix missing <memory> and <set> includes
msimberg Dec 8, 2023
a26be9c
Fix missing <unordered_map> includes
msimberg Dec 8, 2023
986080c
Add missing <string> includes
msimberg Dec 8, 2023
8ad52be
add mc.h file with the new include
Apr 16, 2024
fe17144
add 80 #include <utility>
Apr 18, 2024
0501bfe
add #include <utility>, in 70 files
Apr 18, 2024
4031cf2
add #include <sstream>, in 10 files, #include <array>
Apr 18, 2024
f39982b
aa #include <functional> in 9 files
Apr 18, 2024
faabe04
add last #include <utility>
Apr 18, 2024
4a856c3
add #include <type_traits> in 4 files
Apr 18, 2024
481135b
add #include <vector> in all files
Apr 18, 2024
bef420b
last add, vector, utily, ecc.
Apr 18, 2024
d1999a9
refactor code for solve check error
Apr 30, 2024
3dac06d
Refactor of the code
Apr 30, 2024
f900113
add inshpect.yml
Apr 30, 2024
e03c713
add inshpect.yml file
May 3, 2024
8b1387a
add install tools
May 6, 2024
f0b014a
add other two steps: Checkout, Inshpect
May 6, 2024
0ca4519
Reformat of the code and merge with origin/master
May 6, 2024
7151621
add install insphect
May 6, 2024
86f20f0
add set -x
May 6, 2024
f053415
change the url for dasel with the latest version
May 6, 2024
cd817d0
change url for insphect
May 6, 2024
d6d367d
change url for inshpect download
May 6, 2024
3d7b483
add ripgrep download directly
May 6, 2024
5146bce
debug
May 6, 2024
336e9d6
FINISH
May 6, 2024
d5a1f62
Update .github/workflows/inshpect.yml
May 12, 2024
f1371aa
Remove from my stage inshpect.output
May 12, 2024
6cb82b0
Review changes
May 12, 2024
b98fb7e
Update impl.h
gulivarese May 12, 2024
650dd85
Update impl.h
gulivarese May 12, 2024
6e1929f
Update impl.h
gulivarese May 12, 2024
17d14da
Update kernel_runner.h
gulivarese May 12, 2024
a130366
Update utils.h
gulivarese May 12, 2024
a09b80e
Update invoke.h
gulivarese May 12, 2024
9db3874
Update invoke.h
gulivarese May 12, 2024
9ab061e
Remove set -x in inshpect.yml
May 14, 2024
9d7bf60
Refresh with curl
May 14, 2024
5a37d4f
add two pattern about #include <typeinfo>
May 14, 2024
7e4a43f
modify settings of VScode
May 14, 2024
0c22ea3
Add #include <typeinfo>
May 14, 2024
bdb33a6
Update inshpect.yml, callable_object.h, invoke.h
May 15, 2024
d88ad21
Update .github/workflows/inshpect.yml
May 15, 2024
af4993d
Update inshpect.yml file
May 16, 2024
d804bbc
Refactor code
May 16, 2024
a318873
Restore from origin/master about check_format.yml
May 21, 2024
8eae802
Move #include <utility>
May 21, 2024
633f8eb
Delete two white lines and add one lines before curl command
May 21, 2024
bb01f90
add echo and sha256sum --check for dasel
May 21, 2024
ed6e5a9
Add pushd and popd for dasel
May 21, 2024
00e9edf
Remove sudo command for dasel
May 21, 2024
575f44b
remove path for dasel
May 21, 2024
b21b982
Move dependencies for inshpect before this
May 21, 2024
cc17993
Debug: add set -x
May 21, 2024
990b000
Add d for dasel
May 21, 2024
704d41f
Remove set -x for debug
May 21, 2024
77dce97
Add newline in print_csv.h
May 22, 2024
e1696fb
Install ripgrep and dasel with apt command, delete the formal install…
May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/inshpect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Inshpect

on:
pull_request:

jobs:
inshpect:
runs-on: ubuntu-24.04

steps:
- name: Install tools
run: |
sudo apt update
sudo apt install -y fd-find ripgrep dasel

pushd /tmp
curl --output inshpect \
--location https://raw.githubusercontent.com/msimberg/inshpect/d31ba8ed7e636c57cb9085ed3a8450d998e6b8a5/inshpect
echo "4b891a178fa99ac800b9b92acc0596d72f640ca1ae6de7f35ac4b3785dcd7af9 inshpect" | sha256sum --check
chmod +x inshpect
mv inshpect /usr/local/bin/inshpect
popd
- name: Checkout
uses: actions/checkout@v4
- name: Inshpect
if: always()
run: |
export INSHPECT_NUMTHREADS=4
export INSHPECT_FD=fdfind
inshpect . .inshpect.toml
176 changes: 176 additions & 0 deletions .inshpect.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
#
# Distributed Linear Algebra with Future (DLAF)
#
# Copyright (c) 2018-2023, ETH Zurich
# All rights reserved.
#
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause
#

extensions = ["c", "cpp", "cu", "h", "h.in"]

[includes]
enable = true
patterns = [
{ pattern = '\bstd::make_shared\b', include = 'memory' },
{ pattern = '\bstd::map\b', include = 'map' },
{ pattern = '\bstd::set\b', include = 'set' },
{ pattern = '\bstd::multi_map\b', include = 'multi_map' },
{ pattern = '\bstd::multi_set\b', include = 'multi_set' },
{ pattern = '\bstd::unordered_map\b', include = 'unordered_map' },
{ pattern = '\bstd::unordered_set\b', include = 'unordered_set' },
{ pattern = '\bstd::unordered_multi_map\b', include = 'unordered_map' },
{ pattern = '\bstd::unordered_multi_set\b', include = 'unordered_set' },
{ pattern = '\bstd::((shared|unique)_ptr)\b', include = 'memory' },
{ pattern = '\bstd::addressof\b', include = 'memory' },
{ pattern = '\bstd::list\b', include = 'list' },
{ pattern = '\bstd::string\b', include = 'string' },
{ pattern = '\bstd::vector\b', include = 'vector' },
{ pattern = '\bstd::array\b', include = 'array' },
{ pattern = '\bstd::reference_wrapper\b', include = 'functional' },
{ pattern = '\bstd::(c?ref)\b', include = 'functional' },
{ pattern = '\bstd::(u?int[0-9]+_t)\b', include = 'cstdint' },
{ pattern = '\bstd::((i|o)?stringstream)\b', include = 'sstream' },
{ pattern = '\bstd::((i|o)?fstream)\b', include = 'fstream' },
{ pattern = '\bstd::(cin|cout|cerr|clog)\b', include = 'iostream' },
{ pattern = '\bstd::setw\b', include = 'iomanip' },
{ pattern = '\bstd::setprecision\b', include = 'iomanip' },
{ pattern = '\bstd::size_t\b', include = 'cstddef' },
{ pattern = '\bstd::ptrdiff_t\b', include = 'cstddef' },
{ pattern = '\bstd::nullptr_t\b', include = 'cstddef' },
{ pattern = '\bstd::(true|false)_type\b', include = 'type_traits' },
{ pattern = '\bstd::(bool|integral)_constant\b', include = 'type_traits' },
{ pattern = '\bstd::invoke_result\b', include = 'type_traits' },
{ pattern = '\bstd::invoke_result_t\b', include = 'type_traits' },
{ pattern = '\bstd::is_void\b', include = 'type_traits' },
{ pattern = '\bstd::is_void_t\b', include = 'type_traits' },
{ pattern = '\bstd::is_null_pointer\b', include = 'type_traits' },
{ pattern = '\bstd::is_integral\b', include = 'type_traits' },
{ pattern = '\bstd::is_floating_point\b', include = 'type_traits' },
{ pattern = '\bstd::is_array\b', include = 'type_traits' },
{ pattern = '\bstd::is_enum\b', include = 'type_traits' },
{ pattern = '\bstd::is_union\b', include = 'type_traits' },
{ pattern = '\bstd::is_class\b', include = 'type_traits' },
{ pattern = '\bstd::is_function\b', include = 'type_traits' },
{ pattern = '\bstd::is_pointer\b', include = 'type_traits' },
{ pattern = '\bstd::is_lvalue_reference\b', include = 'type_traits' },
{ pattern = '\bstd::is_rvalue_reference\b', include = 'type_traits' },
{ pattern = '\bstd::is_member_object_pointer\b', include = 'type_traits' },
{ pattern = '\bstd::is_member_function_pointer\b', include = 'type_traits' },
{ pattern = '\bstd::is_fundamental\b', include = 'type_traits' },
{ pattern = '\bstd::is_arithmetic\b', include = 'type_traits' },
{ pattern = '\bstd::is_scalar\b', include = 'type_traits' },
{ pattern = '\bstd::is_object\b', include = 'type_traits' },
{ pattern = '\bstd::is_compound\b', include = 'type_traits' },
{ pattern = '\bstd::is_reference\b', include = 'type_traits' },
{ pattern = '\bstd::is_member_pointer\b', include = 'type_traits' },
{ pattern = '\bstd::is_const\b', include = 'type_traits' },
{ pattern = '\bstd::is_volatile\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivial\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_copyable\b', include = 'type_traits' },
{ pattern = '\bstd::is_standard_layout\b', include = 'type_traits' },
{ pattern = '\bstd::is_pod\b', include = 'type_traits' },
{ pattern = '\bstd::is_literal_type\b', include = 'type_traits' },
{ pattern = '\bstd::is_empty\b', include = 'type_traits' },
{ pattern = '\bstd::is_polymorphic\b', include = 'type_traits' },
{ pattern = '\bstd::is_abstract\b', include = 'type_traits' },
{ pattern = '\bstd::is_signed\b', include = 'type_traits' },
{ pattern = '\bstd::is_unsigned\b', include = 'type_traits' },
{ pattern = '\bstd::is_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_default_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_default_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_default_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_copy_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_copy_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_copy_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_move_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_move_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_move_constructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_copy_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_copy_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_copy_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_move_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_move_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_nothrow_move_assignable\b', include = 'type_traits' },
{ pattern = '\bstd::is_destructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_trivially_destructible\b', include = 'type_traits' },
{ pattern = '\bstd::is_same\b', include = 'type_traits' },
{ pattern = '\bstd::is_base_of\b', include = 'type_traits' },
{ pattern = '\bstd::is_convertible\b', include = 'type_traits' },
{ pattern = '\bstd::has_virtual_destructor\b', include = 'type_traits' },
{ pattern = '\bstd::alignment_of\b', include = 'type_traits' },
{ pattern = '\bstd::aligned_storage\b', include = 'type_traits' },
{ pattern = '\bstd::aligned_union\b', include = 'type_traits' },
{ pattern = '\bstd::rank\b', include = 'type_traits' },
{ pattern = '\bstd::extent\b', include = 'type_traits' },
{ pattern = '\bstd::add_(cv|const|pointer|volatile|lvalue_reference|rvalue_reference)\b', include = 'type_traits' },
{ pattern = '\bstd::make_signed\b', include = 'type_traits' },
{ pattern = '\bstd::make_unsigned\b', include = 'type_traits' },
{ pattern = '\bstd::remove_(cv|const|volatile|reference|pointer|extent|all_extents)\b', include = 'type_traits' },
{ pattern = '\bstd::decay\b', include = 'type_traits' },
{ pattern = '\bstd::enable_if\b', include = 'type_traits' },
{ pattern = '\bstd::conditional\b', include = 'type_traits' },
{ pattern = '\bstd::common_type\b', include = 'type_traits' },
{ pattern = '\bstd::underlying_type\b', include = 'type_traits' },
{ pattern = '\bstd::result_of\b', include = 'type_traits' },
{ pattern = '\bstd::is_invocable([a-z_]*)\b', include = 'type_traits' },
{ pattern = '\btypeid\b', include = 'typeinfo' },
{ pattern = '\bstd::type_info\b', include = 'typeinfo' },
{ pattern = '\bstd::(mem((set)|(cpy)|(move)))\b', include = 'cstring' },
{ pattern = '\bstd::swap\b', include = 'utility' },
{ pattern = '\bstd::move\b', include = 'utility' },
{ pattern = '\bstd::forward\b', include = 'utility' },
{ pattern = '\bstd::declval\b', include = 'utility' },
{ pattern = '\bstd::pair\b', include = 'utility' },
{ pattern = '\bstd::make_pair\b', include = 'utility' },
{ pattern = '\bstd::in_place\b', include = 'utility' },
{ pattern = '\bstd::exception_ptr\b', include = 'exception' },
{ pattern = '\bstd::terminate\b', include = 'exception' },
{ pattern = '\bstd::(s|g)et_terminate\b', include = 'exception' },
{ pattern = '\bstd::swap_ranges\b', include = 'algorithm' },
{ pattern = '\bstd::iter_swap\b', include = 'algorithm' },
{ pattern = '\bstd::atomic\b', include = 'atomic' },
{ pattern = '\bstd::(memory_order_[a-z_]+)\b', include = 'atomic' },
{ pattern = '\bstd::(minstd_rand(0)?)\b', include = 'random' },
{ pattern = '\bstd::(mt19937(_64)?)\b', include = 'random' },
{ pattern = '\bstd::random_device\b', include = 'random' },
{ pattern = '\bstd::uniform_(int|uniform)_distribution\b', include = 'random' },
{ pattern = '\bstd::apply\b', include = 'tuple' },
{ pattern = '\bstd::(forward_as_|make_|)tuple\b', include = 'tuple' },
{ pattern = '\bstd::ignore\b', include = 'tuple' },
{ pattern = '\bstd::tie\b', include = 'tuple' },
{ pattern = '\bstd::tuple_(cat|element|size)\b', include = 'tuple' },
{ pattern = '\bstd::(make_)optional\b', include = 'optional' },
{ pattern = '\bstd::nullopt\b', include = 'optional' },
{ pattern = '\bstd::any(|_cast)\b', include = 'any' },
{ pattern = '\bstd::error_(code|condition|category)\b', include = 'system_error' },
{ pattern = '\bstd::system_error\b', include = 'system_error' },
{ pattern = '\bstd::chrono\b', include = 'chrono' },
]

[copyright]
enable = false

[license]
enable = false

[spdx]
enable = false

[pragma_once]
enable = false

[deprecated_includes]
enable = false

[deprecated_names]
enable = false

[disallowed_macros]
enable = false
3 changes: 3 additions & 0 deletions include/dlaf/auxiliary/norm/mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
//
#pragma once

#include <utility>
#include <vector>

#include <dlaf/auxiliary/norm/api.h>
#include <dlaf/common/range2d.h>
#include <dlaf/common/vector.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/blas/tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/// Provides `Tile` wrappers for BLAS operations.

#include <cstddef>
#include <utility>

#include <blas.hh>

Expand Down
2 changes: 2 additions & 0 deletions include/dlaf/common/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <utility>

#include <dlaf/common/source_location.h>

Expand Down
3 changes: 3 additions & 0 deletions include/dlaf/common/callable_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#pragma once

#include <utility>

/// @file

/// Given a function name @fname generates a constexpr object with name fname_o
Expand All @@ -23,6 +25,7 @@
/// The function name is wrapped in parentheses to disable ADL. It is assumed
/// that all required overloads are found relative to the namespace where the
/// macro is used.

#define DLAF_MAKE_CALLABLE_OBJECT(fname) \
constexpr struct fname##_t { \
template <typename... Ts> \
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/common/data_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#pragma once

#include <algorithm>
#include <cstddef>
#include <memory>
#include <type_traits>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/common/index2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <ostream>
#include <string>
#include <type_traits>
#include <utility>

#include <dlaf/common/assert.h>
#include <dlaf/types.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/common/pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

/// @file

#include <optional>
#include <utility>

#include <pika/async_rw_mutex.hpp>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/common/round_robin.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/// @file

#include <cstddef>
#include <vector>

#include <dlaf/common/assert.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/broadcast_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/// @file

#include <type_traits>
#include <utility>

#include <pika/execution.hpp>

Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/communicator_grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#pragma once

#include <array>
#include <cstddef>

#include <dlaf/common/index2d.h>
#include <dlaf/communication/communicator.h>
Expand Down
2 changes: 2 additions & 0 deletions include/dlaf/communication/communicator_pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#pragma once

#include <utility>

#include <dlaf/common/index2d.h>
#include <dlaf/common/pipeline.h>
#include <dlaf/common/round_robin.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/kernels/internal/all_reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#pragma once

#include <complex>
#include <functional>
#include <utility>

#include <mpi.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/kernels/internal/broadcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#pragma once

#include <complex>
#include <functional>
#include <utility>

#include <mpi.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/kernels/internal/p2p.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/// @file

#include <complex>
#include <functional>
#include <utility>

#include <mpi.h>
Expand Down
1 change: 1 addition & 0 deletions include/dlaf/communication/kernels/internal/reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#pragma once

#include <complex>
#include <functional>
#include <utility>

#include <mpi.h>
Expand Down
2 changes: 2 additions & 0 deletions include/dlaf/communication/sync/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/// @file

#include <utility>

#include <dlaf/common/data.h>
#include <dlaf/communication/communicator.h>
#include <dlaf/communication/error.h>
Expand Down
2 changes: 2 additions & 0 deletions include/dlaf/communication/sync/broadcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/// @file

#include <utility>

#include <dlaf/common/assert.h>
#include <dlaf/common/callable_object.h>
#include <dlaf/common/data.h>
Expand Down
4 changes: 4 additions & 0 deletions include/dlaf/eigensolver/band_to_tridiag/mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
#pragma once

#include <atomic>
#include <cstddef>
#include <memory>
#include <sstream>
#include <utility>
#include <vector>

#include <pika/execution.hpp>
#include <pika/semaphore.hpp>
Expand Down
3 changes: 3 additions & 0 deletions include/dlaf/eigensolver/bt_band_to_tridiag/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

#pragma once

#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

#include <pika/execution.hpp>
#include <pika/thread.hpp>
Expand Down
3 changes: 3 additions & 0 deletions include/dlaf/eigensolver/bt_reduction_to_band/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
//
#pragma once

#include <cstddef>
#include <utility>

#include <pika/execution.hpp>
#include <pika/thread.hpp>

Expand Down
Loading
Loading