/atomic_data

a multibyte general purpose lock-free data structure

Primary LanguageC++

atomic_data: A Multibyte General Purpose Lock-Free Data Structure

This repo contains:

  • A header file for the atomic_data implementation. It also contains API guide.

  • In Samples you'll find atomic_data samples (and a makefile) such as a concurrent linked list with insertion/removal at any point, a std::vector of atomic_data and a atomic_data of std::vector and the one, that was helpful in testing memory barriers on ARM - atomic_data wrapping an array and threads incrementing the minimum value in the array. Most samples also make a run using a bare std::mutex (atomic_data_mutex) for performance comparison.

  • Visual Studio 2015 project with above samples. On newer version in has a lot "not inlined" warnings. I should fix it.

  • Android Studio NDK project to test atomic_data on a smartphone.

You can download the entire repo as a zip archive or clone it.

A diagram depicting the basics of the algorithm behind atomic_data:

diagram

Read more in the blog post.

License

The code in this repository is Public-domain software.

Pubic domain software