modulus_reduction_naive< V > Struct Template Reference
#include <modulus_naive.hpp>
List of all members.
Static Public Member Functions
- template<typename C , typename M > static void reduce_mod (C &dest, const M &m)
- template<typename C , typename M > static void reduce_mod (C &dest, const M &m, C &carry)
- template<typename C , typename M > static void reduce_mod (C &dest, const C &s, const M &m)
- template<typename C , typename M > static void reduce_mod (C &dest, const C &s, const M &m, C &carry)
Detailed Description
template<typename V>
struct mmx::modulus_reduction_naive< V >
Definition at line 32 of file modulus_naive.hpp.
Member Function Documentation
static void reduce_mod |
( |
C & |
dest, |
|
|
const C & |
s, |
|
|
const M & |
m, |
|
|
C & |
carry | |
|
) |
| | [inline, static] |
Definition at line 51 of file modulus_naive.hpp.
00051 {
00052 if (m.p != 0) {
00053 carry= quo (s, m.p);
00054 dest = rem (s, m.p);
00055 }
00056 else {
00057 carry= 0;
00058 dest= s;
00059 } }
static void reduce_mod |
( |
C & |
dest, |
|
|
const C & |
s, |
|
|
const M & |
m | |
|
) |
| | [inline, static] |
static void reduce_mod |
( |
C & |
dest, |
|
|
const M & |
m, |
|
|
C & |
carry | |
|
) |
| | [inline, static] |
Definition at line 38 of file modulus_naive.hpp.
00038 {
00039 if (m.p != 0) {
00040 carry= quo (dest, m.p);
00041 dest = rem (dest, m.p);
00042 }
00043 else
00044 carry= 0; }
static void reduce_mod |
( |
C & |
dest, |
|
|
const M & |
m | |
|
) |
| | [inline, static] |
The documentation for this struct was generated from the following file: