Patrick Pelissier
3721129da1
Update prototype of memory functions
...
to always get the memory context parameter
(even if it is not needed) to provide a cleaner
and simpler user interface
(instead of requesting the user to use directly m_context).
2025-05-07 21:02:24 +02:00
Patrick Pelissier
1cf7c4fa4d
Port to new memory model: M_MEMORY_FULL cannot return anymore
2025-05-07 21:02:23 +02:00
Patrick Pelissier
66f376ea80
Port to new memory model
2025-05-07 21:02:23 +02:00
Patrick Pelissier
50e8d1f469
Fix old size parameter for memory allocation
2025-05-07 21:02:23 +02:00
Patrick Pelissier
1e196fe22a
Port to new spec M_MEMORY_FULL
2025-05-07 21:02:23 +02:00
Patrick Pelissier
1f2584ccea
Port to new memory model
2025-05-07 21:02:23 +02:00
Patrick Pelissier
6d621703eb
Copyright go to 2025 year
2025-03-01 11:03:38 +01:00
Patrick Pelissier
26cec1591a
* Remove some obsolete macros
...
* Fix spelling
* A little bit of refactoring
2024-01-19 21:37:47 +01:00
Patrick Pelissier
52b58c5a51
Happy new year 2024
2024-01-19 21:37:47 +01:00
Patrick Pelissier
b50813713a
Define internal M_INLINE:
...
it is used to control the inline semantics.
By combining it with optimize option "-fno-inline"
for the internal M*LIB function (using _Pragma optimize)
we can control easily if we want to use an inline version
or call of an external function.
Define new user API:
* M_USE_EXTERN_DECL : define it before including any MLIB header to requests to call the M*LIB functions and don't inline then.
* M_USE_EXTERN_DEF : define it once in a translation unit to define the M*LIB functions. This translation unit shall contain all templated macro too.
If you use one option, you need to use the other one too for another translation unit.
2023-06-11 23:32:02 +02:00
Patrick Pelissier
7534aa0d61
Add internal M_UNLIKELY_NOMEM to help coverage computation
2023-04-03 00:05:29 +02:00
Patrick Pelissier
a2ae209992
Happy new year
2023-01-02 12:57:41 +01:00
Patrick Pelissier
19b01b404d
Migrate to 2022
2022-03-12 20:25:45 +01:00
Patrick Pelissier
50669a320c
Add m_ prefix for GENINT module,
...
as it is purely internal (no need to prevent user space breakage).
It will put more stuff in the global m_ prefix
2021-12-03 22:08:15 +01:00
Patrick Pelissier
5d4fa31083
Update doc & comments
2021-03-28 11:48:58 +02:00
Patrick Pelissier
517da1b999
Rename generated internal functions
...
to avoid "poluting" userspace naming.
2021-02-13 11:45:05 +01:00
Patrick Pelissier
25fe26deaa
Happy new year
2021-01-13 20:18:01 +01:00
Patrick Pelissier
a29682ca29
Create M_ASSERT macro to encapsulate assert within M*LIB
...
The goal is to enable the user to override this macro if needed so that it can enable or disable the M*LIB witout impacting its own assertions.
2020-10-29 22:46:17 +01:00
Patrick Pelissier
54d4b80368
Reformat macro to 80 characters
2020-10-21 23:23:40 +02:00
Patrick Pelissier
b3a1a75f6f
Rename internal types:
...
a suffix ending with _ct means confidential type
ans is reserved for M*LIB internal usage.
OPLIST doesn't use the external types
but rather the internal types.
It enables to be independent of the real names
of the external types.
Such external names are planned to be fully customizable
(i.e. the user may define a name that suits its coding style)
2020-10-03 14:07:14 +02:00
Patrick Pelissier
56d2a74818
Fix some warnings
2020-07-09 23:38:34 +02:00
Patrick Pelissier
f03a4503eb
Fix some warnings
2020-07-03 22:15:54 +02:00
Patrick Pelissier
f2a06ede62
Add mechanism to disable temporary compiler warnings in a sequence of code.
2020-07-01 11:47:55 +02:00
Patrick Pelissier
9784a16d47
Get ride of modular arithmetic
2020-06-26 00:25:15 +02:00
Patrick Pelissier
652653af0b
Fix some warnings by casting
...
for compilers which cannot detect the affectations as ok.
2020-06-21 23:50:49 +02:00
Patrick Pelissier
7527bfec85
Update comments
2020-06-13 00:17:35 +02:00
Patrick Pelissier
4f7b0b9455
Happy new year 2020
2020-01-04 15:41:06 +01:00
Patrick Pelissier
8b3a4a802c
Happy new year!
2019-01-02 18:12:07 +01:00
Patrick Pelissier
b799725bef
Update comment.
2018-09-19 22:22:48 +02:00
Patrick Pelissier
68c737dcef
Clean up interface if (internal) genint:
...
it returns at most an 2048, so an unsigned int is more enought
(and internally it was already used!).
So transform the interface to take as input unsigned int.
Fix maximum size supported by the genint package.
Add proper constant used for error, and use it in the code.
2018-08-02 23:19:05 +02:00
Patrick Pelissier
3b642ffeb3
Update after internal review.
2018-07-17 21:00:55 +02:00
Patrick Pelissier
96202aa78f
Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers)
2018-07-14 14:35:14 +02:00
Patrick Pelissier
8b2993c979
Add more assertions to help scan-build with false positive.
2018-04-20 19:30:15 +02:00
Patrick Pélissier
d97f46133b
Fix issue for 32 bits systems
...
mpz_core_clz wasn't reproductible for 32 bits system.
2018-04-14 23:08:53 +02: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
3d59fb0d9a
Fix a deadlock due to an ABA like bug.
2018-02-19 19:00:24 +01:00
Patrick Pelissier
bbd887fd2c
Update comments
2018-02-17 14:21:54 +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
96178194b3
Update size to long long
2018-02-16 18:00:08 +01:00
Patrick Pelissier
210e05f7fc
Update copyright to 2018
2018-01-29 20:28:30 +01:00
Patrick Pelissier
2c695526dd
Fix issue with stricter C++ compiler with atomic definition.
...
(It still feels strange to not be able to store 0 in an atomic unsigned long).
2017-12-30 12:17:55 +01:00
Patrick Pelissier
bdd66ff237
Fix issue.
2017-12-07 23:06:26 +01:00
Patrick Pelissier
453b54856e
Move CLZ from genint to core
2017-11-12 09:41:10 +01:00
Patrick Pelissier
5615a1419a
Add a generic code for all targets for CLZ
2017-11-12 09:38:14 +01:00
Patrick Pelissier
446fa7d35f
Add integer generator
2017-11-11 20:30:50 +01:00