numerix_doc 0.4
/Users/mourrain/Devel/mmx/numerix/include/numerix/modular_int.hpp File Reference
#include <basix/operators.hpp>
#include <basix/int.hpp>
#include <numerix/integer.hpp>
#include <numerix/modular.hpp>

Go to the source code of this file.

Classes

Namespaces

Defines

Functions


Define Documentation

#define DECLARE_HELPER (   I)
Value:
STYPE_TO_TYPE(TMPLVW,lift_type,Modular(I),integer);     \
TMPLVW inline integer \
lift (const Modular(I)& x) { return integer (*x); } \
TMPLVW \
struct project_helper<Modular(I)> { \
  template<typename C> static inline Modular(I) \
  op (const C& x) { return Modular(I) (x); } \
  static inline Modular(I) \
  op (const integer& x) { \
    integer p= *Modular(I)::get_modulus (); \
    return (x >= 0) ? Modular(I) (as<I> (rem (x, p))) \
      : - Modular(I) (as<I> (rem (-x, p))); } \
};

Definition at line 1066 of file modular_int.hpp.

#define Modular (   I)    modular<modulus<I,V>,W>

Definition at line 1065 of file modular_int.hpp.

#define TMPL   template<typename C>

Hereafter C must be a genuine C/C++ int type, signed or not. If C has bit-size k and if m <= k is the maximum number of bits allowed for the modulus then the modulus 0 actually stands for 2^m.

Definition at line 523 of file modular_int.hpp.

#define TMPL   template<typename C, typename M>

Hereafter C must be a genuine C/C++ int type, signed or not. If C has bit-size k and if m <= k is the maximum number of bits allowed for the modulus then the modulus 0 actually stands for 2^m.

Definition at line 523 of file modular_int.hpp.

#define TMPLVW   template<typename V, typename W>

Definition at line 1064 of file modular_int.hpp.

#define Variant   modulus_int_preinverse

Definition at line 1012 of file modular_int.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Friends Defines