From f240095bc42092fe40adc1ea9297106a9ae3cbef Mon Sep 17 00:00:00 2001 From: Geoffrey M Gunter Date: Thu, 24 Dec 2020 15:37:55 -0800 Subject: [PATCH 1/2] Add clang-format configuration file --- .clang-format | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..f2fee7b --- /dev/null +++ b/.clang-format @@ -0,0 +1,58 @@ +--- +Language: Cpp +BasedOnStyle: LLVM + +# Indentation +IndentWidth: 4 +TabWidth: 4 +ContinuationIndentWidth: 8 +AccessModifierOffset: -4 +#IndentPragmas: true # requires v12.0 + +# Includes +# group ordering is: +# 1. main header +# 2. double-quotes includes +# 3. caesar includes +# 4. all other angle bracket includes +SortIncludes: true +IncludeBlocks: Regroup +IncludeIsMainSourceRegex: '(\.cu)$' +IncludeCategories: + - Regex: '^"' + Priority: 1 + - Regex: '^ Date: Thu, 24 Dec 2020 16:25:40 -0800 Subject: [PATCH 2/2] Fix includes grouping --- .clang-format | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clang-format b/.clang-format index f2fee7b..178882d 100644 --- a/.clang-format +++ b/.clang-format @@ -23,6 +23,8 @@ IncludeCategories: Priority: 1 - Regex: '^