Searched refs:nlimbs (Results 1 – 7 of 7) sorted by relevance
/Linux-v5.4/lib/mpi/ |
D | mpiutil.c | 30 MPI mpi_alloc(unsigned nlimbs) in mpi_alloc() argument 38 if (nlimbs) { in mpi_alloc() 39 a->d = mpi_alloc_limb_space(nlimbs); in mpi_alloc() 48 a->alloced = nlimbs; in mpi_alloc() 49 a->nlimbs = 0; in mpi_alloc() 57 mpi_ptr_t mpi_alloc_limb_space(unsigned nlimbs) in mpi_alloc_limb_space() argument 59 size_t len = nlimbs * sizeof(mpi_limb_t); in mpi_alloc_limb_space() 75 void mpi_assign_limb_space(MPI a, mpi_ptr_t ap, unsigned nlimbs) in mpi_assign_limb_space() argument 79 a->alloced = nlimbs; in mpi_assign_limb_space() 86 int mpi_resize(MPI a, unsigned nlimbs) in mpi_resize() argument [all …]
|
D | mpi-bit.c | 32 for (; a->nlimbs && !a->d[a->nlimbs - 1]; a->nlimbs--) in mpi_normalize() 45 if (a->nlimbs) { in mpi_get_nbits() 46 mpi_limb_t alimb = a->d[a->nlimbs - 1]; in mpi_get_nbits() 51 n = BITS_PER_MPI_LIMB - n + (a->nlimbs - 1) * BITS_PER_MPI_LIMB; in mpi_get_nbits()
|
D | mpicoder.c | 39 unsigned nbits, nlimbs; in mpi_read_raw_data() local 56 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data() 57 val = mpi_alloc(nlimbs); in mpi_read_raw_data() 62 val->nlimbs = nlimbs; in mpi_read_raw_data() 67 for (j = nlimbs; j > 0; j--) { in mpi_read_raw_data() 117 for (i = a->nlimbs - 1; i >= 0; i--) { in count_lzeros() 173 for (i = a->nlimbs - 1 - lzeros / BYTES_PER_MPI_LIMB, in mpi_read_buffer() 292 for (i = a->nlimbs - 1; i >= 0; i--) { in mpi_write_to_sgl() 333 unsigned int nbits, nlimbs; in mpi_read_raw_from_sgl() local 381 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_from_sgl() [all …]
|
D | mpi-cmp.c | 28 if (!u->nlimbs && !limb) in mpi_cmp_ui() 32 if (u->nlimbs > 1) in mpi_cmp_ui() 51 usize = u->nlimbs; in mpi_cmp() 52 vsize = v->nlimbs; in mpi_cmp()
|
D | mpi-pow.c | 41 esize = exp->nlimbs; in mpi_powm() 42 msize = mod->nlimbs; in mpi_powm() 55 res->nlimbs = (msize == 1 && mod->d[0] == 1) ? 0 : 1; in mpi_powm() 56 if (res->nlimbs) { in mpi_powm() 79 bsize = base->nlimbs; in mpi_powm() 99 res->nlimbs = 0; in mpi_powm() 293 res->nlimbs = rsize; in mpi_powm()
|
D | mpi-internal.h | 96 mpi_ptr_t mpi_alloc_limb_space(unsigned nlimbs); 98 void mpi_assign_limb_space(MPI a, mpi_ptr_t ap, unsigned nlimbs);
|
/Linux-v5.4/include/linux/ |
D | mpi.h | 31 int nlimbs; /* number of valid limbs */ member 42 #define mpi_get_nlimbs(a) ((a)->nlimbs) 45 MPI mpi_alloc(unsigned nlimbs); 47 int mpi_resize(MPI a, unsigned nlimbs); 81 return a->nlimbs * BYTES_PER_MPI_LIMB; in mpi_get_size()
|