-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge amd-staging into amd-master 20231205
Change-Id: Ib8b0672f8993cfd995d567f582dd9b33d03ddac4 Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
- Loading branch information
1 parent
ad5d1b6
commit db2d128
Showing
15 changed files
with
567 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# THIS FILE IS GENERATED FROM .clangd! | ||
# Run .update-clang-tidy.sh to regenerate. | ||
Checks: | ||
bugprone*, | ||
clang-analyzer*, | ||
google*, | ||
misc*, | ||
modernize*, | ||
-abseil*, | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-reserved-identifier, | ||
-clang-analyzer-security.insecureAPI.strcpy, | ||
-cppcoreguidelines*, | ||
-cppcoreguidelines-pro*, | ||
-misc-non-copyable-objects, | ||
-misc-use-anonymous-namespace, | ||
-modernize-avoid-c-arrays, | ||
-modernize-redundant-void-arg, | ||
-modernize-use-auto, | ||
-modernize-use-nodiscard, | ||
-modernize-use-noexcept, | ||
-modernize-use-trailing-return-type, | ||
-modernize-use-using, | ||
-performance*, | ||
-readability*, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CompileFlags: | ||
Remove: -W* | ||
Add: [-Wall, -pedantic, -I/opt/rocm/include, -I/opt/rocm/include/hsa, -I/opt/rocm/include/rocprofiler] | ||
Compiler: clang++ | ||
|
||
# list here: https://clang.llvm.org/extra/clang-tidy/checks/list.html | ||
Diagnostics: | ||
UnusedIncludes: Strict | ||
# rules below are copied into .clang-tidy using ./.update-clang-tidy.sh | ||
# please keep the rules sorted alphabetically | ||
ClangTidy: | ||
Add: [ | ||
bugprone*, | ||
clang-analyzer*, | ||
google*, | ||
misc*, | ||
modernize*, | ||
] | ||
Remove: [ | ||
abseil*, | ||
bugprone-easily-swappable-parameters, | ||
bugprone-reserved-identifier, | ||
clang-analyzer-security.insecureAPI.strcpy, | ||
cppcoreguidelines*, | ||
cppcoreguidelines-pro*, | ||
misc-non-copyable-objects, | ||
misc-use-anonymous-namespace, | ||
modernize-avoid-c-arrays, | ||
modernize-redundant-void-arg, | ||
modernize-use-auto, | ||
modernize-use-nodiscard, | ||
modernize-use-noexcept, | ||
modernize-use-trailing-return-type, | ||
modernize-use-using, | ||
performance*, | ||
readability*, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ root = true | |
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,8 @@ device/ | |
__pycache__ | ||
README | ||
README.html | ||
|
||
# do NOT ignore these files | ||
!.clang-format | ||
!.clang-tidy | ||
!.clangd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# - How to use: | ||
# python3 -m pip install pre-commit | ||
# pre-commit install --install hooks | ||
# Upon a new commit - the hooks should automagically run | ||
# | ||
# - How to skip: | ||
# git commit --no-verify | ||
# or | ||
# SKIP=clang-format-docker git commit | ||
# SKIP=cpplint-docker git commit | ||
|
||
fail_fast: false | ||
repos: | ||
# For portability I decided to use Docker containers | ||
- repo: https://github.com/dmitrii-galantsev/pre-commit-docker-cpplint | ||
rev: 0.0.3 | ||
hooks: | ||
- id: clang-format-docker | ||
- id: cpplint-docker | ||
# Below is a local way of running formatters and linters | ||
# NOTE: clang-tidy is not used in the above tests | ||
# - repo: https://github.com/pocc/pre-commit-hooks | ||
# rev: v1.3.5 | ||
# hooks: | ||
# - id: clang-format | ||
# args: [--no-diff, -i] | ||
# - id: clang-tidy | ||
# args: [-p=build, --quiet] | ||
# - id: cpplint | ||
# args: [--verbose=5] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x # trace | ||
set -e # exit immediately if command fails | ||
set -u # exit if an undefined variable is found | ||
|
||
awk ' | ||
BEGIN { | ||
print "# THIS FILE IS GENERATED FROM .clangd!" | ||
print "# Run ./.update-clang-tidy.sh to regenerate." | ||
print "Checks:" | ||
} | ||
/Add: \[$/{ | ||
a=1 | ||
next | ||
} | ||
/]/{ | ||
a=0 | ||
} | ||
a{ | ||
gsub(/^\s+/," ") | ||
} | ||
/Remove: \[$/{ | ||
r=1 | ||
next | ||
} | ||
/]/{ | ||
r=0 | ||
} | ||
r{ | ||
gsub(/^\s+/," -") | ||
} | ||
' .clangd | tee .clang-tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set noparent | ||
linelength=100 | ||
filter=-build/include_subdir,-legal/copyright,-runtime/printf,-build/c++11,-runtime/int,-build/header_guard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.