moodycamel
Thrust
Our great sponsors
moodycamel | Thrust | |
---|---|---|
11 | 4 | |
8,785 | 4,839 | |
- | - | |
3.9 | 6.9 | |
10 months ago | 2 months ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
moodycamel
-
moodycamel VS lockfree_mpmc_queue - a user suggested alternative
2 projects | 21 Apr 2022
-
Matthias Killat - Lock-free programming for real-time systems - Meeting C++ 2021
Not literatue but an example. This is a lock-free (not wait-free!) multi-producer multi-consumer queue, not a FIFO, but access patterns should be similar - if not the same: https://github.com/cameron314/concurrentqueue
-
Learning Clojure made me return back to C/C++
If I do implement it, the most likely route I'd take is make a compiler in Clojure/clojurescript that uses Instaparse (I have a more-or-less-clojure grammar written that I was tinkering with) and generate C++ code that uses Immer for its data structures and Zug for transducers and what my not-quite-clojure would support would be heavily dependent on what the C++ code and libraries I use can do. I'd use Taskflow to implement a core.async style system (not sure how to implement channels, maybe this but I'm unsure if its a good fit, but I also haven't looked). I would ultimately want to be able to interact with C++ code, so having some way to call C++ classes (even templated ones) would be a must. I'm unsure if I would just copy (and extend as needed) Clojure's host interop functionality or not. I had toyed with the idea that you can define the native types (including templates) as part of the type annotations and then the user-level code basically just looks like a normal function. But I didn't take it very far yet, haven't had the time. The reason I'd take this approach is that I'm writing a good bit of C++ again and I'd love to do that in this not-quite-clojure language, if I did make it. A bunch of languages, like Haxe and Nim compile to C or C++, so I think its a perfectly reasonable approach, and if interop works well enough, then just like Clojure was able to leverage the Java ecosystem, not-quite-clojure could be bootstrapped by leveraging the C++ ecosystem. But its mostly just a vague dream right now.
-
Recommendations for C++ library for shared memory (multiple producers/single consumer)
I would recommend https://github.com/cameron314/concurrentqueue as it's very battle tested and fast.
-
fmtlog: fastest C++ logging library using fmtlib syntax
This was explicitly considered for spdlog (using the moodycamel::ConcurrentQueue) but rejected for the above reason. I'm not involved in the development of spdlog but personally I agree, for me it's important that log output is not all mixed up.
-
Functional programming in C++ (2012)
> So the big win with functional programming is easier testibility and fewer hazards when trying to multi-thread your code.
To give you my experience: during my phd, I developed https://ossia.io in C++. For the manuscript redaction, I rewrote all the core algorithms in pure functional OCaml. When I did some tests, performance was slower than -O0 C++ (so it's not even a given that multithreaded OCaml would outperform single-thread C++), the tests weren't meaningfully simpler to write, and it would be pretty much impossible to have an average comp. sci. student contribute to the code.
My experience multi-threading C++ code is, "slap cpp-taskflow, TBB, RaftLib" or any kind of threaded task system and enjoy arbitrary scaling. Hardly the pain it is made to be unless you have a need to go down to std::thread level, but even then using something like https://github.com/cameron314/concurrentqueue to communicate between threads makes things extremely painless.
Thrust
-
AMD's CDNA 3 Compute Architecture
this is frankly starting to sound a lot like the ridiculous "blue bubbles" discourse.
AMD's products have generally failed to catch traction because their implementations are halfassed and buggy and incomplete (despite promising more features, these are often paper features or career-oriented development from now-departed developers). all of the same "developer B" stuff from openGL really applies to openCL as well.
http://richg42.blogspot.com/2014/05/the-truth-on-opengl-driv...
AMD has left a trail of abandoned code and disappointed developers in their wake. These two repos are the same thing for AMD's ecosystem and NVIDIA's ecosystem, how do you think the support story compares?
https://github.com/HSA-Libraries/Bolt
https://github.com/NVIDIA/thrust
in the last few years they have (once again) dumped everything and started over, ROCm supported essentially no consumer cards and rotated support rapidly even in the CDNA world. It offers no binary compatibility support story, it has to be compiled for specific chips within a generation, not even just "RDNA3" but "Navi 31 specifically". Etc etc. And nobody with consumer cards could access it until like, six months ago, and that still is only on windows, consumer cards are not even supported on linux (!).
https://geohot.github.io/blog/jekyll/update/2023/06/07/a-div...
This is on top of the actual problems that still remain, as geohot found out. Installing ROCm is a several-hour process that will involve debugging the platform just to get it to install, and then you will probably find that the actual code demos segfault when you run them.
AMD's development processes are not really open, and actual development is silo'd inside the company with quarterly code dumps outside. The current code is not guaranteed to run on the actual driver itself, they do not test it even in the supported configurations.
it hasn't got traction because it's a low-quality product and nobody can even access it and run it anyway.
-
Parallel Computations in C++: Where Do I Begin?
For a higher level GPU interface, Thrust provides "standard library"-like functions that run in parallel on the GPU (Nvidia only)
-
What are some cool modern libraries you enjoy using?
For GPGPU, I like thrust. C++-idiomatic way of writing CUDA code, passing between host and device, etc.
-
A vision of a multi-threaded Emacs
Users should work with higher level primitives like tasks, parallel loops, asynchronous functions etc. Think TBB, Thrust, Taskflow, lparallel for CL, etc.
What are some alternatives?
CUB - THIS REPOSITORY HAS MOVED TO github.com/nvidia/cub, WHICH IS AUTOMATICALLY MIRRORED HERE.
ArrayFire - ArrayFire: a general purpose GPU library.
Boost.Compute - A C++ GPU Computing Library for OpenCL
MPMCQueue.h - A bounded multi-producer multi-consumer concurrent queue written in C++11
Taskflow - A General-purpose Parallel and Heterogeneous Task Programming System
readerwriterqueue - A fast single-producer, single-consumer lock-free queue for C++
HPX - The C++ Standard Library for Parallelism and Concurrency
RaftLib - The RaftLib C++ library, streaming/dataflow concurrency via C++ iostream-like operators
libcds - A C++ library of Concurrent Data Structures
moderngpu - Patterns and behaviors for GPU computing