|
02aa95c2
|
2019-11-06T11:29:17
|
|
Fix wrong use of uLL suffix
|
|
83b74bac
|
2019-11-14T11:08:33
|
|
Merge pull request #446 from libtom/suffix-renamings2
Alternative 2: Suffix renamings (_n suffix)
|
|
41eca342
|
2019-11-06T00:13:39
|
|
regen
|
|
f6a7bedb
|
2019-10-29T20:52:29
|
|
suffix _u32 -> _n of mp_(expt|log|root) functions, use int for now
|
|
86648a0d
|
2019-11-13T15:55:01
|
|
Merge pull request #456 from libtom/mp-has-comment
s_mp_rand_platform: add comment regarding MP_HAS requiring dead code elim
|
|
c47d5e87
|
2019-11-12T01:11:12
|
|
s_mp_rand_platform: add comment regarding MP_HAS requiring dead code elim
|
|
59d62c9b
|
2019-11-11T21:53:00
|
|
Merge pull request #454 from libtom/better-use-of-isneg
Better use of isneg
|
|
1cc289d2
|
2019-11-09T20:23:03
|
|
better use of mp_isneg() and mp_iszero()
|
|
0bc5c329
|
2019-11-10T15:30:57
|
|
Merge pull request #450 from libtom/sqr-opt
make mp_sqr and mp_div_3 internal and add optimizations
|
|
53becf65
|
2019-11-06T16:50:31
|
|
regen files
|
|
6777baaf
|
2019-11-06T16:59:51
|
|
add macro MP_IS_2EXPT
|
|
2e88b571
|
2019-11-06T16:56:34
|
|
optimize mp_mul_d
|
|
6ec36e0b
|
2019-11-06T16:54:07
|
|
optimize mp_div_d
|
|
4f00e75b
|
2019-11-06T16:51:51
|
|
make mp_div_3 private
|
|
0fa802f2
|
2019-11-06T16:49:59
|
|
make mp_sqr private (optimization of mp_mul)
|
|
4077293f
|
2019-11-07T21:12:56
|
|
Merge pull request #451 from libtom/simplify-mod
simplify mod functions
|
|
61ebe7c0
|
2019-11-07T01:00:13
|
|
simplify mod functions
|
|
cc77fadb
|
2019-11-05T23:11:36
|
|
Merge pull request #444 from minad/lto
add COMPILE_LTO to test link time optimization
|
|
67e18168
|
2019-11-05T23:10:40
|
|
Merge pull request #445 from libtom/fix-def-gen
fix generate_def, rename some internal files
|
|
91d88ce3
|
2019-11-05T20:35:19
|
|
fix generate_def, rename some internal files
|
|
3b98e826
|
2019-11-05T21:01:54
|
|
disable lto test for clang for now
it works on debian but not on the outdated travis ubuntu
|
|
53a689d0
|
2019-11-05T20:29:59
|
|
travis: install llvm-7
|
|
74d828d5
|
2019-11-05T20:25:39
|
|
don't use ranlib, `ar s` is equivalent
|
|
e8e65119
|
2019-11-05T19:18:32
|
|
add COMPILE_LTO to test link time optimization
the library performs best with lto since many small functions
can be inlined across objects.
|
|
c893d217
|
2019-11-05T20:16:01
|
|
Merge pull request #439 from libtom/radix-code-cleanup
mp_radix off-by-one error and other related code-cleanup
|
|
bbb17808
|
2019-10-30T14:19:50
|
|
mp_radix off-by-one error and other related code-cleanup
|
|
7e47ae65
|
2019-11-05T20:09:43
|
|
Merge pull request #443 from libtom/rename-maxfast
rename MP_MAXFAST to MP_MAX_COMBA
|
|
93f8e760
|
2019-11-05T18:04:05
|
|
rename MP_MAXFAST to MP_MAX_COMBA
|
|
b4c42576
|
2019-11-05T19:40:30
|
|
Merge pull request #436 from fperrad/20191029_lint
some linting
|
|
40342807
|
2019-11-01T20:08:41
|
|
explicit operator precedence
|
|
146becbd
|
2019-10-31T19:26:55
|
|
literal suffix
|
|
3035e22f
|
2019-11-05T17:55:04
|
|
Merge pull request #434 from libtom/simplifications
Simplifications
|
|
80176de3
|
2019-11-05T17:53:08
|
|
re-enable checks for memcpy&memset
[skip ci]
|
|
410bf493
|
2019-10-29T20:26:50
|
|
apply a series of simplifications
* this is the final commit of a series of simplifications,
containing only the regenerated files and the explanation in the
commit message
* This is in preparation of the size_t change/a potential representation change to use
full width as in tfm, if a (partial?) merge with tfm is desired.
These changes have their own merits however.
* Remove obfuscating tmpx digit pointers (fewer variables, it is more obvious what is
being manipulated)
* Reduce scope of variables where possible
* Stricter error handling/checking (for example handling in karatsuba
was broken)
* In some cases the result was written even in the case of an error
(e.g. s_mp_is_divisible). This will hide bugs, since the user should
check the return value (enforced by MP_WUR). Furthermore if the user
accesses the non-initialized result, valgrind will complain for
example. Global static analysis like coverity will also detect the issue.
Therefore this improves the status quo.
* Introduce generic, private MP_EXCH macro which can be used to swap values.
* Introduce s_mp_copy_digs/s_mp_zero_digs/s_mp_zero_buf
* Some control flow simplifications, e.g, loops instead of goto
* Renamings of variables/labels for consistency
* Renamings of mul/sqr functions for more consistency, e.g., comba
instead of fast suffix
* I didn't read through some very complex functions.
They are so complex, I am too afraid and lazy to touch them.
Maybe someone resposible wants to simplify them if possible. Hint... Hint...
- mp_prime_strong_lucas_selfridge.c
- s_mp_exptmod.c
- s_mp_exptmod_fast.c
|
|
5c335f84
|
2019-10-30T17:26:27
|
|
rename mul/sqr functions for consistency, comba instead of fast suffix
|
|
3b710fbd
|
2019-11-03T11:00:33
|
|
simplify mp_complement
|
|
bcda8fc6
|
2019-10-29T22:38:49
|
|
simplifications: remove unnecessary optimization
* these double checks are not necessary
* the compiler will move the early return outside of the called
function, basically the functions is partially inlined
* however lto/amalgamation needed for the optimization
|
|
795cd201
|
2019-10-29T21:48:50
|
|
simplifications: add s_mp_zero_(digs|buf) and s_mp_copy_digs
Originally I made those as macros. However we have many
other small functions like mp_clamp, mp_exch which are also not implemented
as macros right now.
If we would use c99, I would implement them as private static inline
functions. And mp_exch would be a public static inline function.
But since we are bound to c89, we simply use normal functions.
To achieve optimal performance one should either use link time
optimization or amalgamation.
|
|
b1f9bff1
|
2019-10-29T20:21:22
|
|
simplifications: invmod
|
|
56144eed
|
2019-10-29T20:08:42
|
|
simplifications: reduce functions
|
|
448f35e2
|
2019-10-29T20:07:29
|
|
simplifications: prime functions
|
|
8ac49351
|
2019-10-29T20:06:20
|
|
simplifications: mul/sqr comba
|
|
7b6c6965
|
2019-10-29T20:05:30
|
|
simplifications: toom and karatsuba
|
|
143e0376
|
2019-10-29T20:02:32
|
|
simplifications: basic arithmetic functions
|
|
e60149de
|
2019-10-29T20:26:25
|
|
simplifications: replace mp_mod_d by macro
|
|
2d3262af
|
2019-11-04T14:06:19
|
|
Merge pull request #442 from libtom/bug-min-prec
MP_MIN_PREC too small, test with MP_PREC=MP_MIN_PREC
|
|
2bbdbd06
|
2019-11-03T16:55:35
|
|
MP_MIN_PREC>=3 is needed for s_mp_div_school
test with MP_PREC=MP_MIN_PREC
|
|
820f4bb0
|
2019-10-29T21:27:01
|
|
Merge pull request #435 from libtom/simple-simplifications
first batch of simplifications
|
|
3cdcec43
|
2019-10-29T18:41:25
|
|
first batch of simplifications
|
|
b9977adf
|
2019-10-29T08:44:51
|
|
use uint8_t instead of unsigned char
|
|
98753c67
|
2019-10-29T17:20:40
|
|
Merge pull request #432 from libtom/no-deprecated-pragma
introduce MP_NO_DEPRECATED_PRAGMA
|
|
af376edc
|
2019-10-29T16:37:56
|
|
no more MP_WUR in timing.c
|
|
8456782c
|
2019-10-29T15:40:47
|
|
don't allow disabling of WUR checks
|
|
57fbf5a8
|
2019-10-29T13:14:31
|
|
also build support/ branches in CI
(cherry picked from commit 783ffb82dd5ddddce3d3bbd88661bcda44162458)
|
|
e95dd24e
|
2019-10-27T21:34:23
|
|
introduce MP_NO_DEPRECATED_PRAGMA
|
|
57ccd9f0
|
2019-10-29T15:38:31
|
|
Merge pull request #431 from libtom/rework-tests
clean-up test.c
|
|
4500d066
|
2019-10-29T14:41:33
|
|
also no MP_WUR in mtest_opponent()
|
|
b250ec44
|
2019-10-29T13:24:34
|
|
clean-up test.c
* no more `MP_WUR` in test.c
* clean-up console output
|
|
8bf82f94
|
2019-10-29T08:44:03
|
|
Merge pull request #425 from libtom/replace-gen-by-cat
replace gen.pl by cat, rename mpi.c to mp_all.c
|
|
d800071e
|
2019-10-28T16:36:40
|
|
ignore&clean tommath_amalgam.c [skip ci]
|
|
a598e61b
|
2019-10-28T15:42:23
|
|
rename to tommath_amalgam.c
|
|
02f4ee11
|
2019-10-28T15:23:34
|
|
compare logs before and after single-object profiling
|
|
04ee1e75
|
2019-10-28T15:07:58
|
|
improve demo/timing a bit
* less verbose output on console
* allow changing name for logs
* pre-heat caches before starting the timing
|
|
8e3a4404
|
2019-10-28T13:41:30
|
|
use pre_gen/mp_all.c for profiled_single
+ clean-up defines
|
|
43804ed7
|
2019-10-28T13:39:08
|
|
remove logs and generated PNG's
this fixes #423
|
|
1ece193a
|
2019-10-27T22:48:53
|
|
replace gen.pl by cat, rename mpi.c to mp_all.c
|
|
da8b9787
|
2019-10-28T15:29:30
|
|
Merge pull request #426 from libtom/rework-read-radix
mp_read_radix and mp_fread should behave the same
|
|
a5d5b101
|
2019-10-27T23:51:38
|
|
mp_read_radix and mp_fread should behave the same
|
|
50abc11a
|
2019-10-27T22:10:25
|
|
Merge pull request #422 from libtom/remove-ltm-rng
remove ltm_rng (deprecated function)
|
|
85699be1
|
2019-10-27T21:58:43
|
|
remove ltm_rng (deprecated function)
|
|
bde40c44
|
2019-10-27T22:06:11
|
|
Merge pull request #421 from libtom/doc-fix
manual: don't mention obsolete MP_DIV_SMALL
|
|
2122b511
|
2019-10-27T19:48:13
|
|
manual: don't mention obsolete MP_DIV_SMALL
|
|
baabf563
|
2019-10-27T21:22:53
|
|
Merge pull request #405 from libtom/add-sub-opt
stdbool/stdint refactoring, various optimizations/simplifications
|
|
e2f8df33
|
2019-10-27T21:19:37
|
|
fix doc [skip ci]
+ ignore bak files generated by latexindent
+ silence latexindent
|
|
7afecabd
|
2019-10-24T17:33:38
|
|
regen files
|
|
f662e1f7
|
2019-10-27T19:02:49
|
|
fix c89 issues
|
|
43769139
|
2019-10-27T18:41:05
|
|
remove inttypes.h includes in c89 mode
|
|
d27dff92
|
2019-10-27T18:39:14
|
|
update manual: replace mp_bool/MP_YES/MP_NO references by bool/true/false
|
|
8ecf7eae
|
2019-10-27T09:19:32
|
|
better comment in tommath_c89.h
|
|
17d59c2c
|
2019-10-27T09:06:05
|
|
replace PRIx64 by MP_PRIx64 for c89 mode
|
|
cf004265
|
2019-10-27T08:54:09
|
|
define mp_isodd in terms of mp_iseven
|
|
17a846f2
|
2019-10-26T19:33:36
|
|
add "make c99" to convert back
|
|
9f01ba14
|
2019-10-26T18:48:41
|
|
add "testme.sh --c89" and "make c89"
* replace int*_t and bool by custom typedefs
* the result is tested in CI
|
|
bf9507a9
|
2019-10-24T22:02:29
|
|
replace mp_bool by stdbool
* This gives the advantage that static analysis **understands** bool,
but complains about using an enum type instead of bool.
* If stdbool.h is not desired, true/false/bool can be replaced using sed
as in the no-stdint-h branch.
* We already include stdint.h and stdbool.h is not more harmful than
this header
|
|
c91c1ba2
|
2019-10-24T21:32:31
|
|
rework mp_add_d and mp_sub_d
|
|
58fb93fd
|
2019-10-24T18:14:18
|
|
cleanup prime rand function
|
|
27e142bc
|
2019-10-24T17:52:03
|
|
remove unnecessary == MP_YES/MP_NO comparisons
|
|
a44e68e6
|
2019-10-24T17:43:31
|
|
remove MP_IS_* macros
|
|
f8b2f5d6
|
2019-10-23T20:07:33
|
|
s_mp_reverse is only used by mp_to_radix
|
|
eb70378b
|
2019-10-23T20:06:33
|
|
mp_iseven/mp_isodd should be inline
|
|
f21ea6ce
|
2019-10-23T20:06:08
|
|
add fast path to mp_add_d and mp_sub_d
|
|
68c15948
|
2019-10-27T16:32:10
|
|
Merge pull request #410 from czurnieden/update_manual
Cleanup and update of manual
|
|
8862ca83
|
2019-10-27T16:29:30
|
|
fix index
added new API functions found by `helper.pl -d`
removed old API functions found via
```sh
awk -F',' '/item/ {print $1}' doc/bn.ind | \
awk '/mp/ {print $2}' | \
sed -e 's/\\//g' | \
xargs -I {} sh -c "grep -q {} tommath.h || echo {}"
```
|
|
9d954dc8
|
2019-10-27T16:19:02
|
|
also check doc when running `helper.pl -a`
|
|
59ee1416
|
2019-10-27T15:48:38
|
|
fix `./helper.pl -d`
|
|
2efbdd54
|
2019-10-25T02:44:42
|
|
more clean-ups and addition of a latexinden.pl configuration file
|
|
3947ffda
|
2019-10-25T00:41:09
|
|
backup
|
|
8b31c193
|
2019-10-24T18:24:28
|
|
Cleanup and update of manual
|
|
19424313
|
2019-10-27T14:51:05
|
|
Merge pull request #402 from fperrad/20191023_lint
some linting
|
|
814d0387
|
2019-10-22T17:54:33
|
|
literal suffix
|