Commit Graph
100 Commits
Author SHA1 Message Date
Patrick Pelissier ee2c7caac2 Update _splice_at with new specification.
Fix issue of _splice_at (iterator not properly set).
Export _split_at methods in oplist.
2018-05-28 23:44:15 +02:00
Patrick Pelissier c915a6912e Update specification of _splice_at.
It is more interressing to have the iterator of the target list
to advance too. It allows copying items from list to list in the same order.
2018-05-28 23:43:05 +02:00
Patrick Pelissier d5cd232441 Add method SPLICE_AT as a generic method. 2018-05-28 23:42:46 +02:00
Patrick Pelissier c4c14b0fc6 Add _splice_at 2018-05-28 22:08:55 +02:00
Patrick Pelissier e5f5563249 Add method _splice_at for dual_push_list 2018-05-28 21:58:45 +02:00
Patrick Pelissier 2a6893efb4 Add method _splice_at for singly list. 2018-05-28 21:22:14 +02:00
Patrick Pelissier 9fd920945a Remove condition that the list shall be different for splice_back.
No need.
2018-05-28 20:59:27 +02:00
Patrick Pelissier a116daa7a1 Splice_back may work if old & new are the same list. 2018-05-28 20:58:51 +02:00
Patrick Pelissier 0b8759380b Fix name of called method to avoid infinite recursion... 2018-05-27 11:17:11 +02:00
Patrick Pelissier 00c5e3544f Export _splice_back methods.
Add _push_move & _pop_move methods for dual push list.
2018-05-27 11:16:16 +02:00
Patrick Pelissier 53a79e3170 Export splice_back method for list 2018-05-27 11:06:35 +02:00
Patrick Pelissier 5810bf9acd Add method SPLICE_BACK. 2018-05-27 11:05:00 +02:00
Patrick Pelissier 7815feddba Proper expand algorithms for intrusive list. 2018-05-24 22:58:16 +02:00
Patrick Pelissier f529a5eea8 Use of a trick to make the function compatible with other
definition of the _it method (use of const for the container).
2018-05-24 22:57:27 +02:00
Patrick Pelissier 40e9550b29 Generate algo for intrusive list. 2018-05-23 21:10:58 +02:00
Patrick Pelissier 64d0202f95 ALGO macros accept now a type instead of an oplist
if a global oplist has been registered for the type.

Add macro ALGO_LET_INIT_VA which declares, initializes, sets and clears
a container.
2018-05-22 20:39:51 +02:00
Patrick Pelissier da9483aa3a Add reference to C standard about CONST_CAST. 2018-05-22 19:38:38 +02:00
Patrick Pelissier 0221e555fe Fix bug in deque: _clean doesn't call CLEAR on all created objects. 2018-05-22 05:46:37 +02:00
Patrick Pelissier 494ee2c099 Add proper check of allocation for testing object. 2018-05-22 05:46:04 +02:00
Patrick Pelissier dc92ad9c02 Fix compatbility issue with C++ which doesn't support
compound literal...
2018-05-21 23:00:48 +02:00
Patrick Pelissier 8a4a019973 Fix build issue with C++ 2018-05-21 07:23:19 +02:00
Patrick Pelissier a1a49ebf4b Update comment 2018-05-20 22:38:00 +02:00
Patrick Pelissier 45263a6261 Fix parenthesis 2018-05-20 18:07:58 +02:00
Patrick Pelissier 7ccede36b1 Test with deque too. 2018-05-19 12:52:40 +02:00
Patrick Pelissier 482e1631fa Remove warning in case of some kind of type
(Famous problem of C not allowing to cast
a T (*)[N] into a const T (*)[N].
2018-05-19 12:51:31 +02:00
Patrick Pelissier d0fe7f3e25 Add method _push_move & _pop_move.
Add assertion on _pop_back to check that the container is not empty.
2018-05-19 11:21:57 +02:00
Patrick Pelissier 86083e3a92 Add methods push_move & pop_move.
Rewrite _pop_back to be a little bit faster for complex structure as it used
DO_MOVE instead of plain _set.
2018-05-19 11:21:18 +02:00
Patrick Pelissier 281f567d97 Add proper usage of const. 2018-05-19 11:10:09 +02:00
Patrick Pelissier 7f887720cc Add methods PUSH_MOVE & POP_MOVE. 2018-05-19 11:09:36 +02:00
Patrick Pelissier 717268add9 Simplify the macro usage. 2018-05-19 11:09:20 +02:00
Patrick Pelissier 2f7e3b1596 Update documentation. 2018-05-19 11:08:54 +02:00
Patrick Pelissier 1a3cd2f626 Add experimental support for cmp function with user define order. 2018-05-16 22:36:26 +02:00
Patrick Pelissier 2fbea43a5c Add M_MAP3 macro. 2018-05-16 20:00:41 +02:00
Patrick Pelissier 70788e932e Update doc 2018-05-16 19:47:06 +02:00
Patrick Pelissier 949d12052e Update 2018-05-16 07:52:37 +02:00
Patrick Pelissier 2af35673bb Update comments about TODO. 2018-05-15 21:02:34 +02:00
Patrick Pelissier 4a64ca58ac Update tested systems. 2018-05-15 20:41:15 +02:00
Patrick Pelissier 815c594fa6 Add new libraries 2018-05-15 20:41:06 +02:00
Patrick Pelissier fc4dba4569 Add DSC versions of the _sort function to reverve the sort (DSC=descending). 2018-05-14 23:08:46 +02:00
Patrick Pelissier 1d8df98339 Rename undocumented methods _union & _intersect to _sort_union & _sort_intersect
as they depend on the sort order.
2018-05-14 22:58:52 +02:00
Patrick Pelissier 745aabcfd5 Factorisation of all calls to GET_CMP within the sort functions
to a single function.
2018-05-14 22:55:17 +02:00
Patrick Pelissier be100790f1 Uniformize the comparaisons to always be in the same order. 2018-05-14 22:51:07 +02:00
Patrick Pelissier afc5e82906 Externalize _sort generation from the main macro. 2018-05-14 22:49:11 +02:00
Patrick Pelissier 2951d4b7fa Document new methods. 2018-05-14 22:30:08 +02:00
Patrick Pelissier dcd300211f Add methods _cmp_field for tuples. 2018-05-14 22:29:58 +02:00
Patrick Pelissier f796d27bb4 Update 2018-05-13 09:55:08 +02:00
Patrick Pelissier 47a2553356 Add new test on B*TREE as set. 2018-05-11 22:41:56 +02:00
Patrick Pelissier 67bf199254 Fix comparison of object.
memcmp compares object as little endian, which is not what we want.
2018-05-11 22:41:22 +02:00
Patrick Pelissier 4b1ed25ef3 Rewrite inner loop. should be a little bit faster. 2018-05-11 22:41:00 +02:00
Patrick Pelissier a5ac43e5f3 Fix issue with oplist of set. 2018-05-11 17:57:33 +02:00
Patrick Pelissier 0557527bfe Update format of serialisation for B+TREE:
as the tree is ordered, a '[]' has to be used.
2018-05-11 17:32:32 +02:00
Patrick Pelissier dc1445e0d6 Remove TODO comment. 2018-05-10 23:12:38 +02:00
Patrick Pelissier 431401bc96 Improve example. 2018-05-10 01:59:05 +02:00
Patrick Pelissier fded6c404a Add new libraries. 2018-05-10 01:34:20 +02:00
Patrick Pelissier 680a850618 Add test of _in_str, _out_str, _get_str and _parse_str 2018-05-09 21:48:42 +02:00
Patrick Pelissier 7d08a7ba1a Fix issue in _parse_str 2018-05-09 21:48:32 +02:00
Patrick Pelissier e9f603fa30 Rename internal calls to my_mpz* to testobj* 2018-05-08 10:40:29 +02:00
Patrick Pelissier 1a064e033b Rename mympz.h --> test-obj.h
as it is used only for testing purpose.
2018-05-08 10:29:51 +02:00
Patrick Pelissier ebcfcf9bfa Add I/O test for B+TREE 2018-05-07 23:08:47 +02:00
Patrick Pelissier cf063b75ff Update oplist to reflect all methods. 2018-05-07 23:08:12 +02:00
Patrick Pelissier 951a9d7989 Fix issue in parse. 2018-05-07 23:08:01 +02:00
Patrick Pelissier 37191a53c3 Fix unclear variable. 2018-05-04 00:14:52 +02:00
Patrick Pelissier 42d420db6a Add generation for string. 2018-05-03 22:12:32 +02:00
Patrick Pelissier 122cf63a3f Preshift the state by 8, to avoid a shift within the decoder.
Rewrite the size_u to avoid a branch.
2018-05-03 22:11:43 +02:00
Patrick Pelissier fafce60f9e Add method _parse_str
NOTE: _in_str, _out_str, _get_str & _parse_str remain to be tested.
2018-05-03 18:06:11 +02:00
Patrick Pelissier e855f27c8c Add method _parse_str for RBTREE.
NOTE: A refactorisation seems needed as all the in_str / parse_str
share a lot of the same algorithms. Maybe move them into algo?
2018-05-03 17:59:34 +02:00
Patrick Pelissier f01a593ff7 Update 2018-05-03 17:59:21 +02:00
Patrick Pelissier 6af34b1c16 Update doc to add _parse_str method 2018-05-03 17:51:36 +02:00
Patrick Pelissier 188b329eae Add method _parse_str for dict. 2018-05-03 17:43:40 +02:00
Patrick Pelissier 7b0f71cc99 Add method _parse_str for deque
(missing tests for in, out, get_str & parse_str).
2018-05-03 17:34:17 +02:00
Patrick Pelissier 73f8baf464 Add method _parse_str for array. 2018-05-03 17:29:10 +02:00
Patrick Pelissier 3a09efde91 Skip spaces in serialisation. 2018-05-03 17:22:50 +02:00
Patrick Pelissier 4efa8c1ef9 Add function _parse_str for list. 2018-05-03 17:14:10 +02:00
Patrick Pelissier 9f178208f2 Fix bug in new function. 2018-05-03 17:13:47 +02:00
Patrick Pelissier 0f2113ee12 Fix 2018-05-03 17:03:09 +02:00
Patrick Pelissier 139e003b0b Add method _parse_str for variant. 2018-05-03 17:01:03 +02:00
Patrick Pelissier 1bf80cf315 Add function _parse_str 2018-05-03 13:37:19 +02:00
Patrick Pelissier bcf182f515 Add _parse_str method 2018-05-03 13:30:39 +02:00
Patrick Pelissier c34fb94e77 Proper export of the method PARSE_STR 2018-05-03 13:19:36 +02:00
Patrick Pelissier 64080fadd3 Update comments. 2018-05-03 13:07:52 +02:00
Patrick Pelissier 1009cd6ed4 Export _parse_str function. 2018-05-03 13:05:45 +02:00
Patrick Pelissier 839c1af124 Export _parse_str function. 2018-05-03 13:04:04 +02:00
Patrick Pelissier 6b24842704 Add _parse_str interface.
Rewrite _set_str to use the _parse_str
2018-05-03 12:59:58 +02:00
Patrick Pelissier 2ad8ae3451 Rewrite parse_str interface to be more like strol 2018-05-03 12:59:10 +02:00
Patrick Pelissier b1597f6f61 Rewrite comments. 2018-05-02 23:57:24 +02:00
Patrick Pelissier 47a49263ae Add function _parse_str for string. 2018-05-02 19:36:51 +02:00
Patrick Pelissier 9fed336c9e Add proper const to prototype. 2018-05-01 12:44:43 +02:00
Patrick Pelissier ac5b689950 Add method _set2 for tuple. 2018-04-30 20:00:26 +02:00
Patrick Pelissier 3d43bb260a Update 2018-04-30 13:32:24 +02:00
Patrick Pelissier 2eaeb26d4c Make Serialization input of array / dict more flexible
by supporting space characters within the input.
2018-04-30 11:02:42 +02:00
Patrick Pelissier 34d0f8ec81 Add missing function for variant:
variant_init_element
variant_init_set_element
2018-04-30 10:24:37 +02:00
Patrick Pelissier ddc1c7e98f Update to display checksum correctly. 2018-04-30 08:24:31 +02:00
Patrick Pelissier e41475f672 Rewrite 2018-04-29 11:52:19 +02:00
Patrick Pelissier e954622925 Rewrite 2018-04-29 11:48:02 +02:00
Patrick Pelissier fae899e52e Add benchmark udb2. 2018-04-29 10:45:03 +02:00
Patrick Pelissier 7b11f5afbc Add benchmark UDB 2018-04-28 19:44:52 +02:00
Patrick Pelissier 40c0bf79b1 Update 2018-04-28 19:09:30 +02:00
Patrick Pelissier df2df593b6 Replace complex convertion from int to string into a simple call to to_string 2018-04-27 21:54:57 +02:00
Patrick Pelissier 1dc59d610d Use of new function m_thread_yield 2018-04-27 21:54:34 +02:00
Patrick Pelissier 8fc8decd09 Add m_thread_yield & m_thread_sleep.
Rewrite the windows package (it wasn't fully working before) and use functions
available since WINDOWS VISTA (increasing minimum supported version).
2018-04-27 20:12:44 +02:00