Skip to content

Commit 50e4613

Browse files
authored
Merge branch 'main' into gather-scatter
2 parents daa55f5 + 2d97782 commit 50e4613

File tree

6 files changed

+998
-37
lines changed

6 files changed

+998
-37
lines changed

.vscode/settings.json

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,34 @@
77
"ashvardanian",
88
"asynchrony",
99
"bioinformatics",
10+
"BLAS",
1011
"Boccara",
1112
"bootcamps",
1213
"Byrne",
14+
"Cawley",
15+
"cblas",
1316
"clflush",
17+
"colsb",
1418
"consteval",
1519
"coro",
1620
"cppcoro",
1721
"CTRE",
1822
"CUDA",
23+
"DOTPROD",
1924
"Dusíková",
25+
"Eigen",
2026
"excerise",
2127
"fconcepts",
2228
"Fedor",
2329
"Fugaku",
30+
"Giga",
2431
"Goodput",
32+
"GOPS",
2533
"grandkids",
2634
"Hana",
2735
"Ibireme",
2836
"JeanHeyd",
37+
"jemalloc",
2938
"Kulukundis",
3039
"Lelbach",
3140
"Lemire",
@@ -35,6 +44,7 @@
3544
"Maclaurin",
3645
"matmul",
3746
"Meneide",
47+
"mimalloc",
3848
"MSVC",
3949
"Müller",
4050
"Neoverse",
@@ -44,6 +54,7 @@
4454
"NVCC",
4555
"openmp",
4656
"Ormrod",
57+
"Peta",
4758
"Pikus",
4859
"pmf",
4960
"popcountll",
@@ -60,13 +71,21 @@
6071
"Sutter",
6172
"sysfs",
6273
"taskset",
74+
"Tera",
75+
"TMUL",
6376
"Trettner",
6477
"Unif",
6578
"unifex",
6679
"unsalvageable",
6780
"unscalable",
6881
"Vardanian",
82+
"VNNI",
6983
"Weis",
84+
"XCOMP",
85+
"XFEATURE",
86+
"XTILE",
87+
"XTILECFG",
88+
"XTILEDATA",
7089
"Yaoyuan",
7190
"yyjson",
7291
"Zverovich"
@@ -90,11 +109,13 @@
90109
"__tuple": "cpp",
91110
"__verbose_abort": "cpp",
92111
"algorithm": "cpp",
112+
"any": "cpp",
93113
"array": "cpp",
94114
"atomic": "cpp",
95115
"bit": "cpp",
96116
"bitset": "cpp",
97117
"cctype": "cpp",
118+
"cfenv": "cpp",
98119
"charconv": "cpp",
99120
"chrono": "cpp",
100121
"clocale": "cpp",
@@ -116,6 +137,7 @@
116137
"deque": "cpp",
117138
"exception": "cpp",
118139
"execution": "cpp",
140+
"expected": "cpp",
119141
"format": "cpp",
120142
"forward_list": "cpp",
121143
"fstream": "cpp",
@@ -148,6 +170,7 @@
148170
"shared_mutex": "cpp",
149171
"source_location": "cpp",
150172
"span": "cpp",
173+
"sstream": "cpp",
151174
"stdexcept": "cpp",
152175
"stop_token": "cpp",
153176
"streambuf": "cpp",
@@ -162,10 +185,25 @@
162185
"unordered_map": "cpp",
163186
"unordered_set": "cpp",
164187
"utility": "cpp",
188+
"valarray": "cpp",
165189
"variant": "cpp",
166190
"vector": "cpp",
167-
"sstream": "cpp",
168-
"cfenv": "cpp",
169-
"expected": "cpp"
191+
"core": "cpp",
192+
"superlusupport": "cpp",
193+
"*.evaluator": "cpp",
194+
"*.traits": "cpp",
195+
"adolcforward": "cpp",
196+
"alignedvector3": "cpp",
197+
"autodiff": "cpp",
198+
"bvh": "cpp",
199+
"eulerangles": "cpp",
200+
"fft": "cpp",
201+
"kroneckerproduct": "cpp",
202+
"mprealsupport": "cpp",
203+
"nnls": "cpp",
204+
"numericaldiff": "cpp",
205+
"openglsupport": "cpp",
206+
"specialfunctions": "cpp",
207+
"splines": "cpp"
170208
}
171209
}

CMakeLists.txt

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
55
# Project Setup
66
# ------------------------------------------------------------------------------
77
project(less_slow
8-
VERSION 0.1.0
9-
LANGUAGES C CXX
8+
VERSION 0.2.0
9+
LANGUAGES C CXX ASM
1010
DESCRIPTION "Learning how to write Less Slow code, from numerical micro-kernels and SIMD to coroutines, ranges, and polymorphic state machines"
1111
HOMEPAGE_URL "https://github.com/ashvardanian/less_slow.cpp")
1212

@@ -32,6 +32,13 @@ endif()
3232
# ------------------------------------------------------------------------------
3333
find_package(Threads REQUIRED)
3434
find_package(OpenMP REQUIRED)
35+
find_package(BLAS REQUIRED)
36+
if (BLAS_FOUND)
37+
message(STATUS "BLAS found: ${BLAS_LIBRARIES}")
38+
else ()
39+
message(FATAL_ERROR "BLAS not found")
40+
endif ()
41+
3542

3643
set(FETCHCONTENT_QUIET OFF)
3744
include(FetchContent)
@@ -167,12 +174,29 @@ FetchContent_Declare(
167174
)
168175
FetchContent_MakeAvailable(YaoyuanGuoYYJSON)
169176

177+
# Eigen is one of the few libraries not using GitHub
178+
FetchContent_Declare(
179+
LibEigenEigen
180+
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
181+
GIT_TAG master
182+
)
183+
FetchContent_MakeAvailable(LibEigenEigen)
184+
170185
# ------------------------------------------------------------------------------
171186
# Main Executable
172187
# ------------------------------------------------------------------------------
173188
add_executable(less_slow less_slow.cpp)
174189
set_target_properties(less_slow PROPERTIES POSITION_INDEPENDENT_CODE ON)
175190

191+
# Conditionally add the assembly file(s)
192+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
193+
set_source_files_properties(less_slow_amd64.S PROPERTIES LANGUAGE ASM)
194+
target_sources(less_slow PRIVATE less_slow_amd64.S)
195+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
196+
set_source_files_properties(less_slow_aarch64.S PROPERTIES LANGUAGE ASM)
197+
target_sources(less_slow PRIVATE less_slow_aarch64.S)
198+
endif()
199+
176200
# ------------------------------------------------------------------------------
177201
# Compiler Flags / Options
178202
# ------------------------------------------------------------------------------
@@ -226,6 +250,8 @@ target_link_libraries(less_slow
226250
# https://github.com/abseil/abseil-cpp/blob/master/CMake/README.md#available-abseil-cmake-public-targets
227251
absl::flat_hash_map
228252
nlohmann_json::nlohmann_json
253+
Eigen3::Eigen
254+
${BLAS_LIBRARIES}
229255
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},Linux>:TBB::tbb>
230256
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},Linux>:OpenMP::OpenMP_CXX>
231257
)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.2.0

0 commit comments

Comments
 (0)