From a8109aae2ba6e046acdd24dc26ea3407b1e919b3 Mon Sep 17 00:00:00 2001 From: Niels M?ller Date: Thu, 28 May 2015 11:42:33 +0200 Subject: Document mpn_divexact_1 and mpn_cnd_swap. --- doc/gmp.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/gmp.texi') diff --git a/doc/gmp.texi b/doc/gmp.texi index eff6bc3a1..9a6a4b941 100644 --- a/doc/gmp.texi +++ b/doc/gmp.texi @@ -5370,6 +5370,14 @@ separate, not partially overlapping. performance.] @end deftypefun +@deftypefun void mpn_divexact_1 (mp_limb_t * @var{rp}, const mp_limb_t * @var{sp}, mp_size_t @var{n}, mp_limb_t @var{d}) +Divide @{@var{sp}, @var{n}@} by @var{d}, expecting it to divide exactly, and +writing the result to @{@var{rp}, @var{n}@}. If @var{d} doesn't divide +exactly, the value written to @{@var{rp}, @var{n}@} is undefined. The areas at +@var{rp} and @var{sp} have to be identical or completely separate, not +partially overlapping. +@end deftypefun + @deftypefn Macro mp_limb_t mpn_divexact_by3 (mp_limb_t *@var{rp}, mp_limb_t *@var{sp}, @w{mp_size_t @var{n}}) @deftypefnx Function mp_limb_t mpn_divexact_by3c (mp_limb_t *@var{rp}, mp_limb_t *@var{sp}, @w{mp_size_t @var{n}}, mp_limb_t @var{carry}) Divide @{@var{sp}, @var{n}@} by 3, expecting it to divide exactly, and writing @@ -5704,6 +5712,13 @@ requirements are guaranteed to be at most @var{n} limbs, and increase monotonously in the operand size. @end deftypefun +@deftypefun void mpn_cnd_swap (mp_limb_t @var{cnd}, volatile mp_limb_t *@var{ap}, volatile mp_limb_t *@var{bp}, mp_size_t @var{n}) +If @var{cnd} is non-zero, swaps the contents of the areas @{@var{ap},@var{n}@} +and @{@var{bp},@var{n}@}. Otherwise, the areas are left unmodified. +Implemented using logical operations on the limbs, with the same memory +accesses independent of the value of @var{cnd}. +@end deftypefun + @deftypefun void mpn_sec_mul (mp_limb_t *@var{rp}, const mp_limb_t *@var{ap}, mp_size_t @var{an}, const mp_limb_t *@var{bp}, mp_size_t @var{bn}, mp_limb_t *@var{tp}) @deftypefunx mp_size_t mpn_sec_mul_itch (mp_size_t @var{an}, mp_size_t @var{bn}) Set @var{R} to @math{A @times{} B}, where @var{A} = @{@var{ap},@var{an}@}, -- cgit v1.2.1