Questions tagged [libcds]

CDS is a C++ template library of lock-free and fine-grained algorithms. It contains a collection of concurrent data structure implementations.

CDS is a C++ template library of lock-free and fine-grained algorithms. It contains a collection of concurrent data structure implementations.

See online documentation for detailed reference of CDS features.

Licensed under BSD license

10 questions
6
votes
1 answer

LibCds: Michael Hashmap and Split Order List

I am using libcds and they have an implementation of Michael Hash Map and Split order list. Based on the information I gathered from the doc here is how I implemented them: includes: #include #include…
Steven Feldman
  • 833
  • 1
  • 15
  • 28
4
votes
1 answer

Is there any speed test between "std::map with mutexes" vs "libcds maps (Michael Hashmap and Split Order List)" parallel insert, find, erase?

So I really would like to see some speed testing of parallel (something like from 100 to 10000 parallel threads) where each thread does insert, find, delete on at least 3 types of concurrent maps - std::map (with some mutexes) vs libcds (Concurrent…
Rella
  • 65,003
  • 109
  • 363
  • 636
3
votes
1 answer

cds library: michael_deque causes crash when pushing back derived type of custom type (only in release mode)

I'm using VS2012 with default optimization settings (/O2), and this problem exists only in release mode. I have some code that uses a michael_deque (with the standard GC) and a pointer to (abstract) type T. When I try to push back a pointer to a…
TravisG
  • 2,373
  • 2
  • 30
  • 47
2
votes
1 answer

Concurrent set for C++?

I'm looking for a lock-free data structure in C++ to replace the following: pthread_mutex_lock(plock); set.insert(element); pthread_mutex_unlock(plock); The set should support .insert() and .size() with at most O(logN) complexity, has an iterator,…
Fenwick
  • 1,061
  • 2
  • 15
  • 28
1
vote
1 answer

Anthony Williams lock-free queue node removal

I'm implement a lock-free queue that described in "C++ Concurrency in Action" by Anthony Williams. I test it as new container of libcds. Pop and push tests work fine. But multiple producer, multiple consumer test fails sometimes. VLD (or Intel…
1
vote
1 answer

Can we do something atomically with 2 or more lock-free containers without locking both?

I'm looking for Composable operations - it fairly easily to do using transactional memory. (Thanks to Ami Tavory) And it easily to do using locks (mutex/spinlock) - but it can lead to deadlocks - so lock-based algorithms composable only with manual…
Alex
  • 12,578
  • 15
  • 99
  • 195
0
votes
0 answers

What is the fastest card in libCDS, provided that it should be able to expand and erase data?

I want to use an associative container from libCDS in my project. The problem is that there are a lot of them in libCDS. Please advise which card is better to use, provided that it should be able to expand and erase data.
Anton
  • 275
  • 1
  • 9
0
votes
1 answer

How to include libcds in VS2015 project?

I'm working on windows. How to include the CDS library in VS project? I could not find 'include' directory, nor 'lib' directory. http://libcds.sourceforge.net/doc/cds-api/index.html
Jack
  • 131
  • 1
  • 8
0
votes
1 answer

Error fatal - No such file or directory

I have installed the cds library with command ./build.sh -b 64 -z '-std=c++0x' -l '-L /usr/lib/x86_64-linux-gnu' --with-boost /usr/include/boost --amd64-use-128bit at build folder. After I tried to compile the example init.cpp of src folder, I typed…
Crow C
  • 1
  • 3
0
votes
1 answer

Use libcds SplitListMap with std::string

I try to create hash map that will map std::string to std::string, so far I used the following code: template struct lockfree_hash_map_traits_t : public cds::container::split_list::type_traits { typedef…