Skip to content
Open
Changes from all commits
Commits
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
60 changes: 60 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
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: '^<caesar/'
Priority: 2
- Regex: '.*'
Priority: 3

# Line breaks
AlwaysBreakTemplateDeclarations: Yes
AlwaysBreakAfterReturnType: All
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BinPackParameters: false
Comment on lines +31 to +33
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the biggest divergence from isce3. I think I tend to prefer to use more vertical space than you guys do. Feel free to veto ;)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's very close to what i normally do, with one base class constructor per line, followed by one data member per line. the only difference is that i break them out this way even if they would fit. so this is just fine with me

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this actually, if the parameters are filling up too much vertical space, that's a cue to merge some of them into structs/tuples :)


# Braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
SplitEmptyFunction: false
SplitEmptyNamespace: true
SplitEmptyRecord: false

# Spaces
SpaceAfterTemplateKeyword: false
PointerAlignment: Left

# Misc
AllowShortCaseLabelsOnASingleLine: true
...