numerix_doc 0.4
modulus_mul_int_preinverse< V > Struct Template Reference

#include <modular_int.hpp>

List of all members.

Classes

Static Public Member Functions


Detailed Description

template<typename V>
struct mmx::modulus_mul_int_preinverse< V >

Definition at line 526 of file modular_int.hpp.


Member Function Documentation

static C dyn_q ( const C p,
nat  r,
nat  s,
nat  t 
) [inline, static]

Definition at line 643 of file modular_int.hpp.

Referenced by modulus_mul_int_preinverse< V >::auxiliaries_helper< C, p >::_inverse_helper< void, Dummy >::dyn_value().

                                          {
    typedef typename unsigned_of_helper<C>::type uC;
    typedef typename unsigned_int_with_double_size_helper<C>::type D;
    return _dynamic_inverse_helper<C,D>::op ((uC) p, r, s, t);
  }
static nat dyn_r ( const C p) [inline, static]

Definition at line 621 of file modular_int.hpp.

                     {
    typedef typename unsigned_of_helper<C>::type uC;
    static const nat m = V::template maximum_size_helper<C>::value;
    C abs_p = abs (p);
    nat r = bit_size (abs_p);
    return (r == 0) ? m : ( (uC) abs_p == (((uC) 1) << (r-1)) ? r-1 : r );
  }
static nat dyn_s ( const C p,
nat  r 
) [inline, static]

Definition at line 630 of file modular_int.hpp.

                            {
    static const nat m = V::template maximum_size_helper<C>::value;
    return m+2 <= 8 * sizeof(C) ? r-2 : r-1;
  }
static nat dyn_t ( const C p,
nat  r 
) [inline, static]

Definition at line 636 of file modular_int.hpp.

                            {
    static const nat n = 8 * sizeof(C);
    static const nat m = V::template maximum_size_helper<C>::value;
    return (m+2 <= n) ? r+3 : ((m+1 <= n) ? r+1 : r);
  }
static void mul_mod ( C dest,
const C src,
const M &  x 
) [inline, static]

Definition at line 892 of file modular_int.hpp.

Referenced by modulus_mul_int_preinverse< modulus_add_int_naive< modulus_reduction_int_naive< modulus_normalization_int_naive< modulus_maximum_size_int< m > > > > >::mul_mod().

                                              {
    static const nat m = V::template maximum_size_helper<C>::value;
    typedef typename unsigned_of_helper<C>::type uC;
    typedef typename unsigned_int_with_double_size_helper<uC>::type uD;
    uC tmp = dest;
    mul_mod_helper<uC,uD,m>::op (tmp, (uC) src, (uC) x.p,
                                 (uC) x.q, x.r, x.s, x.t);
    dest = tmp; }
static void mul_mod ( C dest,
const C s1,
const C s2,
const M &  x,
C carry 
) [inline, static]

Definition at line 917 of file modular_int.hpp.

                                                                    {
    dest = s1;
    mul_mod (dest, s2, x, carry); }
static void mul_mod ( C dest,
const C src,
const M &  x,
C carry 
) [inline, static]

Definition at line 902 of file modular_int.hpp.

                                                        {
    static const nat m = V::template maximum_size_helper<C>::value;
    typedef typename unsigned_of_helper<C>::type uC;
    typedef typename unsigned_int_with_double_size_helper<uC>::type uD;
    uC tmp = dest, ucarry = carry;
    mul_mod_helper<uC,uD,m>::op (tmp, (uC) src, (uC) x.p, ucarry,
                                 (uC) x.q, x.r, x.s, x.t);
    dest = tmp; carry = ucarry; }
static void mul_mod ( C dest,
const C s1,
const C s2,
const M &  x 
) [inline, static]

Definition at line 912 of file modular_int.hpp.

                                                          {
    dest = s1;
    mul_mod (dest, s2, x); }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines