Skip to content

Commit b70bd15

Browse files
committed
Initial commit
0 parents  commit b70bd15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+53337
-0
lines changed

.clang-format

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# configured with https://zed0.co.uk/clang-format-configurator
2+
3+
---
4+
Language: Cpp
5+
AccessModifierOffset: '-2'
6+
AlignAfterOpenBracket: Align
7+
AlignConsecutiveMacros: 'true'
8+
AlignConsecutiveAssignments: 'false'
9+
AlignConsecutiveDeclarations: 'false'
10+
AlignEscapedNewlines: Left
11+
AlignOperands: 'true'
12+
AlignTrailingComments: 'true'
13+
AllowAllArgumentsOnNextLine: 'true'
14+
AllowAllConstructorInitializersOnNextLine: 'true'
15+
AllowAllParametersOfDeclarationOnNextLine: 'true'
16+
AllowShortBlocksOnASingleLine: 'false'
17+
AllowShortCaseLabelsOnASingleLine: 'false'
18+
AllowShortFunctionsOnASingleLine: Empty
19+
AllowShortIfStatementsOnASingleLine: WithoutElse
20+
AllowShortLambdasOnASingleLine: None
21+
AllowShortLoopsOnASingleLine: 'true'
22+
AlwaysBreakAfterDefinitionReturnType: None
23+
AlwaysBreakAfterReturnType: None
24+
AlwaysBreakBeforeMultilineStrings: 'false'
25+
AlwaysBreakTemplateDeclarations: 'Yes'
26+
BinPackArguments: 'true'
27+
BinPackParameters: 'true'
28+
BraceWrapping:
29+
AfterCaseLabel: 'false'
30+
AfterClass: 'false'
31+
AfterControlStatement: 'false'
32+
AfterEnum: 'false'
33+
AfterFunction: 'true'
34+
AfterNamespace: 'true'
35+
AfterObjCDeclaration: 'false'
36+
AfterStruct: 'false'
37+
AfterUnion: 'false'
38+
AfterExternBlock: 'false'
39+
BeforeCatch: 'false'
40+
BeforeElse: 'false'
41+
IndentBraces: 'false'
42+
SplitEmptyFunction: 'true'
43+
SplitEmptyRecord: 'true'
44+
SplitEmptyNamespace: 'true'
45+
BreakBeforeBinaryOperators: NonAssignment
46+
BreakBeforeBraces: Custom
47+
BreakBeforeTernaryOperators: 'true'
48+
BreakConstructorInitializers: BeforeColon
49+
BreakInheritanceList: BeforeColon
50+
BreakStringLiterals: 'true'
51+
ColumnLimit: '120'
52+
CompactNamespaces: 'false'
53+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
54+
ConstructorInitializerIndentWidth: '4'
55+
ContinuationIndentWidth: '4'
56+
Cpp11BracedListStyle: 'true'
57+
DerivePointerAlignment: 'false'
58+
DisableFormat: 'false'
59+
ExperimentalAutoDetectBinPacking: 'false'
60+
FixNamespaceComments: 'true'
61+
ForEachMacros: ['foreach', 'FOREACH', 'RANGES_FOR', 'hlist_for_each_entry_continue', 'hlist_for_each_entry', 'hlist_for_each_entry_from', 'hlist_for_each_entry_safe', 'hlist_for_each_safe', 'list_for_each_entry', 'list_for_each_entry_continue', 'list_for_each_entry_continue_reverse', 'list_for_each_entry_from', 'list_for_each_entry_reverse', 'list_for_each_entry_safe', 'list_for_each_entry_safe_continue', 'list_for_each_entry_safe_from', 'list_for_each_entry_safe_reverse', 'list_for_each_from', 'list_for_each_prev', 'list_for_each_prev_safe', 'list_for_each_safe']
62+
TypenameMacros: ['STACK_OF', 'LIST']
63+
IncludeBlocks: Regroup
64+
IncludeIsMainRegex: '([-_](test|unittest))?$'
65+
IndentCaseLabels: 'true'
66+
IndentPPDirectives: None
67+
IndentWidth: '4'
68+
IndentWrappedFunctionNames: 'false'
69+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
70+
MaxEmptyLinesToKeep: '3'
71+
NamespaceIndentation: None
72+
PenaltyBreakAssignment: '2'
73+
PenaltyBreakBeforeFirstCallParameter: '1'
74+
PenaltyBreakComment: '300'
75+
PenaltyBreakFirstLessLess: '120'
76+
PenaltyBreakString: '1000'
77+
PenaltyBreakTemplateDeclaration: '10'
78+
PenaltyExcessCharacter: '1000000'
79+
PenaltyReturnTypeOnItsOwnLine: '500'
80+
PointerAlignment: Right
81+
RawStringFormats:
82+
- Language: Cpp
83+
Delimiters:
84+
- 'cc'
85+
- 'CC'
86+
- 'cpp'
87+
- 'Cpp'
88+
- 'CPP'
89+
- 'c++'
90+
- 'C++'
91+
CanonicalDelimiter: ''
92+
BasedOnStyle: google
93+
- Language: TextProto
94+
Delimiters:
95+
- 'pb'
96+
- 'PB'
97+
- 'proto'
98+
- 'PROTO'
99+
EnclosingFunctions:
100+
- EqualsProto
101+
- EquivToProto
102+
- PARSE_PARTIAL_TEXT_PROTO
103+
- PARSE_TEST_PROTO
104+
- PARSE_TEXT_PROTO
105+
- ParseTextOrDie
106+
- ParseTextProtoOrDie
107+
CanonicalDelimiter: ''
108+
BasedOnStyle: google
109+
ReflowComments: 'true'
110+
SortIncludes: 'false'
111+
SortUsingDeclarations: 'false'
112+
SpaceAfterCStyleCast: 'false'
113+
SpaceAfterLogicalNot: 'false'
114+
SpaceAfterTemplateKeyword: 'true'
115+
SpaceBeforeAssignmentOperators: 'true'
116+
SpaceBeforeCpp11BracedList: 'false'
117+
SpaceBeforeCtorInitializerColon: 'true'
118+
SpaceBeforeInheritanceColon: 'true'
119+
SpaceBeforeParens: ControlStatements
120+
SpaceBeforeRangeBasedForLoopColon: 'true'
121+
SpaceInEmptyParentheses: 'false'
122+
SpacesBeforeTrailingComments: '1'
123+
SpacesInAngles: 'false'
124+
SpacesInCStyleCastParentheses: 'false'
125+
SpacesInContainerLiterals: 'false'
126+
SpacesInParentheses: 'false'
127+
SpacesInSquareBrackets: 'false'
128+
Standard: Auto
129+
StatementMacros: ['__maybe_unused']
130+
TabWidth: '4'
131+
UseTab: Never
132+
...

.cmake-format.yaml

+223
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
_help_parse: Options affecting listfile parsing
2+
parse:
3+
_help_additional_commands:
4+
- Specify structure for custom cmake functions
5+
additional_commands:
6+
APPEND_TO_LISTS:
7+
kwargs:
8+
LISTS: "*"
9+
VALUES: "*"
10+
target_sources:
11+
flags:
12+
- PUBLIC
13+
- PRIVATE
14+
_help_vartags:
15+
- Specify variable tags.
16+
vartags: []
17+
_help_proptags:
18+
- Specify property tags.
19+
proptags: []
20+
_help_format: Options affecting formatting.
21+
format:
22+
_help_line_width:
23+
- How wide to allow formatted cmake files
24+
line_width: 80
25+
_help_tab_size:
26+
- How many spaces to tab for indent
27+
tab_size: 2
28+
_help_max_subgroups_hwrap:
29+
- If an argument group contains more than this many sub-groups
30+
- (parg or kwarg groups) then force it to a vertical layout.
31+
max_subgroups_hwrap: 6
32+
_help_max_pargs_hwrap:
33+
- If a positional argument group contains more than this many
34+
- arguments, then force it to a vertical layout.
35+
max_pargs_hwrap: 8
36+
_help_max_rows_cmdline:
37+
- If a cmdline positional group consumes more than this many
38+
- lines without nesting, then invalidate the layout (and nest)
39+
max_rows_cmdline: 6
40+
_help_separate_ctrl_name_with_space:
41+
- If true, separate flow control names from their parentheses
42+
- with a space
43+
separate_ctrl_name_with_space: true
44+
_help_separate_fn_name_with_space:
45+
- If true, separate function names from parentheses with a
46+
- space
47+
separate_fn_name_with_space: false
48+
_help_dangle_parens:
49+
- If a statement is wrapped to more than one line, than dangle
50+
- the closing parenthesis on its own line.
51+
dangle_parens: true
52+
_help_dangle_align:
53+
- If the trailing parenthesis must be 'dangled' on its on
54+
- "line, then align it to this reference: `prefix`: the start"
55+
- "of the statement, `prefix-indent`: the start of the"
56+
- "statement, plus one indentation level, `child`: align to"
57+
- the column of the arguments
58+
dangle_align: prefix
59+
_help_min_prefix_chars:
60+
- If the statement spelling length (including space and
61+
- parenthesis) is smaller than this amount, then force reject
62+
- nested layouts.
63+
min_prefix_chars: 4
64+
_help_max_prefix_chars:
65+
- If the statement spelling length (including space and
66+
- parenthesis) is larger than the tab width by more than this
67+
- amount, then force reject un-nested layouts.
68+
max_prefix_chars: 10
69+
_help_max_lines_hwrap:
70+
- If a candidate layout is wrapped horizontally but it exceeds
71+
- this many lines, then reject the layout.
72+
max_lines_hwrap: 10
73+
_help_line_ending:
74+
- What style line endings to use in the output.
75+
line_ending: unix
76+
_help_command_case:
77+
- Format command names consistently as 'lower' or 'upper' case
78+
command_case: upper
79+
_help_keyword_case:
80+
- Format keywords consistently as 'lower' or 'upper' case
81+
keyword_case: upper
82+
_help_always_wrap:
83+
- A list of command names which should always be wrapped
84+
always_wrap: []
85+
_help_enable_sort:
86+
- If true, the argument lists which are known to be sortable
87+
- will be sorted lexicographicall
88+
enable_sort: true
89+
_help_autosort:
90+
- If true, the parsers may infer whether or not an argument
91+
- list is sortable (without annotation).
92+
autosort: false
93+
_help_require_valid_layout:
94+
- By default, if cmake-format cannot successfully fit
95+
- everything into the desired linewidth it will apply the
96+
- last, most agressive attempt that it made. If this flag is
97+
- True, however, cmake-format will print error, exit with non-
98+
- zero status code, and write-out nothing
99+
require_valid_layout: false
100+
_help_layout_passes:
101+
- A dictionary mapping layout nodes to a list of wrap
102+
- decisions. See the documentation for more information.
103+
layout_passes: {}
104+
_help_markup: Options affecting comment reflow and formatting.
105+
markup:
106+
_help_bullet_char:
107+
- What character to use for bulleted lists
108+
bullet_char: "*"
109+
_help_enum_char:
110+
- What character to use as punctuation after numerals in an
111+
- enumerated list
112+
enum_char: .
113+
_help_first_comment_is_literal:
114+
- If comment markup is enabled, don't reflow the first comment
115+
- block in each listfile. Use this to preserve formatting of
116+
- your copyright/license statements.
117+
first_comment_is_literal: false
118+
_help_literal_comment_pattern:
119+
- If comment markup is enabled, don't reflow any comment block
120+
- which matches this (regex) pattern. Default is `None`
121+
- (disabled).
122+
literal_comment_pattern: null
123+
_help_fence_pattern:
124+
- Regular expression to match preformat fences in comments
125+
- default= ``r'^\s*([`~]{3}[`~]*)(.*)$'``
126+
fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
127+
_help_ruler_pattern:
128+
- Regular expression to match rulers in comments default=
129+
- '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``'
130+
ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
131+
_help_explicit_trailing_pattern:
132+
- If a comment line matches starts with this pattern then it
133+
- is explicitly a trailing comment for the preceeding
134+
- argument. Default is '#<'
135+
explicit_trailing_pattern: "#<"
136+
_help_hashruler_min_length:
137+
- If a comment line starts with at least this many consecutive
138+
- hash characters, then don't lstrip() them off. This allows
139+
- for lazy hash rulers where the first hash char is not
140+
- separated by space
141+
hashruler_min_length: 10
142+
_help_canonicalize_hashrulers:
143+
- If true, then insert a space between the first hash char and
144+
- remaining hash chars in a hash ruler, and normalize its
145+
- length to fill the column
146+
canonicalize_hashrulers: true
147+
_help_enable_markup:
148+
- enable comment markup parsing and reflow
149+
enable_markup: false
150+
_help_lint: Options affecting the linter
151+
lint:
152+
_help_disabled_codes:
153+
- a list of lint codes to disable
154+
disabled_codes: []
155+
_help_function_pattern:
156+
- regular expression pattern describing valid function names
157+
function_pattern: "[0-9a-z_]+"
158+
_help_macro_pattern:
159+
- regular expression pattern describing valid macro names
160+
macro_pattern: "[0-9A-Z_]+"
161+
_help_global_var_pattern:
162+
- regular expression pattern describing valid names for
163+
- variables with global (cache) scope
164+
global_var_pattern: "[A-Z][0-9A-Z_]+"
165+
_help_internal_var_pattern:
166+
- regular expression pattern describing valid names for
167+
- variables with global scope (but internal semantic)
168+
internal_var_pattern: _[A-Z][0-9A-Z_]+
169+
_help_local_var_pattern:
170+
- regular expression pattern describing valid names for
171+
- variables with local scope
172+
local_var_pattern: "[a-z][a-z0-9_]+"
173+
_help_private_var_pattern:
174+
- regular expression pattern describing valid names for
175+
- privatedirectory variables
176+
private_var_pattern: _[0-9a-z_]+
177+
_help_public_var_pattern:
178+
- regular expression pattern describing valid names for public
179+
- directory variables
180+
public_var_pattern: "[A-Z][0-9A-Z_]+"
181+
_help_argument_var_pattern:
182+
- regular expression pattern describing valid names for
183+
- function/macro arguments and loop variables.
184+
argument_var_pattern: "[a-z][a-z0-9_]+"
185+
_help_keyword_pattern:
186+
- regular expression pattern describing valid names for
187+
- keywords used in functions or macros
188+
keyword_pattern: "[A-Z][0-9A-Z_]+"
189+
_help_max_conditionals_custom_parser:
190+
- In the heuristic for C0201, how many conditionals to match
191+
- within a loop in before considering the loop a parser.
192+
max_conditionals_custom_parser: 2
193+
_help_min_statement_spacing:
194+
- Require at least this many newlines between statements
195+
min_statement_spacing: 1
196+
_help_max_statement_spacing:
197+
- Require no more than this many newlines between statements
198+
max_statement_spacing: 2
199+
max_returns: 6
200+
max_branches: 12
201+
max_arguments: 5
202+
max_localvars: 15
203+
max_statements: 50
204+
_help_encode: Options affecting file encoding
205+
encode:
206+
_help_emit_byteorder_mark:
207+
- If true, emit the unicode byte-order mark (BOM) at the start
208+
- of the file
209+
emit_byteorder_mark: false
210+
_help_input_encoding:
211+
- Specify the encoding of the input file. Defaults to utf-8
212+
input_encoding: utf-8
213+
_help_output_encoding:
214+
- Specify the encoding of the output file. Defaults to utf-8.
215+
- Note that cmake only claims to support utf-8 so be careful
216+
- when using anything else
217+
output_encoding: utf-8
218+
_help_misc: Miscellaneous configurations options.
219+
misc:
220+
_help_per_command:
221+
- A dictionary containing any per-command configuration
222+
- overrides. Currently only `command_case` is supported.
223+
per_command: {}

.github/workflows/benchmark.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: benchmark
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: [ubuntu-latest]
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Install requirements
13+
run: |
14+
sudo apt-get update -q -y
15+
sudo apt-get install -q -y gcc g++ git nasm libgtest-dev openssl cmake
16+
17+
- name: Configure
18+
run: cmake -B ${{github.workspace}}/build -DMPN_NO_ASM=ON -DBUILD_VENDOR=ON
19+
20+
- name: Build
21+
run: cmake --build ${{github.workspace}}/build
22+
23+
- name: Run Benchmark
24+
working-directory: ${{github.workspace}}/build
25+
run: |
26+
${{github.workspace}}/build/tests/benchmark | tee ${{github.workspace}}/build/benchmark.txt
27+
cat ${{github.workspace}}/docs/README.template.md > ${{github.workspace}}/README.md
28+
echo -e '## Benchmark(libmpi VS openssl)\n' >> ${{github.workspace}}/README.md
29+
awk '/-----BEGIN MARKDOWN TABLE-----/{ f = 1; next } /-----END MARKDOWN TABLE-----/{ f = 0 } f' benchmark.txt >> ${{github.workspace}}/README.md
30+
git add ${{github.workspace}}/README.md
31+
32+
- name: Commit files
33+
run: |
34+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
35+
git config --local user.name "github-actions[bot]"
36+
git commit -m "Update performance data" -a
37+
38+
- name: Push changes
39+
uses: ad-m/github-push-action@master
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)