Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/mpi.h>
#include <linux/errno.h>
Go to the source code of this file.
Data Structures | |
struct | karatsuba_ctx |
Macros | |
#define | log_debug printk |
#define | log_bug printk |
#define | assert(x) |
#define | KARATSUBA_THRESHOLD 16 |
#define | ABS(x) (x >= 0 ? x : -x) |
#define | MIN(l, o) ((l) < (o) ? (l) : (o)) |
#define | MAX(h, i) ((h) > (i) ? (h) : (i)) |
#define | MPN_COPY(d, s, n) |
#define | MPN_COPY_INCR(d, s, n) |
#define | MPN_COPY_DECR(d, s, n) |
#define | MPN_ZERO(d, n) |
#define | MPN_NORMALIZE(d, n) |
#define | MPN_NORMALIZE_NOT_ZERO(d, n) |
#define | MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) |
#define | UDIV_QRNND_PREINV(q, r, nh, nl, d, di) |
#define | W_TYPE_SIZE BITS_PER_MPI_LIMB |
Typedefs | |
typedef mpi_limb_t * | mpi_ptr_t |
typedef int | mpi_size_t |
typedef mpi_limb_t | UWtype |
typedef unsigned int | UHWtype |
typedef unsigned char | UQItype |
typedef long | SItype |
typedef unsigned long | USItype |
#define assert | ( | x | ) |
Definition at line 43 of file mpi-internal.h.
#define KARATSUBA_THRESHOLD 16 |
Definition at line 56 of file mpi-internal.h.
#define log_bug printk |
Definition at line 41 of file mpi-internal.h.
#define log_debug printk |
Definition at line 40 of file mpi-internal.h.
Definition at line 69 of file mpi-internal.h.
Definition at line 80 of file mpi-internal.h.
Definition at line 94 of file mpi-internal.h.
Definition at line 87 of file mpi-internal.h.
Definition at line 127 of file mpi-internal.h.
Definition at line 118 of file mpi-internal.h.
Definition at line 102 of file mpi-internal.h.
Definition at line 141 of file mpi-internal.h.
#define W_TYPE_SIZE BITS_PER_MPI_LIMB |
Definition at line 242 of file mpi-internal.h.
typedef mpi_limb_t* mpi_ptr_t |
Definition at line 65 of file mpi-internal.h.
typedef int mpi_size_t |
Definition at line 66 of file mpi-internal.h.
Definition at line 253 of file mpi-internal.h.
Definition at line 244 of file mpi-internal.h.
Definition at line 252 of file mpi-internal.h.
Definition at line 254 of file mpi-internal.h.
typedef mpi_limb_t UWtype |
Definition at line 243 of file mpi-internal.h.
void mpih_sqr_n | ( | mpi_ptr_t | prodp, |
mpi_ptr_t | up, | ||
mpi_size_t | size, | ||
mpi_ptr_t | tspace | ||
) |
Definition at line 258 of file mpih-mul.c.
void mpih_sqr_n_basecase | ( | mpi_ptr_t | prodp, |
mpi_ptr_t | up, | ||
mpi_size_t | size | ||
) |
Definition at line 220 of file mpih-mul.c.
mpi_limb_t mpihelp_add | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_ptr_t | s2_ptr, | ||
mpi_size_t | s2_size | ||
) |
Definition at line 65 of file mpi-inline.h.
mpi_limb_t mpihelp_add_1 | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_limb_t | s2_limb | ||
) |
Definition at line 37 of file mpi-inline.h.
mpi_limb_t mpihelp_add_n | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_ptr_t | s2_ptr, | ||
mpi_size_t | size | ||
) |
Definition at line 34 of file generic_mpih-add1.c.
mpi_limb_t mpihelp_addmul_1 | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_limb_t | s2_limb | ||
) |
Definition at line 33 of file generic_mpih-mul2.c.
int mpihelp_cmp | ( | mpi_ptr_t | op1_ptr, |
mpi_ptr_t | op2_ptr, | ||
mpi_size_t | size | ||
) |
Definition at line 38 of file mpih-cmp.c.
mpi_limb_t mpihelp_divmod_1 | ( | mpi_ptr_t | quot_ptr, |
mpi_ptr_t | dividend_ptr, | ||
mpi_size_t | dividend_size, | ||
mpi_limb_t | divisor_limb | ||
) |
mpi_limb_t mpihelp_divrem | ( | mpi_ptr_t | qp, |
mpi_size_t | qextra_limbs, | ||
mpi_ptr_t | np, | ||
mpi_size_t | nsize, | ||
mpi_ptr_t | dp, | ||
mpi_size_t | dsize | ||
) |
Definition at line 58 of file mpih-div.c.
mpi_limb_t mpihelp_lshift | ( | mpi_ptr_t | wp, |
mpi_ptr_t | up, | ||
mpi_size_t | usize, | ||
unsigned | cnt | ||
) |
mpi_limb_t mpihelp_mod_1 | ( | mpi_ptr_t | dividend_ptr, |
mpi_size_t | dividend_size, | ||
mpi_limb_t | divisor_limb | ||
) |
int mpihelp_mul | ( | mpi_ptr_t | prodp, |
mpi_ptr_t | up, | ||
mpi_size_t | usize, | ||
mpi_ptr_t | vp, | ||
mpi_size_t | vsize, | ||
mpi_limb_t * | _result | ||
) |
Definition at line 440 of file mpih-mul.c.
mpi_limb_t mpihelp_mul_1 | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_limb_t | s2_limb | ||
) |
Definition at line 33 of file generic_mpih-mul1.c.
int mpihelp_mul_karatsuba_case | ( | mpi_ptr_t | prodp, |
mpi_ptr_t | up, | ||
mpi_size_t | usize, | ||
mpi_ptr_t | vp, | ||
mpi_size_t | vsize, | ||
struct karatsuba_ctx * | ctx | ||
) |
Definition at line 334 of file mpih-mul.c.
int mpihelp_mul_n | ( | mpi_ptr_t | prodp, |
mpi_ptr_t | up, | ||
mpi_ptr_t | vp, | ||
mpi_size_t | size | ||
) |
void mpihelp_release_karatsuba_ctx | ( | struct karatsuba_ctx * | ctx | ) |
Definition at line 406 of file mpih-mul.c.
mpi_limb_t mpihelp_rshift | ( | mpi_ptr_t | wp, |
mpi_ptr_t | up, | ||
mpi_size_t | usize, | ||
unsigned | cnt | ||
) |
Definition at line 42 of file generic_mpih-rshift.c.
mpi_limb_t mpihelp_sub | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_ptr_t | s2_ptr, | ||
mpi_size_t | s2_size | ||
) |
Definition at line 108 of file mpi-inline.h.
mpi_limb_t mpihelp_sub_1 | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_limb_t | s2_limb | ||
) |
Definition at line 80 of file mpi-inline.h.
mpi_limb_t mpihelp_sub_n | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_ptr_t | s2_ptr, | ||
mpi_size_t | size | ||
) |
Definition at line 33 of file generic_mpih-sub1.c.
mpi_limb_t mpihelp_submul_1 | ( | mpi_ptr_t | res_ptr, |
mpi_ptr_t | s1_ptr, | ||
mpi_size_t | s1_size, | ||
mpi_limb_t | s2_limb | ||
) |
Definition at line 33 of file generic_mpih-mul3.c.