Skip to content
Open
Show file tree
Hide file tree
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
68 changes: 68 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveMacros: Consecutive
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 8
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
33 changes: 33 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Clang Format

on:
push:
branches: [ main ]
paths:
- '.github/**'
- 'src/**'
- 'include/**'
- 'tests/**'
- '.clang-format'
pull_request:
branches: [ main ]

jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
path:
- 'src'
- 'include'
- 'tests'
steps:
- uses: actions/checkout@v4

- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.15.0
with:
clang-format-version: '20'
check-path: ${{ matrix.path }}
26 changes: 13 additions & 13 deletions include/regular_path_query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#include <cubool/cubool.h>

cuBool_Matrix regular_path_query_with_transposed(
// vector of sparse graph matrices for each label
const std::vector<cuBool_Matrix> &graph, const std::vector<cuBool_Index> &source_vertices,
// vector of sparse automaton matrices for each label
const std::vector<cuBool_Matrix> &automaton, const std::vector<cuBool_Index> &start_states,
// transposed matrices for graph and automaton
const std::vector<cuBool_Matrix> &graph_transposed,
const std::vector<cuBool_Matrix> &automaton_transposed,
// vector of sparse graph matrices for each label
const std::vector<cuBool_Matrix>& graph, const std::vector<cuBool_Index>& source_vertices,
// vector of sparse automaton matrices for each label
const std::vector<cuBool_Matrix>& automaton, const std::vector<cuBool_Index>& start_states,
// transposed matrices for graph and automaton
const std::vector<cuBool_Matrix>& graph_transposed,
const std::vector<cuBool_Matrix>& automaton_transposed,

const std::vector<bool> &inversed_labels = {}, bool all_labels_are_inversed = false);
const std::vector<bool>& inversed_labels = {}, bool all_labels_are_inversed = false);

cuBool_Matrix regular_path_query(
// vector of sparse graph matrices for each label
const std::vector<cuBool_Matrix> &graph, const std::vector<cuBool_Index> &source_vertices,
// vector of sparse automaton matrices for each label
const std::vector<cuBool_Matrix> &automaton, const std::vector<cuBool_Index> &start_states,
// vector of sparse graph matrices for each label
const std::vector<cuBool_Matrix>& graph, const std::vector<cuBool_Index>& source_vertices,
// vector of sparse automaton matrices for each label
const std::vector<cuBool_Matrix>& automaton, const std::vector<cuBool_Index>& start_states,

const std::vector<bool> &inversed_labels = {}, bool all_labels_are_inversed = false);
const std::vector<bool>& inversed_labels = {}, bool all_labels_are_inversed = false);
Loading