Skip to content

feat: multithreading - #30

Merged
nihiL7331 merged 31 commits into
mainfrom
feat/multithreading
Aug 5, 2026
Merged

feat: multithreading#30
nihiL7331 merged 31 commits into
mainfrom
feat/multithreading

Conversation

@nihiL7331

Copy link
Copy Markdown
Owner

This pull request completely refactors the codebase, making it multi-threaded oriented with single-thread handled essentially as "multi-threading with one core".

  • restructure ps_node_t to fit in exactly one cache line (64B)
  • add tree build job
  • separate radix scatter struct for lock-free threading
  • move from per-thread arena to global arena architecture
  • fix tests/demo compilation errors
  • fix error handling in OOM branches
  • and many more, to support multithreading

Results:

  • ~THRD_CNTx performance boost at high particle counts,
  • better accuracy results, resulting with better performance (THETA=2.0F => ~5-9% error)

not fully implemented yet, doesn't handle the actual execution - will
come later when passes/radix gets a multithreaded branch
in an attempt to merge the logic of multithreaded with singlethreaded,
it overhauls the whole system. all logic goes through a router, and the
singlethreaded logic is behaving as a multithreaded 1-thread, rather
than its own thing.
- restructure `ps_node_t` to fit in exactly one cache line (64B)
- add tree build job
- separate radix scatter struct for lock-free threading
- move from per-thread arena to global arena architecture
- fix tests/demo compilation errors
- fix error handling in OOM branches
@nihiL7331 nihiL7331 self-assigned this Aug 5, 2026
@nihiL7331
nihiL7331 merged commit 4f185cb into main Aug 5, 2026
4 checks passed
@nihiL7331
nihiL7331 deleted the feat/multithreading branch August 9, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant