Skip to content

Commit 8357ab0

Browse files
authored
Merge pull request #6 from ashvardanian/refactor
Latency Hiding, CPU Ports, and Huge Pages 🐧
2 parents 8160dd5 + 6250d0f commit 8357ab0

14 files changed

+1324
-622
lines changed

.clang-format

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1+
Language: Cpp
12
BasedOnStyle: LLVM
23
IndentWidth: 4
3-
ColumnLimit: 120
4+
TabWidth: 4
5+
NamespaceIndentation: None
6+
ColumnLimit: 120
7+
ReflowComments: true
8+
UseTab: Never
9+
10+
AlignConsecutiveAssignments: false
11+
AlignConsecutiveDeclarations: false
12+
AlignEscapedNewlines: true
13+
AlignOperands: true
14+
AlignTrailingComments: true
15+
16+
AllowAllArgumentsOnNextLine: false
17+
AllowAllConstructorInitializersOnNextLine: true
18+
AllowAllParametersOfDeclarationOnNextLine: true
19+
AllowShortBlocksOnASingleLine: Always
20+
AllowShortIfStatementsOnASingleLine: Always
21+
AllowShortCaseLabelsOnASingleLine: true
22+
AllowShortFunctionsOnASingleLine: true
23+
AllowShortLambdasOnASingleLine: true
24+
AllowShortLoopsOnASingleLine: true
25+
AlwaysBreakTemplateDeclarations: Yes
26+
AlwaysBreakAfterReturnType: None
27+
PenaltyReturnTypeOnItsOwnLine: 200
28+
29+
BreakBeforeBraces: Custom
30+
BraceWrapping:
31+
AfterCaseLabel: false
32+
AfterClass: false
33+
AfterControlStatement: false
34+
AfterEnum: false
35+
AfterExternBlock: false
36+
AfterFunction: false
37+
AfterStruct: false
38+
AfterNamespace: false
39+
AfterUnion: false
40+
BeforeCatch: true
41+
BeforeElse: true
42+
SplitEmptyFunction: false
43+
SplitEmptyRecord: false
44+
SplitEmptyNamespace: false
45+
IndentBraces: false
46+
47+
SortIncludes: true
48+
SortUsingDeclarations: true
49+
50+
SpaceAfterCStyleCast: false
51+
SpaceAfterLogicalNot: false
52+
SpaceAfterTemplateKeyword: true
53+
SpaceBeforeAssignmentOperators: true
54+
SpaceBeforeCpp11BracedList: true
55+
SpaceBeforeCtorInitializerColon: true
56+
SpaceBeforeInheritanceColon: true
57+
SpaceBeforeParens: ControlStatements
58+
SpaceBeforeRangeBasedForLoopColon: true
59+
SpaceInEmptyParentheses: false
60+
SpacesBeforeTrailingComments: 1
61+
SpacesInAngles: false
62+
SpacesInCStyleCastParentheses: false
63+
SpacesInContainerLiterals: false
64+
SpacesInParentheses: false
65+
SpacesInSquareBrackets: false
66+
67+
BinPackArguments: true
68+
BinPackParameters: true
69+
PenaltyBreakBeforeFirstCallParameter: 1

.vscode/launch.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,33 @@
1010
"preLaunchTask": "Build Debug",
1111
"program": "${workspaceFolder}/build_debug/reduce_bench",
1212
"args": [
13-
"--benchmark_filter=cuda"
14-
]
13+
"--benchmark_filter=sse"
14+
],
15+
"setupCommands": [
16+
{ // Display content in STL containers pretty
17+
"description": "Enable pretty-printing for gdb",
18+
"text": "-enable-pretty-printing",
19+
"ignoreFailures": true
20+
}
21+
],
22+
"environment": [
23+
{
24+
"name": "ASAN_OPTIONS",
25+
"value": "detect_leaks=0:atexit=1:strict_init_order=1:strict_string_checks=1"
26+
}
27+
],
28+
"stopAtEntry": false,
29+
"linux": {
30+
"MIMode": "gdb"
31+
},
32+
"osx": {
33+
"MIMode": "lldb"
34+
},
35+
"windows": {
36+
"program": "${workspaceFolder}\\build_debug\\reduce_bench.exe",
37+
"MIMode": "gdb",
38+
"miDebuggerPath": "C:\\MinGw\\bin\\gdb.exe"
39+
}
1540
},
1641
{
1742
"name": "CUDA C++: Launch",

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,25 @@
22
"cSpell.words": [
33
"ashvardanian",
44
"blas",
5+
"blasint",
6+
"cblas",
57
"CCCL",
68
"constexpr",
79
"cublas",
810
"CUDA",
11+
"GTEST",
12+
"HUGEPAGE",
13+
"HUGETLB",
914
"Kahan",
1015
"METALLIB",
16+
"NUMA",
17+
"opencl",
1118
"openmp",
1219
"shfl",
1320
"SPIR",
1421
"STREQUAL",
1522
"threadgroup",
23+
"unseq",
1624
"Vardanian",
1725
"wmma"
1826
],
@@ -21,8 +29,13 @@
2129
"*.ipp": "cpp",
2230
"*.metal": "cpp",
2331
"*.tcc": "cpp",
32+
"__bit_reference": "cpp",
33+
"__config": "cpp",
2434
"__debug": "cpp",
35+
"__hash_table": "cpp",
2536
"__nullptr": "cpp",
37+
"__split_buffer": "cpp",
38+
"__tree": "cpp",
2639
"algorithm": "cpp",
2740
"any": "cpp",
2841
"array": "cpp",
@@ -57,13 +70,16 @@
5770
"deque": "cpp",
5871
"exception": "cpp",
5972
"expected": "cpp",
73+
"filesystem": "cpp",
74+
"format": "cpp",
6075
"forward_list": "cpp",
6176
"fstream": "cpp",
6277
"functional": "cpp",
6378
"future": "cpp",
6479
"hash_map": "cpp",
6580
"hash_set": "cpp",
6681
"initializer_list": "cpp",
82+
"inplace_vector": "cpp",
6783
"iomanip": "cpp",
6884
"iosfwd": "cpp",
6985
"iostream": "cpp",
@@ -100,6 +116,7 @@
100116
"string_view": "cpp",
101117
"strstream": "cpp",
102118
"system_error": "cpp",
119+
"text_encoding": "cpp",
103120
"thread": "cpp",
104121
"tuple": "cpp",
105122
"type_traits": "cpp",

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
{
77
"label": "Build Debug",
88
"type": "shell",
9-
"command": "cmake -B ./build_debug && cmake --build ./build_debug --config Debug"
9+
"command": "cmake -B ./build_debug -DCMAKE_BUILD_TYPE=Debug && cmake --build ./build_debug --config Debug"
1010
},
1111
{
1212
"label": "Build & Run Release",
1313
"type": "shell",
14-
"command": "cmake -B ./build_release && cmake --build ./build_release --config Release && ./build_release/reduce_bench"
14+
"command": "cmake -B ./build_release -DCMAKE_BUILD_TYPE=Release && cmake --build ./build_release --config Release && ./build_release/reduce_bench"
1515
}
1616
]
1717
}

0 commit comments

Comments
 (0)