aboutsummaryrefslogtreecommitdiffstats
path: root/src/internals.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix warningsMattias Andrée2016-04-281-2/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Error-check implies unlikely branchingMattias Andrée2016-04-271-2/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add option UNSAFE which disables all internal error checksMattias Andrée2016-04-271-1/+7
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add error checking to tomsfastmath translation and sort includesMattias Andrée2016-04-271-2/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix possible memory in zstr on failureMattias Andrée2016-04-271-0/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add, and use, libzahl_memfailure for conciseness, also fix possible unset errnoMattias Andrée2016-04-261-3/+9
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zzero1 did not guarantee that all arguments were evaulated exactly once, thus made static inlineMattias Andrée2016-04-261-1/+6
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Ensure that failure does not result in memory leakMattias Andrée2016-04-261-1/+64
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix warnings (that were not turned on by default)Mattias Andrée2016-04-081-0/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Split out zahl-inlines.h zahl-internals.h from zahl.h to hide uninteresting stuffMattias Andrée2016-04-071-19/+13
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Rename zsplit_unsigned_fast_small_tainted to zsplit_unsigned_fast_small_autoMattias Andrée2016-03-251-1/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsqr, zmul, zstr, zdivmod, zpow, and zpowuMattias Andrée2016-03-161-6/+11
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Fix bug in libzahl_msb_nz_* and optimise and simplify libzahl_reallocMattias Andrée2016-03-151-4/+4
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Remove unnecessary trimMattias Andrée2016-03-151-1/+0
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsqr, and optimise zmul a littleMattias Andrée2016-03-151-0/+39
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zsetup, zgcd, zmul, and zsqr and add -fltoMattias Andrée2016-03-151-24/+71
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Mostly optimisationsMattias Andrée2016-03-141-2/+49
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Multiple changes:Mattias Andrée2016-03-131-4/+52
| | | | | | | | | | | | | | | | 1) Compile test with -O0, it takes too long otherwise. 2) Add error codes: ZERROR_0_POW_0, ZERROR_0_DIV_0, ZERROR_DIV_0, ZERROR_NEGATIVE. 3) Add workaround for a bug in clang (src/allocator.c). 4) Cleanups. 5) Minor optimisations. 6) Add inclusion guard for zahl.h. Signed-off-by: Mattias Andrée <maandree@kth.se>
* OptimisationsMattias Andrée2016-03-131-6/+23
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* 64 bits (severely) outshines 16 bits and 8 bits in performance: do some cleanupMattias Andrée2016-03-121-1/+0
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* 64-bit chars out-perform 32-bit chars on almost all operations, and on all expensive operationsMattias Andrée2016-03-121-3/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add memory pool, also let the user know that libzahl is not designed for cryptographyMattias Andrée2016-03-051-12/+5
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Improve zsub, only copy to temp when necessaryMattias Andrée2016-03-051-0/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Clean up, add zerror and zperror, fix bugs and add more testsMattias Andrée2016-03-041-3/+7
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Clean up, fix a few bugs, and add a testMattias Andrée2016-03-041-1/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add makefile and fix errorsMattias Andrée2016-03-041-2/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zptestMattias Andrée2016-03-031-2/+9
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zrandMattias Andrée2016-03-031-1/+2
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Cleanup and fix bug in ztruncMattias Andrée2016-03-031-2/+22
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimised zdivmodMattias Andrée2016-03-031-0/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Optimise zdivmodMattias Andrée2016-03-031-2/+1
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zdivmodMattias Andrée2016-03-031-1/+5
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zabs, zadd, zdiv, zmod, zmodmul, zmodpow, zneg, zpow, zsub, and the newly introduced zmodsqrMattias Andrée2016-03-031-1/+9
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zgcdMattias Andrée2016-03-021-1/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zsets and zstrMattias Andrée2016-03-021-1/+9
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* zstr_length_positive is safe for non-positive, hence rename to zstr_length; and add zstr_lengthMattias Andrée2016-03-021-1/+4
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add typedef zahl_char_t for internal useMattias Andrée2016-03-011-2/+4
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zcmp, zcmpi, zcmpu, zcmpmag, zset, zseti, and zsetuMattias Andrée2016-03-011-12/+3
| | | | Signed-off-by: Mattias Andrée <maandree@kth.se>
* Add zsetup, zunsetup, zinit, zfree, zswap, zsave, zload, zbits, and zlsbMattias Andrée2016-03-011-0/+30
Signed-off-by: Mattias Andrée <maandree@kth.se>