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 530 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 647 of file modular_int.hpp.

Referenced by _inverse_helper< void, Dummy >::dyn_value().

00647                                           {
00648     typedef typename unsigned_of_helper<C>::type uC;
00649     typedef typename unsigned_int_with_double_size_helper<C>::type D;
00650     return _dynamic_inverse_helper<C,D>::op ((uC) p, r, s, t);
00651   }

static nat dyn_r ( const C p  )  [inline, static]

Definition at line 625 of file modular_int.hpp.

00625                      {
00626     typedef typename unsigned_of_helper<C>::type uC;
00627     static const nat m = V::template maximum_size_helper<C>::value;
00628     C abs_p = abs (p);
00629     nat r = bit_size (abs_p);
00630     return (r == 0) ? m : ( (uC) abs_p == (((uC) 1) << (r-1)) ? r-1 : r );
00631   }

static nat dyn_s ( const C p,
nat  r 
) [inline, static]

Definition at line 634 of file modular_int.hpp.

00634                             {
00635     static const nat m = V::template maximum_size_helper<C>::value;
00636     return m+2 <= 8 * sizeof(C) ? r-2 : r-1;
00637   }

static nat dyn_t ( const C p,
nat  r 
) [inline, static]

Definition at line 640 of file modular_int.hpp.

00640                             {
00641     static const nat n = 8 * sizeof(C);
00642     static const nat m = V::template maximum_size_helper<C>::value;
00643     return (m+2 <= n) ? r+3 : ((m+1 <= n) ? r+1 : r);
00644   }

static void mul_mod ( C dest,
const C s1,
const C s2,
const M &  x,
C carry 
) [inline, static]

Definition at line 921 of file modular_int.hpp.

00921                                                                     {
00922     dest = s1;
00923     mul_mod (dest, s2, x, carry); }

static void mul_mod ( C dest,
const C s1,
const C s2,
const M &  x 
) [inline, static]

Definition at line 916 of file modular_int.hpp.

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

static void mul_mod ( C dest,
const C src,
const M &  x,
C carry 
) [inline, static]

Definition at line 906 of file modular_int.hpp.

00906                                                         {
00907     static const nat m = V::template maximum_size_helper<C>::value;
00908     typedef typename unsigned_of_helper<C>::type uC;
00909     typedef typename unsigned_int_with_double_size_helper<uC>::type uD;
00910     uC tmp = dest, ucarry = carry;
00911     mul_mod_helper<uC,uD,m>::op (tmp, (uC) src, (uC) x.p, ucarry,
00912                                  (uC) x.q, x.r, x.s, x.t);
00913     dest = tmp; carry = ucarry; }

static void mul_mod ( C dest,
const C src,
const M &  x 
) [inline, static]

Definition at line 896 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().

00896                                               {
00897     static const nat m = V::template maximum_size_helper<C>::value;
00898     typedef typename unsigned_of_helper<C>::type uC;
00899     typedef typename unsigned_int_with_double_size_helper<uC>::type uD;
00900     uC tmp = dest;
00901     mul_mod_helper<uC,uD,m>::op (tmp, (uC) src, (uC) x.p,
00902                                  (uC) x.q, x.r, x.s, x.t);
00903     dest = tmp; }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1