Commit Graph
100 Commits
Author SHA1 Message Date
Patrick Pelissier cbb881df86 Fix overwrite branch which has a data race on number.
Rewrite it to be simpler & faster and without data race.
2018-03-10 10:13:54 +01:00
Patrick Pelissier 103e5304e8 Use of 2 mutex for buffer:
* one for the enqueue
* one for the dequeue
The number of items in the buffer is the only variable which can be accessed
by both at the same time.
This improve the performance of the communication and reduce the possibility
of priority inversion between the producer and the consummer thread.
2018-03-09 21:07:21 +01:00
Patrick Pelissier e152ff0377 Add TODO 2018-03-09 21:07:07 +01:00
Patrick Pelissier 65f39ab22e Optmize the buffer queue:
don't broadcast the condition variable if we know that
 no thread is waiting for it.
 Improve bench test from 700ms to 450ms
2018-03-09 19:15:47 +01:00
Patrick Pelissier df51c6dc64 Add m_cond_broad_cast 2018-03-09 19:15:31 +01:00
Patrick Pelissier b7c86ee01e Fix detection
of GCC
2018-03-06 21:58:41 +01:00
Patrick Pelissier 992bb6a73a Add bench of hash computation library (XXHASH) 2018-03-04 01:16:37 +01:00
Patrick Pelissier 557dd3e0d5 Fix spelling 2018-03-03 18:32:08 +01:00
Patrick Pelissier c8d5b5440f Add documentation for LIST_DUAL_PUSH_DEF 2018-03-03 18:30:01 +01:00
Patrick Pelissier 0900e72070 Add TODO 2018-02-28 21:44:52 +01:00
Patrick Pelissier dcdc64f974 Update graph 2018-02-28 21:34:47 +01:00
Patrick Pelissier 58898adbcd Add target to Generate depend.png 2018-02-28 21:34:31 +01:00
Patrick Pelissier ff2050466b Fix spelling 2018-02-28 21:17:16 +01:00
Patrick Pelissier dd209c05b9 Use new kind of dictionary for bench 2018-02-28 21:07:53 +01:00
Patrick Pelissier 12a4806b85 Add documentation 2018-02-28 21:07:43 +01:00
Patrick Pelissier 82575962ed Add expansion of the new kind of dictionary 2018-02-28 21:07:29 +01:00
Patrick Pelissier 1db2813aa3 Add dictionary with store computed hash, avoiding the need
of recomputation in some cases.
2018-02-28 21:06:58 +01:00
Patrick Pelissier c71613dcfe Don't display warnings about unused variables in release mode. 2018-02-28 21:05:15 +01:00
Patrick Pelissier 762d8a8e74 Update assertion 2018-02-27 22:43:17 +01:00
Patrick Pelissier b7966f6b61 Update assertions 2018-02-27 22:41:20 +01:00
Patrick Pelissier b1443533e0 Update comment 2018-02-27 22:41:11 +01:00
Patrick Pelissier 6f12ac1d19 Update comments & add new assertions 2018-02-27 22:32:03 +01:00
Patrick Pelissier 0295eea145 Rewrite the prototype of intrusive shared object
to be more clear when there is a shared pointer
and when there is not.
2018-02-26 21:38:33 +01:00
Patrick Pelissier 171402f99f Fix bug 2018-02-25 11:52:21 +01:00
Patrick Pelissier 3d57d35536 Update test 2018-02-25 11:52:14 +01:00
Patrick Pelissier bacf2b9eec Add more test for dual push list 2018-02-25 11:43:31 +01:00
Patrick Pelissier fd885bdb19 Rewrite a little bit singly linked list
to be up-to-date with standards of other containers.
2018-02-25 11:24:44 +01:00
Patrick Pelissier a497c07b0b Update test 2018-02-24 21:41:30 +01:00
Patrick Pelissier ffd5f23406 Update due to new generic type 2018-02-24 21:41:16 +01:00
Patrick Pelissier 97e3cc35c2 Add more tests. 2018-02-24 20:26:32 +01:00
Patrick Pelissier 44d8363292 Fix issue with assertion 2018-02-24 20:26:19 +01:00
Patrick Pelissier e540a95ad0 Fix spelling 2018-02-24 15:28:07 +01:00
Patrick Pelissier db63b0d515 Fix code generation analyzis for list
Add dual push list
2018-02-24 15:21:23 +01:00
Patrick Pelissier 7637c2fb58 Update test 2018-02-24 15:16:11 +01:00
Patrick Pelissier 5b40b43435 Add some tests. 2018-02-24 15:13:34 +01:00
Patrick Pelissier 6ec277ec99 Add dual push singly linked list 2018-02-24 15:07:58 +01:00
Patrick Pelissier 1befa63c9b Remove duplicate code. 2018-02-24 15:04:44 +01:00
Patrick Pelissier 3d3e052f23 Add reference to wikipedia data structure in the documentation 2018-02-24 09:03:47 +01:00
Patrick Pelissier aea816dcaf Fix data race 2018-02-24 07:44:16 +01:00
Patrick Pelissier d258fb3eff Fix memory leak 2018-02-23 23:13:10 +01:00
Patrick Pelissier 1463d83b9f Fix memory leak in test 2018-02-23 23:10:26 +01:00
Patrick Pelissier 10c947d9d4 Support of monocore cpu 2018-02-23 22:21:20 +01:00
Patrick Pelissier 2da51ea6e9 Remove constraint on size > 0
as workers can create a queue of size 0
in mono core system.
2018-02-23 22:12:17 +01:00
Patrick Pelissier d930c0a4ad Fix memory leak in test suite 2018-02-23 22:00:15 +01:00
Patrick Pelissier d0e7cc41bf Add more assertions 2018-02-23 20:40:44 +01:00
Patrick Pelissier 8c610adee5 Update README 2018-02-23 20:39:37 +01:00
Patrick Pelissier a1e791d1e9 Add queue SPSC 2018-02-23 20:38:51 +01:00
Patrick Pelissier 264249fb8b Improve queue MPMC contract checking 2018-02-23 20:13:04 +01:00
Patrick Pelissier e2b00d7c73 Split function definitions into separate macro 2018-02-21 22:16:55 +01:00
Patrick Pelissier ff3964e2eb Factorization of the mympz type 2018-02-21 22:06:45 +01:00
Patrick Pelissier 2ed95bfe16 Fix generic issue for deque
(was totaly broken before).
2018-02-21 22:05:51 +01:00
Patrick Pelissier 958936319f Activate test 2018-02-21 21:51:54 +01:00
Patrick Pelissier 39fca33958 Reuse memory node in case of pop from the opposite side
if there is at least one free node in the opposite side.
This reduce the memory consumption ***a lot*** for FIFO queues
usage.
2018-02-21 21:50:40 +01:00
Patrick Pelissier eb4cbe863e Add some TODO 2018-02-20 23:10:47 +01:00
Patrick Pelissier d146ea6a63 Add new test (disabled) 2018-02-20 22:57:58 +01:00
Patrick Pelissier f4b2ba8322 Fix coverage 2018-02-20 22:12:09 +01:00
Patrick Pelissier acb1aa8104 Add new restriction 2018-02-20 22:12:03 +01:00
Patrick Pelissier 03f7a75e54 Add more check 2018-02-20 22:01:26 +01:00
Patrick Pelissier 2dc71cc5fd Fix bug 2018-02-20 22:01:19 +01:00
Patrick Pelissier 4a92419bbe Add tests 2018-02-20 21:55:16 +01:00
Patrick Pelissier 92699501f6 Add more assertions 2018-02-19 23:41:29 +01:00
Patrick Pelissier b49ed97be0 Update comment 2018-02-19 23:38:22 +01:00
Patrick Pelissier aec661edea Add shared ressource container 2018-02-19 23:37:10 +01:00
Patrick Pelissier 675fa2cf85 Add note to document 2018-02-19 23:36:36 +01:00
Patrick Pelissier b442d72ef7 Add forgotten free + check for memory allocation 2018-02-19 23:14:16 +01:00
Patrick Pelissier 2ff197c670 Add function _size 2018-02-19 23:14:09 +01:00
Patrick Pelissier 5c9a610823 Fix data race issue 2018-02-19 22:49:05 +01:00
Patrick Pelissier 8d871256ed Reformat 2018-02-19 22:48:46 +01:00
Patrick Pelissier 3d59fb0d9a Fix a deadlock due to an ABA like bug. 2018-02-19 19:00:24 +01:00
Patrick Pelissier 057d783158 Add comment 2018-02-18 19:19:41 +01:00
Patrick Pelissier ffb8a2a00a Improve test suite
(Test fails randomly)
2018-02-18 19:18:40 +01:00
Patrick Pelissier b32b93340c Improve tests & fix bugs.
Still one bug remain.
2018-02-18 17:01:41 +01:00
Patrick Pelissier 35a3f7c02a Improve test 2018-02-18 09:55:31 +01:00
Patrick Pelissier 6de4c4092f Add MRMW snapshot 2018-02-18 08:27:10 +01:00
Patrick Pelissier c5de5e07d8 Update comment 2018-02-18 08:00:14 +01:00
Patrick Pelissier 0176071011 Add proper test for MRSW snapshot 2018-02-18 07:58:48 +01:00
Patrick Pelissier 3f2a641cdf Add contract 2018-02-17 20:25:40 +01:00
Patrick Pelissier 20be2d8850 Externalized currentWrite 2018-02-17 20:21:53 +01:00
Patrick Pelissier b37cd7dba7 Rewrite / simplify code 2018-02-17 20:08:00 +01:00
Patrick Pelissier e274a49ffd Fix bug as we can't fail spuriously here. 2018-02-17 19:28:09 +01:00
Patrick Pelissier cba37abfae Reword 2018-02-17 19:24:16 +01:00
Patrick Pelissier be198a7040 Add MRSW snapshots. 2018-02-17 19:19:51 +01:00
Patrick Pelissier 29d181c113 Add macro M_CTYPE_FROM_FIELD like M_TYPE_FROM_FIELD
but for const pointer.
2018-02-17 19:19:09 +01:00
Patrick Pelissier 3d5914f389 Fix issue in test 2018-02-17 18:50:03 +01:00
Patrick Pelissier c78c75d89a Add more test 2018-02-17 18:48:52 +01:00
Patrick Pelissier a4753be5ae Add test for int snapshot MRSW 2018-02-17 18:20:25 +01:00
Patrick Pelissier 3bda360196 Add first step of MRSW snapshot 2018-02-17 17:35:18 +01:00
Patrick Pelissier 2b4de98aee Update comment 2018-02-17 17:35:07 +01:00
Patrick Pelissier bbd887fd2c Update comments 2018-02-17 14:21:54 +01:00
Patrick Pelissier 84a5add410 Recursive clean 2018-02-17 14:03:24 +01:00
Patrick Pelissier c999563ecd Fix spelling 2018-02-17 12:02:54 +01:00
Patrick Pelissier 80c7cdbdd2 Rename snapshot_def as snapshot_srsw_def 2018-02-17 12:00:45 +01:00
Patrick Pelissier 9c7b453732 Update doc 2018-02-17 11:56:04 +01:00
Patrick Pelissier 45982c4b01 Improve test suite 2018-02-17 11:06:28 +01:00
Patrick Pelissier 438704be37 Rewrite & fix int queue generator.
Limitation to 4096 max entries.
A classic queue may be way faster (too much sharing for thread) but will use much more memory...
To bench
2018-02-16 21:22:46 +01:00
Patrick Pelissier 1753ddc4d6 Improve bitset_at version by avoiding a redundant variable shift. 2018-02-16 20:42:42 +01:00
Patrick Pelissier 96178194b3 Update size to long long 2018-02-16 18:00:08 +01:00
Patrick Pelissier 57fb2192be Add libdict 2018-02-16 07:40:20 +01:00
Patrick Pelissier 546a78be33 Fix spelling 2018-02-15 22:48:25 +01:00
Patrick Pelissier 29acb67566 Update example of snapshot to a better one. 2018-02-15 22:43:43 +01:00