Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ddf8ea0
Fix: Safeguard `try` for `std::thread`
ashvardanian Oct 9, 2025
0ec9ae9
Docs: Why no Miri or Loom?
ashvardanian Oct 9, 2025
916e641
Add: Draft Zig binding
ashvardanian Oct 10, 2025
d9455c8
Improve: Thread name formatting
ashvardanian Oct 10, 2025
fb063a7
Fix: Use aligned allocs for `opaque_pool_t`
ashvardanian Oct 11, 2025
0b9ed05
Improve: Handle `void` contexts
ashvardanian Oct 11, 2025
6d6283a
Make: Upgrade Zig to v0.16
ashvardanian Oct 11, 2025
bf998f9
Add: Bench against libXEV and Spice
ashvardanian Oct 11, 2025
ca3d42b
Improve: Static slicing for `std.Thread.Pool`
ashvardanian Oct 11, 2025
e8c6b48
Improve: Test C stable API
ashvardanian Oct 11, 2025
a21ac35
Make: Skip C11 tests on MSVC - lacking atomics
ashvardanian Oct 11, 2025
1e9540f
Make: Apple's `libSystem` contains Blocks runtime
ashvardanian Oct 11, 2025
18b6d63
Improve: Add `worker_yield_t` hook for idle backoff
guillaumeriousat Oct 8, 2025
101a955
Fix: Route `standard_worker_yield` through `micro_yield()`
guillaumeriousat Oct 8, 2025
53e1b5d
Improve: Select worker-yield overloads with `if constexpr`
guillaumeriousat Oct 9, 2025
541842c
Improve: Shared `call_yield_` with & w/out thread
ashvardanian Oct 11, 2025
ac41200
Merge branch 'pr/feat-worker-yield' into main-dev
ashvardanian Oct 11, 2025
86b95aa
Merge branch 'zig' into main-dev
ashvardanian Oct 11, 2025
bbb9e90
Add: NUMA-aware allocator for Zig
ashvardanian Oct 11, 2025
0167211
Make: Backport to Zig 0.15
ashvardanian Oct 11, 2025
a707d55
Fix: Deprecate `spice` comparison
ashvardanian Oct 11, 2025
9982ad9
Improve: `RoundRobinVec` code nesting
ashvardanian Oct 18, 2025
46bb382
Improve: Validate `CacheAligned` padding
ashvardanian Oct 18, 2025
3bf34e9
Fix: Over-aligned `AllocationResult`
ashvardanian Oct 19, 2025
e7932c4
Add: Reductions in Rust
ashvardanian Oct 19, 2025
cb6b257
Add: Stoppable & Exception-handling `try_for`
ashvardanian Oct 19, 2025
0911619
Break: Name spacing/capitalization
ashvardanian Oct 19, 2025
9a08a62
Make: Bump CI
ashvardanian Oct 22, 2025
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
121 changes: 81 additions & 40 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/tinysemver@v2.1.1
uses: ashvardanian/tinysemver@v3
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
CMakeLists.txt:^\s*VERSION (\d+\.\d+\.\d+)
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
README.md:^\s*GIT_TAG v(\d+\.\d+\.\d+)
README.md:^\s*fork_union\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*fork_union\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*forkunion\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*forkunion\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
update-major-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_MAJOR (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_MINOR (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_MINOR (\d+)
update-patch-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_PATCH (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_PATCH (\d+)
dry-run: "true"

test_ubuntu_gcc:
Expand All @@ -62,9 +62,15 @@ jobs:
- name: Test C++
run: |
set -euxo pipefail
build_artifacts/fork_union_test_cpp17
build_artifacts/fork_union_test_cpp20
build_artifacts/fork_union_test_cpp23
build_artifacts/forkunion_test_cpp17
build_artifacts/forkunion_test_cpp20
build_artifacts/forkunion_test_cpp23

- name: Test C
run: |
set -euxo pipefail
build_artifacts/forkunion_test_c11
build_artifacts/forkunion_test_c_gcc_nested

- name: Set up Rust
run: |
Expand All @@ -91,15 +97,21 @@ jobs:
- name: Build C/C++
run: |
sudo apt update
sudo apt install -y cmake build-essential clang
sudo apt install -y cmake build-essential clang libblocksruntime-dev
cmake -B build_artifacts -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_artifacts --config RelWithDebInfo
- name: Test C++
run: |
set -euxo pipefail
build_artifacts/fork_union_test_cpp17
build_artifacts/fork_union_test_cpp20
build_artifacts/fork_union_test_cpp23
build_artifacts/forkunion_test_cpp17
build_artifacts/forkunion_test_cpp20
build_artifacts/forkunion_test_cpp23

- name: Test C
run: |
set -euxo pipefail
build_artifacts/forkunion_test_c11
build_artifacts/forkunion_test_c_clang_blocks

- name: Set up Rust
run: |
Expand Down Expand Up @@ -128,9 +140,14 @@ jobs:
- name: Test C++
run: |
set -euxo pipefail
build_artifacts/fork_union_test_cpp17
build_artifacts/fork_union_test_cpp20
build_artifacts/fork_union_test_cpp23
build_artifacts/forkunion_test_cpp17
build_artifacts/forkunion_test_cpp20
build_artifacts/forkunion_test_cpp23

- name: Test C
run: |
set -euxo pipefail
build_artifacts/forkunion_test_c11

- name: Set up Rust
run: |
Expand Down Expand Up @@ -159,19 +176,23 @@ jobs:
brew update
brew reinstall cmake llvm@${{ matrix.llvm }}

- name: Configure (CMake)
- name: Build C/C++
run: |
cmake -S . -B build_artifacts -D CMAKE_BUILD_TYPE=${{ matrix.config }} -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@${{ matrix.llvm }})/bin/clang++
cmake --build build_artifacts --config ${{ matrix.config }} --parallel

- name: Build
run: cmake --build build_artifacts --config ${{ matrix.config }} --parallel
- name: Test C++
run: |
set -euxo pipefail
build_artifacts/forkunion_test_cpp17
build_artifacts/forkunion_test_cpp20
build_artifacts/forkunion_test_cpp23

- name: Run C++ tests
- name: Test C
run: |
set -euxo pipefail
build_artifacts/fork_union_test_cpp17
build_artifacts/fork_union_test_cpp20
build_artifacts/fork_union_test_cpp23
build_artifacts/forkunion_test_c11
build_artifacts/forkunion_test_c_clang_blocks

test_windows:
name: Windows
Expand All @@ -190,9 +211,13 @@ jobs:
- name: Test C++
run: |
$ErrorActionPreference = "Stop"
.\build_artifacts\fork_union_test_cpp17.exe
.\build_artifacts\fork_union_test_cpp20.exe
.\build_artifacts\fork_union_test_cpp23.exe
.\build_artifacts\forkunion_test_cpp17.exe
.\build_artifacts\forkunion_test_cpp20.exe
.\build_artifacts\forkunion_test_cpp23.exe

- name: Test C
run: |
Write-Host "MSVC still lacks <stdatomic.h>; skipping C test binary"

- name: Set up Rust
run: |
Expand Down Expand Up @@ -226,9 +251,13 @@ jobs:
- name: Test C++
run: |
$ErrorActionPreference = "Stop"
.\build_artifacts\fork_union_test_cpp17.exe
.\build_artifacts\fork_union_test_cpp20.exe
.\build_artifacts\fork_union_test_cpp23.exe
.\build_artifacts\forkunion_test_cpp17.exe
.\build_artifacts\forkunion_test_cpp20.exe
.\build_artifacts\forkunion_test_cpp23.exe

- name: Test C
run: |
Write-Host "MSVC still lacks <stdatomic.h>; skipping C test binary"

test_i386:
name: Cross-compilation (i386)
Expand All @@ -245,12 +274,16 @@ jobs:
- name: Build C++
run: |
cmake -B build_i386 -D CMAKE_C_FLAGS=-m32 -D CMAKE_CXX_FLAGS=-m32 -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_i386 --target fork_union_test_cpp17 fork_union_test_cpp20
cmake --build build_i386 --target forkunion_test_cpp17 forkunion_test_cpp20 forkunion_test_c11

- name: Test C++
run: |
build_i386/fork_union_test_cpp17
build_i386/fork_union_test_cpp20
build_i386/forkunion_test_cpp17
build_i386/forkunion_test_cpp20

- name: Test C
run: |
build_i386/forkunion_test_c11

test_armhf:
name: Cross-compilation (armhf)
Expand All @@ -266,13 +299,17 @@ jobs:

- name: Build C++
run: |
cmake -B build_armhf -D CMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_armhf --target fork_union_test_cpp17 fork_union_test_cpp20
cmake -B build_armhf -D CMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -D CMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_armhf --target forkunion_test_cpp17 forkunion_test_cpp20 forkunion_test_c11

- name: Test C++
run: |
qemu-arm-static -L /usr/arm-linux-gnueabihf build_armhf/fork_union_test_cpp17
qemu-arm-static -L /usr/arm-linux-gnueabihf build_armhf/fork_union_test_cpp20
qemu-arm-static -L /usr/arm-linux-gnueabihf build_armhf/forkunion_test_cpp17
qemu-arm-static -L /usr/arm-linux-gnueabihf build_armhf/forkunion_test_cpp20

- name: Test C
run: |
qemu-arm-static -L /usr/arm-linux-gnueabihf build_armhf/forkunion_test_c11

test_s390x:
name: Cross-compilation (s390x)
Expand All @@ -288,10 +325,14 @@ jobs:

- name: Build C++
run: |
cmake -B build_s390x -D CMAKE_CXX_COMPILER=s390x-linux-gnu-g++ -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_s390x --target fork_union_test_cpp17 fork_union_test_cpp20
cmake -B build_s390x -D CMAKE_C_COMPILER=s390x-linux-gnu-gcc -D CMAKE_CXX_COMPILER=s390x-linux-gnu-g++ -D CMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build_s390x --target forkunion_test_cpp17 forkunion_test_cpp20 forkunion_test_c11

- name: Test C++
run: |
qemu-s390x-static -L /usr/s390x-linux-gnu build_s390x/fork_union_test_cpp17
qemu-s390x-static -L /usr/s390x-linux-gnu build_s390x/fork_union_test_cpp20
qemu-s390x-static -L /usr/s390x-linux-gnu build_s390x/forkunion_test_cpp17
qemu-s390x-static -L /usr/s390x-linux-gnu build_s390x/forkunion_test_cpp20

- name: Test C
run: |
qemu-s390x-static -L /usr/s390x-linux-gnu build_s390x/forkunion_test_c11
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/tinysemver@v2.1.1
uses: ashvardanian/tinysemver@v3
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
CMakeLists.txt:^\s*VERSION (\d+\.\d+\.\d+)
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
README.md:^\s*GIT_TAG v(\d+\.\d+\.\d+)
README.md:^\s*fork_union\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*fork_union\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*forkunion\s*=\s*"(\d+\.\d+\.\d+)"
README.md:^\s*forkunion\s*=\s*\{\s*version\s*=\s*"(\d+\.\d+\.\d+)"
update-major-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_MAJOR (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_MINOR (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_MINOR (\d+)
update-patch-version-in: |
include/fork_union.hpp:^#define FORK_UNION_VERSION_PATCH (\d+)
include/forkunion.hpp:^#define FORKUNION_VERSION_PATCH (\d+)
dry-run: "false"
push: "true"
create-release: "true"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@
# Rust build artifacts
Cargo.lock
target/
.zig-cache/
zig-out/
zig-cache/
12 changes: 6 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "Build: Debug with GDB",
"program": "${workspaceFolder}/build_debug/fork_union_test_cpp20",
"program": "${workspaceFolder}/build_debug/forkunion_test_cpp20",
"cwd": "${workspaceFolder}",
"args": [],
"setupCommands": [
Expand Down Expand Up @@ -40,7 +40,7 @@
"MIMode": "gdb"
},
"windows": {
"program": "${workspaceFolder}\\build_debug\\scripts\\fork_union_test_cpp20.exe",
"program": "${workspaceFolder}\\build_debug\\scripts\\forkunion_test_cpp20.exe",
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGw\\bin\\gdb.exe"
}
Expand All @@ -50,7 +50,7 @@
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "Build: Debug i386 with GDB",
"program": "${workspaceFolder}/build_i386/fork_union_test_cpp20",
"program": "${workspaceFolder}/build_i386/forkunion_test_cpp20",
"cwd": "${workspaceFolder}",
"args": [],
"setupCommands": [
Expand Down Expand Up @@ -86,7 +86,7 @@
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "Build: Debug with LLDB",
"program": "${workspaceFolder}/build_debug/fork_union_test_cpp20",
"program": "${workspaceFolder}/build_debug/forkunion_test_cpp20",
"cwd": "${workspaceFolder}",
"args": [],
"setupCommands": [
Expand Down Expand Up @@ -116,7 +116,7 @@
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "Build: Debug with GDB",
"program": "${workspaceFolder}/build_debug/fork_union_nbody",
"program": "${workspaceFolder}/build_debug/forkunion_nbody",
"cwd": "${workspaceFolder}",
"args": [],
"setupCommands": [
Expand Down Expand Up @@ -146,7 +146,7 @@
},
{
"name": "NBODY_BACKEND",
"value": "fork_union_dynamic"
"value": "forkunion_dynamic"
}
],
"stopAtEntry": false,
Expand Down
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,52 @@
"editor.insertSpaces": true,
"editor.tabSize": 4
},
"[yaml]": {
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"prettier.tabWidth": 2
},
"[yml]": {
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"prettier.tabWidth": 2
},
"cSpell.words": [
"anyopaque",
"anytype",
"ashvardanian",
"callconv",
"cntfrq",
"cntvct",
"codegen",
"colocations",
"combinators",
"comptime",
"Condvar",
"constexpr",
"coprime",
"ctest",
"forkunion",
"fprintf",
"futex",
"gethugepagesizes",
"Hashimoto",
"hugepages",
"HugeTLBfs",
"inclusivity",
"libnuma",
"libxev",
"Miri",
"MSRV",
"MSVC",
"nbody",
"noexcept",
"NUMA",
"OpenMP",
"orelse",
"overaligned",
"prefetcher",
"println",
"pthreads",
Expand All @@ -43,8 +67,10 @@
"STREQUAL",
"SysCall",
"SysFS",
"tinysemver",
"topo",
"TSAN",
"usize",
"Vardanian",
"vecs",
"WFET"
Expand Down
Loading
Loading