-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2fb084b
Showing
42 changed files
with
1,918 additions
and
0 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,54 @@ | ||
--- | ||
# Base Style | ||
BasedOnStyle: Google # Based on Google style guidelines | ||
Language: Cpp # Explicitly specify C++ | ||
Standard: c++17 # Use C++17 standard | ||
|
||
# Code Layout | ||
ColumnLimit: 180 # Recommended maximum line length | ||
IndentWidth: 4 # 4-space indentation | ||
InsertNewlineAtEOF: true # Ensure newline at end of file | ||
UseTab: Never # Exclusively use spaces for indentation | ||
|
||
# Code Structure | ||
AllowShortIfStatementsOnASingleLine: Never # Prevent single-line if statements | ||
AllowShortFunctionsOnASingleLine: Inline # Allow short functions on single line | ||
AllowShortLoopsOnASingleLine: false # Prevent single-line loops | ||
BinPackArguments: false | ||
BinPackParameters: OnePerLine | ||
BreakBeforeBraces: Attach # Attach braces to code block | ||
BreakBeforeBinaryOperators: NonAssignment # Break before non-assignment operators | ||
BreakBeforeTernaryOperators: true # Break before ternary operators | ||
BreakConstructorInitializers: BeforeColon # Break constructor initializers before colon | ||
BreakInheritanceList: BeforeColon # Break inheritance list before colon | ||
InsertBraces: true # Automatically insert braces for clarity | ||
PackConstructorInitializers: Never | ||
|
||
# Language Features | ||
AccessModifierOffset: -4 # Offset for access modifiers | ||
CompactNamespaces: false # Keep namespaces readable | ||
FixNamespaceComments: true # Properly format namespace comments | ||
IndentCaseLabels: true # Indent switch case labels | ||
NamespaceIndentation: All # Indent inside namespaces | ||
|
||
# Pointers and References | ||
DerivePointerAlignment: false # Manually set pointer alignment | ||
PointerAlignment: Left # Left-align pointers and references | ||
|
||
# Spacing and Alignment | ||
SpaceAroundPointerQualifiers: Default # Consistent space around pointer qualifiers | ||
SpaceBeforeParens: ControlStatements # Space before parentheses in control statements | ||
SpaceBeforeCtorInitializerColon: true # Space before constructor initializer colon | ||
SpaceBeforeInheritanceColon: true # Space before inheritance colon | ||
SpaceBeforeRangeBasedForLoopColon: true # Space before range-based for loop colon | ||
SpacesBeforeTrailingComments: 2 # Two spaces before trailing comments | ||
SpacesInContainerLiterals: false # No extra spaces in container literals | ||
SpacesInParensOptions: | ||
InEmptyParentheses: false # No spaces in empty parentheses | ||
SpacesInSquareBrackets: false # No extra spaces in square brackets | ||
|
||
# Comments and Includes | ||
AlignTrailingComments: | ||
Kind: Always # Strictly align trailing comments | ||
ReflowComments: true # Reflow comments to fit column limit | ||
SortIncludes: CaseSensitive # Sort includes in case-sensitive manner |
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,79 @@ | ||
Checks: > | ||
-*, # Disable all checks by default | ||
bugprone-*, | ||
readability-*, | ||
performance-*, | ||
modernize-*, | ||
cppcoreguidelines-*, | ||
clang-analyzer-*, | ||
portability-*, | ||
security-*, | ||
misc-*, | ||
google-*, | ||
CheckOptions: | ||
# Naming conventions | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.StructCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.MethodCase | ||
value: lower_case | ||
- key: readability-identifier-naming.FunctionCase | ||
value: lower_case | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ParameterCase | ||
value: lower_case | ||
- key: readability-identifier-naming.MemberCase | ||
value: m_camelBack | ||
- key: readability-identifier-naming.StaticMemberCase | ||
value: s_camelBack | ||
- key: readability-identifier-naming.GlobalVariableCase | ||
value: g_lower_case | ||
- key: readability-identifier-naming.NamespaceCase | ||
value: lower_case | ||
|
||
# Function complexity | ||
- key: readability-function-cognitive-complexity.Threshold | ||
value: 35 | ||
|
||
# Bug detection | ||
- key: bugprone-argument-comment | ||
value: 1 | ||
- key: bugprone-branch-clone | ||
value: 1 | ||
- key: bugprone-use-after-move | ||
value: 1 | ||
|
||
# Modern practices | ||
- key: modernize-use-nullptr.NullMacros | ||
value: 'NULL' | ||
- key: modernize-use-auto | ||
value: 1 | ||
- key: modernize-avoid-bind | ||
value: 1 | ||
|
||
# Core guidelines | ||
- key: cppcoreguidelines-no-malloc | ||
value: 1 | ||
- key: cppcoreguidelines-pro-type-cstyle-cast | ||
value: 1 | ||
- key: cppcoreguidelines-special-member-functions | ||
value: 1 | ||
|
||
# Security | ||
- key: security-undefined-bool-conversion | ||
value: 1 | ||
- key: security-implicit-int-float-conversion | ||
value: 1 | ||
|
||
# Performance | ||
- key: performance-unnecessary-copy-initialization | ||
value: 1 | ||
- key: performance-for-range-copy | ||
value: 1 | ||
- key: performance-move-const-arg | ||
value: 1 |
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,9 @@ | ||
# all start with .(dot), including directories and files | ||
.* | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
compose.yml | ||
LICENSE* | ||
Makefile | ||
README.md |
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,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[Makefile] | ||
indent_style = tab |
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,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: 'bug: ' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Bug description | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
- Would you like to work on a fix? [y/n] | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. ... | ||
2. ... | ||
3. ... | ||
4. ... | ||
|
||
<!-- Make sure you are able to reproduce the bug in the main branch, too. --> | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Screenshots | ||
|
||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
## Environment | ||
|
||
<!-- Please fill the following information. --> | ||
|
||
- OS: [e.g. Ubuntu 20.04] | ||
- example-cuda-cmake version: [e.g. 0.1.0] | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
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 @@ | ||
blank_issues_enabled: true |
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,28 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: 'Feature Request: ' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Motivations | ||
|
||
<!-- | ||
If your feature request is related to a problem, please describe it. | ||
--> | ||
|
||
- Would you like to implement this feature? [y/n] | ||
|
||
## Solution | ||
|
||
<!-- Describe the solution you'd like. --> | ||
|
||
## Alternatives | ||
|
||
<!-- Describe any alternative solutions or features you've considered. --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
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,9 @@ | ||
<!-- Please explain the changes you made --> | ||
|
||
<!-- | ||
Please make sure: | ||
- you have read the contributing guidelines: | ||
https://github.com/x-pt/example-cuda-cmake/blob/main/docs/CONTRIBUTING.md | ||
- you have updated the changelog (if needed): | ||
https://github.com/x-pt/example-cuda-cmake/blob/main/CHANGELOG.md | ||
--> |
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,63 @@ | ||
version: 1 | ||
|
||
labels: | ||
# Type: Build-related changes | ||
- label: "@type/build" | ||
title: '^build(?:\(.+\))?\!?:' | ||
|
||
# Type: CI-related changes | ||
- label: "@type/ci" | ||
title: '^ci(?:\(.+\))?\!?:' | ||
files: | ||
- '\.github/.+' | ||
|
||
# Type: Documentation changes | ||
- label: "@type/docs" | ||
title: '^docs(?:\(.+\))?\!?:' | ||
files: | ||
- "docs/.+" | ||
- "**/*.md" | ||
|
||
# Type: New feature | ||
- label: "@type/feature" | ||
title: '^feat(?:\(.+\))?\!?:' | ||
|
||
# Type: Bug fix | ||
- label: "@type/fix" | ||
title: '^fix(?:\(.+\))?\!?:' | ||
|
||
# Type: Improvements such as style changes, refactoring, or performance improvements | ||
- label: "@type/improve" | ||
title: '^(style|refactor|perf)(?:\(.+\))?\!?:' | ||
|
||
# Type: Dependency changes | ||
- label: "@type/dependency" | ||
title: '^(chore|build)(?:\(deps\))?\!?:' | ||
|
||
# Type: Test-related changes | ||
- label: "@type/test" | ||
title: '^test(?:\(.+\))?\!?:' | ||
files: | ||
- "tests/.+" | ||
- "spec/.+" | ||
|
||
# Type: Security-related changes | ||
- label: "@type/security" | ||
title: '^security(?:\(.+\))?\!?:' | ||
files: | ||
- "**/security/.+" | ||
|
||
# Issue Type Only: Feature Request | ||
- label: "Feature Request" | ||
type: issue | ||
title: "^Feature Request:" | ||
|
||
# Issue Type Only: Documentation | ||
- label: "Documentation" | ||
type: issue | ||
title: "^.*(\b[Dd]ocumentation|doc(s)?\b).*" | ||
|
||
# Issue Type Only: Bug Report | ||
- label: "Bug Report" | ||
type: issue | ||
title: "^.*(\b[Bb]ug|b(u)?g(s)?\b).*" |
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
# Check for updates every Monday | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 |
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,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |
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,14 @@ | ||
name: CD # Continuous Deployment or Delivery | ||
|
||
on: | ||
push: | ||
# e.g. 1.0.0, v2.0.0, v0.1.0, v0.2.0-alpha, v0.3.0+build-71edf32 | ||
tags: | ||
- '[v]?[0-9]+\.[0-9]+\.[0-9]+.*' | ||
|
||
jobs: | ||
dd: | ||
name: Deploy or Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 |
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,34 @@ | ||
name: CI # Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, windows-2022] | ||
|
||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: Jimver/[email protected] | ||
id: cuda-toolkit | ||
with: | ||
log-file-suffix: ${{ matrix.os }}.txt | ||
cuda: '12.5.0' | ||
method: 'network' | ||
sub-packages: '["nvcc", "cudart", "cublas"]' | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Test | ||
run: | | ||
make run | ||
make test |
Oops, something went wrong.