Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
87e2bfd
Add C++ infrastructure: build, format, lint, and unit test tooling
mkolodner-sc Mar 25, 2026
a18fb47
Remove pybind11 import from generate_compile_commands — bundled in to…
mkolodner-sc Mar 25, 2026
c127f2b
ppr seq
yliu2-sc Mar 25, 2026
b5b8027
Auto-build C++ extensions in post_install; auto-add LLVM to PATH on Mac
mkolodner-sc Mar 25, 2026
9d3c8df
Rename setup.py to build_cpp_extensions.py; add build_cpp_extensions …
mkolodner-sc Mar 25, 2026
ace7126
Scope C++ extension discovery to gigl/cpp_extensions/
mkolodner-sc Mar 25, 2026
48be4cc
Remove unnecessary existence check for build_cpp_extensions.py in pos…
mkolodner-sc Mar 25, 2026
1b153b7
Review fixes + adopt PyTorch csrc conventions for C++ layout
mkolodner-sc Mar 25, 2026
03ed8c4
Add multi-source C++ ext support, gigl/csrc package init, and .so git…
mkolodner-sc Mar 25, 2026
638e667
Move build_cpp_extensions.py to scripts/ and wire into relevant make …
mkolodner-sc Mar 25, 2026
416f6b4
Initial commit
mkolodner-sc Mar 30, 2026
4af704e
merge main
mkolodner-sc Mar 30, 2026
91d99d3
Update
mkolodner-sc Mar 31, 2026
3d41dc3
Update
mkolodner-sc Mar 31, 2026
04cee0c
Fix for gs mode
mkolodner-sc Mar 31, 2026
99fdef2
Address comment
mkolodner-sc Mar 31, 2026
04df860
Merge branch 'mkolodner-sc/fix_ppr_memory' into mkolodner-sc/cpp-infr…
mkolodner-sc Mar 31, 2026
210c1dd
Upate
mkolodner-sc Apr 1, 2026
909faf4
Merge branch 'main' into mkolodner-sc/cpp-infrastructure
mkolodner-sc Apr 1, 2026
628a9f2
Update tidy and format
mkolodner-sc Apr 10, 2026
75863a6
Update
mkolodner-sc Apr 10, 2026
cffa7ba
Update guidance
mkolodner-sc Apr 10, 2026
49e9497
Update
mkolodner-sc Apr 10, 2026
3e1bf6b
Fix
mkolodner-sc Apr 10, 2026
7fd3ed9
Fix
mkolodner-sc Apr 10, 2026
a682ded
Update
mkolodner-sc Apr 10, 2026
83e51bc
Update
mkolodner-sc Apr 14, 2026
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
83 changes: 83 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 10000000
PointerAlignment: Left
RawStringFormats:
- Delimiters: [pb]
Language: TextProto
BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
...
229 changes: 229 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
---
Checks: >
boost-use-to-string,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
cert-err34-c,
cert-flp30-c,
cert-msc32-c,
cert-msc50-cpp,
cert-msc51-cpp,
clang-diagnostic-*,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-no-malloc,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-pro-type-union-access,
cppcoreguidelines-slicing,
google-build-namespaces,
google-explicit-constructor,
google-global-names-in-headers,
google-readability-casting,
google-runtime-member-string-references,
google-runtime-memset,
hicpp-exception-baseclass,
misc-*,
-misc-confusable-identifiers,
-misc-const-correctness,
-misc-no-recursion,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
performance-*,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-function-cognitive-complexity,
-readability-container-contains,
-readability-identifier-length,
-readability-magic-numbers,

# WarningsAsErrors and HeaderFilterRegex work together:
# HeaderFilterRegex scopes which headers clang-tidy reports diagnostics for.
# Warnings from headers outside the regex (PyTorch, pybind11, etc.) are suppressed
# entirely and never reach WarningsAsErrors — so the large warning counts printed
# by clang-tidy ("N warnings generated") are third-party noise that is silently
# dropped. Only diagnostics in our own headers (.*/gigl/csrc/.*) are reported,
# and those are treated as hard errors.
WarningsAsErrors: '*'
HeaderFilterRegex: '.*/gigl/csrc/.*'
FormatStyle: none
User: jenkins
# CheckOptions: per-check tuning parameters. Each entry configures a specific
# option for an individual check, using the form:
# key: <check-name>.<OptionName>
# value: <value>
# These let you adjust thresholds, naming patterns, and behavior without
# enabling or disabling the check entirely.
CheckOptions:
- key: bugprone-argument-comment.StrictMode
value: '0'
- key: bugprone-assert-side-effect.AssertMacros
value: 'assert,SC_ASSERT'
- key: bugprone-assert-side-effect.CheckFunctionCalls
value: '0'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view'
- key: bugprone-string-constructor.LargeLengthThreshold
value: '8388608'
- key: bugprone-string-constructor.WarnOnLargeLength
value: '1'
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: '1'
- key: google-global-names-in-headers.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: misc-definitions-in-headers.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: misc-definitions-in-headers.UseHeaderFileExtension
value: '1'
- key: misc-misplaced-widening-cast.CheckImplicitCasts
value: '0'
- key: misc-sizeof-expression.WarnOnSizeOfCompareToConstant
value: '1'
- key: misc-sizeof-expression.WarnOnSizeOfConstant
value: '1'
- key: misc-sizeof-expression.WarnOnSizeOfThis
value: '1'
- key: misc-suspicious-enum-usage.StrictMode
value: '0'
- key: misc-suspicious-missing-comma.MaxConcatenatedTokens
value: '5'
- key: misc-suspicious-missing-comma.RatioThreshold
value: '0.200000'
- key: misc-suspicious-missing-comma.SizeThreshold
value: '5'
- key: misc-suspicious-string-compare.StringCompareLikeFunctions
value: ''
- key: misc-suspicious-string-compare.WarnOnImplicitComparison
value: '1'
- key: misc-suspicious-string-compare.WarnOnLogicalNotComparison
value: '0'
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
value: '1'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-loop-convert.UseCxx20ReverseRanges
value: '0'
- key: modernize-make-unique.IgnoreMacros
value: '1'
- key: modernize-make-unique.IncludeStyle
value: 'llvm'
- key: modernize-make-unique.MakeSmartPtrFunction
value: 'std::make_unique'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: memory
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-noexcept.UseNoexceptFalse
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
- key: performance-faster-string-find.StringLikeClasses
value: 'std::basic_string'
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: '0'
- key: performance-inefficient-string-concatenation.StrictMode
value: '0'
- key: performance-inefficient-vector-operation.VectorLikeClasses
value: '::std::vector'
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: '1'
- key: performance-move-constructor-init.IncludeStyle
value: llvm
- key: performance-type-promotion-in-math-fn.IncludeStyle
value: llvm
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
- key: readability-function-size.BranchThreshold
value: '4294967295'
- key: readability-function-size.LineThreshold
value: '1000'
- key: readability-function-size.NestingThreshold
value: '4294967295'
- key: readability-function-size.ParameterThreshold
value: '4294967295'
- key: readability-function-size.StatementThreshold
value: '800'
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassConstantPrefix
value: k
- key: readability-identifier-naming.ClassConstantCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: camelBack
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.IgnoreFailedSplit
value: '0'
- key: readability-identifier-naming.LocalConstantCase
value: camelBack
- key: readability-identifier-naming.MemberCase
value: camelBack
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberPrefix
value: _
- key: readability-identifier-naming.ProtectedMemberCase
value: camelBack
- key: readability-identifier-naming.ProtectedMemberPrefix
value: _
- key: readability-identifier-naming.PublicMemberCase
value: camelBack
- key: readability-identifier-naming.TemplateParameterCase
value: camelBack
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: camelBack
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: '1'
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
value: '0'
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
value: '0'
- key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold
value: '3'
...
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ fossa*.zip

# https://github.com/google-github-actions/auth/issues/497
gha-creds-*.json

# Compiled C++ extension modules
gigl/csrc/**/*.so
Loading