You need to sign in or sign up before continuing.
Unverified Commit d863adb2 authored by Matthew Douglas's avatar Matthew Douglas Committed by GitHub
Browse files

Add clang-format (#1677)

* Add clang-format rules

* Update clang-format
parent 6bd94c27
---
BasedOnStyle: LLVM
AlignAfterOpenBracket: BlockIndent
BinPackArguments: true
BinPackParameters: true
BracedInitializerIndentWidth: 4
ColumnLimit: 120
Cpp11BracedListStyle: true
IndentWidth: 4
IndentWrappedFunctionNames: true
PointerAlignment: Left
SeparateDefinitionBlocks: Always
Standard: c++17
StatementMacros:
- 'MAKE_PreconditionOptimizer32bit1State'
- 'MAKE_PreconditionOptimizer32bit2State'
- 'MAKE_PreconditionStatic8bit1State'
- 'MAKE_PreconditionStatic8bit2State'
- 'MAKE_Optimizer32bit1State'
- 'MAKE_optimizerStatic8bit1State'
- 'MAKE_optimizerStatic8bit2State'
- 'MAKE_OptimizerStatic8bit1StateBlockwise'
- 'MAKE_OptimizerStatic8bit2StateBlockwise'
- 'MAKE_kQuantizeBlockwise'
- 'MAKE_BLOCKWISE8'
- 'MAKE_ELEMENTWISE_FUNC'
- 'CMAKE_ELEMENTWISE_FUNC'
- 'MAKE_FUNC8'
- 'MAKE_FUNC32'
- 'MAKE_CBLOCKWISE8'
- 'MAKE_CFUNC8'
- 'MAKE_CFUNC32'
UseTab: Never
...
...@@ -21,3 +21,9 @@ repos: ...@@ -21,3 +21,9 @@ repos:
rev: v1.26.0 rev: v1.26.0
hooks: hooks:
- id: typos - id: typos
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.6
hooks:
- id: clang-format
types_or: [c++, c, cuda]
files: ^csrc/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment