Commit Graph

93 Commits

Author SHA1 Message Date
Jan Nijtmans
6804835181
more spacing around PRIu64, needed for C++ compatibility 2019-11-14 14:18:45 +01:00
Jan Nijtmans
02aa95c2b5
Fix wrong use of uLL suffix 2019-11-14 14:18:45 +01:00
nijtmans
1cc289d215 better use of mp_isneg() and mp_iszero() 2019-11-11 21:52:20 +01:00
Francois Perrad
146becbd9a literal suffix 2019-11-05 18:43:37 +01:00
Daniel Mendler
5c335f8407
rename mul/sqr functions for consistency, comba instead of fast suffix 2019-11-04 15:41:33 +01:00
Daniel Mendler
795cd2013f
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.
2019-11-04 15:41:32 +01:00
Daniel Mendler
bf9507a9d4
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
2019-10-27 18:36:56 +01:00
Daniel Mendler
27e142bc43
remove unnecessary == MP_YES/MP_NO comparisons 2019-10-27 18:36:55 +01:00
Daniel Mendler
c4622f53c8
only include tommath_private.h 2019-10-24 21:44:55 +02:00
Francois Perrad
17afe155f0 needs mp_word 2019-10-24 18:26:34 +02:00
Daniel Mendler
14642642f9
add prefix to cutoff variables 2019-10-23 18:21:57 +02:00
Daniel Mendler
00b263f303
remove private_mp_word 2019-10-23 18:19:16 +02:00
Francois Perrad
7e5b56f2f3 fix printf format 2019-10-20 17:35:27 +02:00
Francois Perrad
463205ecef explicit condition 2019-10-20 17:30:38 +02:00
Francois Perrad
8f7a3939f9 name parameter in prototype 2019-10-20 17:30:35 +02:00
Francois Perrad
e2b95007a6 pprime uses mp_word 2019-10-20 17:30:27 +02:00
Francois Perrad
a1ab90be3c use enum value 2019-10-20 14:34:05 +02:00
Francois Perrad
e33311a1fe use enum type 2019-10-20 14:34:05 +02:00
Steffen Jaeckel
7a68f12873 Execute move.sh - Rename files from bn_* to match the function names.
* git blame <renamed-file> is not affected
* git log --follow <renamed-file> can be used to show log across renames
2019-10-19 16:24:39 +02:00
Francois Perrad
28ea368cc5 add missing include 2019-10-15 18:33:16 +02:00
Steffen Jaeckel
8825ab6064
improve clean make-target 2019-10-15 14:47:43 +02:00
Steffen Jaeckel
6caeaf2912 add registry 2019-10-03 20:12:34 +02:00
Steffen Jaeckel
538a513ec5 use MP_HAS() 2019-10-03 20:12:34 +02:00
Steffen Jaeckel
8bd23b0cd4 add get/set_cutoffs() 2019-10-03 20:12:34 +02:00
Steffen Jaeckel
9a51b12957 exit instead of segfault 2019-10-03 20:12:34 +02:00
Steffen Jaeckel
b7eb89c3c6 re-write median calculation 2019-10-01 09:03:27 +02:00
Steffen Jaeckel
41b6f29165 always run the tune make target 2019-10-01 09:03:27 +02:00
Steffen Jaeckel
eca1a49bd3 add s_strtol() 2019-10-01 09:03:27 +02:00
Steffen Jaeckel
2b1c83bdd4 refactor the 4 equal loops into a run function 2019-10-01 09:03:27 +02:00
Steffen Jaeckel
d0c6a8d5db put parameters into struct 2019-10-01 09:03:27 +02:00
Steffen Jaeckel
1687b15249 allow the user to override {C,L,LD}FLAGS 2019-09-07 17:28:16 +02:00
Steffen Jaeckel
72f9251939 fix last occurrences of mp_toradix() 2019-09-03 11:08:56 +02:00
nijtmans
bbe268ebd2 Fix deprecation messages and unnecessary includes 2019-09-03 10:53:40 +02:00
nijtmans
ea3353b673 Simplify test-cases, by using mp_set_l. Also fix use of types in 2 other files 2019-06-13 15:44:00 +02:00
Steffen Jaeckel
345173a311 make it possible to run etc/tune_it.sh from wherever you want 2019-05-27 15:34:53 +02:00
Daniel Mendler
2a2e2716c2
move jenkins prng to bn_s_mp_rand_jenkins.c 2019-05-12 23:45:36 +02:00
Daniel Mendler
9ddf1e5838
support custom random data source via mp_rand_source
* deprecate MP_PRNG_ENABLE_LTM_RNG
* custom mp_rand_source is used always if set, which should be more aligned with user expectations
* use custom source in tune.c
* don't call random number generator once per digit, which is slow
2019-05-08 11:21:10 +02:00
Steffen Jaeckel
50fe11bfb7 fix help-output of tune program
[skip ci]
2019-05-07 16:34:33 +02:00
Daniel Mendler
e0e8c3d5f0
just use one .gitignore for simplicity 2019-05-07 12:36:11 +02:00
Daniel Mendler
e8ff342904
cleanup make output 2019-05-07 12:36:11 +02:00
Daniel Mendler
4f5334e4c6
etc/tune.c: add missing break 2019-05-07 12:36:11 +02:00
Steffen Jaeckel
a7fcb6f53c update etc/tune_it.sh after merging #231 2019-05-06 23:29:08 +02:00
czurnieden
db76bed220 added autotuning functionality for the Toom-Cook cut-offs 2019-05-06 23:29:08 +02:00
Daniel Mendler
e45f75fddb
deprecate DIGIT_BIT, use MP_DIGIT_BIT 2019-04-25 13:39:50 +02:00
Daniel Mendler
70a30ae7a7
remove footers 2019-04-07 17:26:31 +02:00
Francois Perrad
e519d5ef41 fix format 2018-12-27 09:44:34 +01:00
Steffen Jaeckel
3ed524048f make astyle + some manual adjustments 2018-12-25 15:17:12 +01:00
Karel Miko
d7f124f563 avoid c++ comments 2018-12-02 13:12:30 +01:00
Francois Perrad
802d8294db fix type & cast 2018-02-13 19:04:31 +01:00
Francois Perrad
9960fe3fe8 literal suffix 2018-02-13 19:04:25 +01:00