Home
last modified time | relevance | path

Searched refs:limbs (Results 1 – 25 of 32) sorted by relevance

12

/third_party/boost/boost/multiprecision/cpp_int/
Dcomparison.hpp30 …n()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs()); in eval_eq()
38 …n()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs()); in eval_eq()
46 return (a.sign() == false) && (a.size() == 1) && (*a.limbs() == b); in eval_eq()
54 …return (a.sign() == (b < 0)) && (a.size() == 1) && (*a.limbs() == boost::multiprecision::detail::u… in eval_eq()
62 return (a.size() == 1) && (*a.limbs() == b); in eval_eq()
83 return *a.limbs() < b; in eval_lt()
97 return *a.limbs() > boost::multiprecision::detail::unsigned_abs(b); in eval_lt()
103 return *a.limbs() < boost::multiprecision::detail::unsigned_abs(b); in eval_lt()
115 return *a.limbs() < b; in eval_lt()
136 return *a.limbs() > b; in eval_gt()
[all …]
Dadd.hpp37 … result = static_cast<double_limb_type>(*a.limbs()) + static_cast<double_limb_type>(*b.limbs()); in add_unsigned()
42 typename CppInt2::const_limb_pointer pa = a.limbs(); in add_unsigned()
43 typename CppInt3::const_limb_pointer pb = b.limbs(); in add_unsigned()
44 typename CppInt1::limb_pointer pr = result.limbs(); in add_unsigned()
86 result.limbs()[x] = static_cast<limb_type>(carry); in add_unsigned()
102 typename CppInt1::limb_pointer pr = result.limbs(); in add_unsigned()
103 typename CppInt2::const_limb_pointer pa = a.limbs(); in add_unsigned()
128 result.limbs()[x] = static_cast<limb_type>(carry); in add_unsigned()
151 limb_type al = *a.limbs(); in subtract_unsigned()
152 limb_type bl = *b.limbs(); in subtract_unsigned()
[all …]
Dmisc.hpp71 …tic_cast<boost::multiprecision::limb_type>((std::numeric_limits<R>::max)()) <= backend.limbs()[0])) in eval_convert_to()
76 …atic_cast<boost::multiprecision::limb_type>((std::numeric_limits<R>::max)()) <= backend.limbs()[0]) in eval_convert_to()
82 *result = static_cast<R>(backend.limbs()[0]); in eval_convert_to()
85 *result = static_cast<R>(backend.limbs()[0]); in eval_convert_to()
92 *result += static_cast<R>(backend.limbs()[i]) << shift; in eval_convert_to()
102 *result += (static_cast<R>(backend.limbs()[i]) & mask) << shift; in eval_convert_to()
103 …if ((static_cast<R>(backend.limbs()[i]) & static_cast<limb_type>(~mask)) || (i + 1 < backend.size(… in eval_convert_to()
140 …d<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::const_limb_pointer p = backend.limbs(); in eval_convert_to()
156 return (val.size() == 1) && (val.limbs()[0] == 0); in eval_is_zero()
193 while (!a.limbs()[index] && (index < a.size())) in eval_lsb()
[all …]
Dimport_export.hpp29 val.limbs()[limb] = value; in assign_bits()
32 val.limbs()[limb] |= value; in assign_bits()
58 *val.limbs() |= value; in assign_bits()
78 std::memset(newval.limbs(), 0, newval.size() * sizeof(limb_type)); in resize_to_bit_size()
83 *newval.limbs() = 0; in resize_to_bit_size()
102 size_type limbs = std::distance(i, j); in import_bits_generic() local
103 size_type bits = limbs * chunk_size; in import_bits_generic()
134 result.limbs()[result.size() - 1] = 0u; in import_bits_fast()
135 std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(limb_type))); in import_bits_fast()
146 … limb_len = byte_len / sizeof(result.limbs()[0]); in import_bits_fast()
[all …]
Dbitwise.hpp76 typename CppInt1::limb_pointer pr = result.limbs(); in bitwise_op()
77 typename CppInt2::const_limb_pointer po = o.limbs(); in bitwise_op()
178 result.limbs()[x] = static_cast<limb_type>(carry); in bitwise_op()
204 typename CppInt1::limb_pointer pr = result.limbs(); in bitwise_op()
205 typename CppInt2::const_limb_pointer po = o.limbs(); in bitwise_op()
268 result.limbs()[0] &= l; in eval_bitwise_and()
278 result.limbs()[0] |= l; in eval_bitwise_or()
287 result.limbs()[0] ^= l; in eval_bitwise_xor()
312 result.limbs()[i] = ~o.limbs()[i]; in eval_complement()
314 result.limbs()[i] = ~static_cast<limb_type>(0); in eval_complement()
[all …]
Dserialize.hpp58 limb_type* pl = val.limbs(); in do_serialize()
84 limb_type* pl = val.limbs(); in do_serialize()
117 *val.limbs() = l; in do_serialize()
129 typename Int::local_limb_type l = *val.limbs(); in do_serialize()
150 ar.load_binary(val.limbs(), c * sizeof(limb_type)); in do_serialize()
165 ar.save_binary(val.limbs(), c * sizeof(limb_type)); in do_serialize()
175 ar.load_binary(val.limbs(), sizeof(*val.limbs())); in do_serialize()
187 ar.save_binary(val.limbs(), sizeof(*val.limbs())); in do_serialize()
Ddivide.hpp73 divide_unsigned_helper(result, x, y.limbs()[y_order], r); in divide_unsigned_helper()
77 typename CppInt2::const_limb_pointer px = x.limbs(); in divide_unsigned_helper()
78 typename CppInt3::const_limb_pointer py = y.limbs(); in divide_unsigned_helper()
139 typename CppInt1::const_limb_pointer prem = r.limbs(); in divide_unsigned_helper()
144 pr = result->limbs(); in divide_unsigned_helper()
192 t.limbs()[shift] = guess; in divide_unsigned_helper()
194 t.limbs()[i] = 0; in divide_unsigned_helper()
203 t.limbs()[shift] = guess; in divide_unsigned_helper()
205 t.limbs()[i] = 0; in divide_unsigned_helper()
216 typename CppInt1::limb_pointer pt = t.limbs(); in divide_unsigned_helper()
[all …]
/third_party/boost/boost/multiprecision/
Dcpp_int.hpp231 BOOST_CONSTEXPR data_type(limb_type* limbs, unsigned len) BOOST_NOEXCEPT : ld{ len, limbs } in data_type() argument
234 BOOST_CONSTEXPR data_type(limb_type* limbs, unsigned len) BOOST_NOEXCEPT in data_type() argument
237 ld.data = limbs; in data_type()
295 …scoped_shared_storage(limb_type* limbs, unsigned n) : data(limbs), capacity(n), allocated(0), is_a… in scoped_shared_storage()
341 …BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_internal ? m_data.la … in limbs() function
342 …BOOST_MP_FORCEINLINE const_limb_pointer limbs() const BOOST_NOEXCEPT { return m_internal ? m_da… in limbs() function
351 if (limbs()[0] == 0) in sign()
371 std::memcpy(pl, limbs(), size() * sizeof(limbs()[0])); in resize()
373 allocator().deallocate(limbs(), capacity()); in resize()
387 limb_pointer p = limbs(); in normalize()
[all …]
Dcpp_bin_float.hpp619 if (!bits_to_keep && !res.bits().limbs()[0])
1135 if ((q.limbs()[0] & 1u) && (eval_get_sign(r) || (q.limbs()[0] & 2u))) in eval_divide()
1156 q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1); in eval_divide()
1158 q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u); in eval_divide()
1253 if ((q.limbs()[0] & 1u) && eval_get_sign(r)) in eval_divide()
1274 q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1); in eval_divide()
1276 q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u); in eval_divide()
1489 …t>::digits / (sizeof(*arg.bits().limbs()) * CHAR_BIT) + (std::numeric_limits<Float>::digits % (siz… in eval_convert_to()
1492 e += first_limb_needed * sizeof(*arg.bits().limbs()) * CHAR_BIT; in eval_convert_to()
1495 …*res += std::ldexp(static_cast<Float>(arg.bits().limbs()[first_limb_needed]), static_cast<int>(e)); in eval_convert_to()
[all …]
/third_party/boost/libs/math/reporting/performance/
Dtest_gcd.cpp316 eval_gcd(result, b, *a.limbs()); in eval_gcd_new()
321 eval_gcd(result, a, *b.limbs()); in eval_gcd_new()
376 *up = boost::integer::gcd_detail::mixed_binary_gcd(*vp->limbs(), *up->limbs()); in eval_gcd_new()
380 …i = vp->limbs()[0] | (static_cast<double_limb_type>(vp->limbs()[1]) << sizeof(limb_type) * CHAR_BI… in eval_gcd_new()
381 …j = (up->size() == 1) ? *up->limbs() : up->limbs()[0] | (static_cast<double_limb_type>(up->limbs()… in eval_gcd_new()
/third_party/mbedtls/tests/suites/
Dtest_suite_mpi.data352 Multi-limb mbedtls_mpi_lt_mpi_ct (X>Y, equal MS limbs)
361 Multi-limb mbedtls_mpi_lt_mpi_ct (Alternating limbs) #1
364 Multi-limb mbedtls_mpi_lt_mpi_ct (Alternating limbs) #2
367 Multi-limb mbedtls_mpi_lt_mpi_ct (Alternating limbs) #3
370 Multi-limb mbedtls_mpi_lt_mpi_ct (Alternating limbs) #4
664 Shrink 0 limbs in a buffer of size 0 to 0
667 Shrink 2 limbs in a buffer of size 2 to 4
670 Shrink 2 limbs in a buffer of size 4 to 4
673 Shrink 2 limbs in a buffer of size 8 to 4
676 Shrink 4 limbs in a buffer of size 8 to 4
[all …]
Dtest_suite_ecp.data367 ECP mod p192 small (more than 192 bits, less limbs than 2 * 192 bits)
/third_party/boost/libs/multiprecision/example/
Dhashing_examples.cpp50 …64(reinterpret_cast<const char*>(val.backend().limbs()), val.backend().size() * sizeof(val.backend… in operator ()()
/third_party/boost/libs/multiprecision/test/
Dtest_move.cpp355 void const* p = a.backend().limbs(); in main()
357 BOOST_TEST(b.backend().limbs() == p); in main()
367 p = d.backend().limbs(); in main()
368 BOOST_TEST(p != e.backend().limbs()); in main()
370 BOOST_TEST(e.backend().limbs() == p); in main()
Dtest_int_io.cpp66 …static const unsigned limbs = std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is… in generate_random() local
68 static boost::random::uniform_int_distribution<unsigned> ui(0, limbs); in generate_random()
Dtest_cpp_int_import_export.cpp41 …static const unsigned limbs = std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is… in generate_random() local
43 static boost::random::uniform_int_distribution<unsigned> ui(0, limbs); in generate_random()
/third_party/glib/glib/gnulib/
Dvasnprintf.c349 mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ member
366 p1 = src1.limbs; in multiply()
368 p2 = src2.limbs; in multiply()
373 p1 = src2.limbs; in multiply()
375 p2 = src1.limbs; in multiply()
382 dest->limbs = (mp_limb_t *) malloc (1); in multiply()
415 dest->limbs = dp; in multiply()
417 return dest->limbs; in multiply()
481 const mp_limb_t *a_ptr = a.limbs; in divide()
483 const mp_limb_t *b_ptr = b.limbs; in divide()
[all …]
/third_party/gettext/gettext-runtime/intl/
Dvasnprintf.c415 mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ member
432 p1 = src1.limbs; in multiply()
434 p2 = src2.limbs; in multiply()
439 p1 = src2.limbs; in multiply()
441 p2 = src1.limbs; in multiply()
448 dest->limbs = (mp_limb_t *) malloc (1); in multiply()
481 dest->limbs = dp; in multiply()
483 return dest->limbs; in multiply()
547 const mp_limb_t *a_ptr = a.limbs; in divide()
549 const mp_limb_t *b_ptr = b.limbs; in divide()
[all …]
/third_party/gettext/gettext-runtime/libasprintf/
Dvasnprintf.c415 mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ member
432 p1 = src1.limbs; in multiply()
434 p2 = src2.limbs; in multiply()
439 p1 = src2.limbs; in multiply()
441 p2 = src1.limbs; in multiply()
448 dest->limbs = (mp_limb_t *) malloc (1); in multiply()
481 dest->limbs = dp; in multiply()
483 return dest->limbs; in multiply()
547 const mp_limb_t *a_ptr = a.limbs; in divide()
549 const mp_limb_t *b_ptr = b.limbs; in divide()
[all …]
/third_party/boringssl/src/third_party/fiat/
Dmake_curve25519_tables.py104 limbs = (26, 25, 26, 25, 26, 25, 26, 25, 26, 25)
106 for l in limbs:
DREADME.md15 "unsaturated arithmetic modulo 2^255-19 using 10 limbs of radix 2^25.5 in 32-bit
20 The 64-bit implementation uses 5 limbs of radix 2^51 with instruction scheduling
/third_party/mbedtls/library/
Dbignum.c904 static void mpi_bigendian_to_host( mbedtls_mpi_uint * const p, size_t limbs ) in mpi_bigendian_to_host() argument
908 if( limbs == 0 ) in mpi_bigendian_to_host()
920 for( cur_limb_left = p, cur_limb_right = p + ( limbs - 1 ); in mpi_bigendian_to_host()
939 size_t const limbs = CHARS_TO_LIMBS( buflen ); in mbedtls_mpi_read_binary() local
940 size_t const overhead = ( limbs * ciL ) - buflen; in mbedtls_mpi_read_binary()
947 if( X->n != limbs ) in mbedtls_mpi_read_binary()
951 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, limbs ) ); in mbedtls_mpi_read_binary()
962 mpi_bigendian_to_host( X->p, limbs ); in mbedtls_mpi_read_binary()
2547 size_t const limbs = CHARS_TO_LIMBS( size ); in mbedtls_mpi_fill_random() local
2548 size_t const overhead = ( limbs * ciL ) - size; in mbedtls_mpi_fill_random()
[all …]
/third_party/boost/boost/multiprecision/cpp_bin_float/
Dio.hpp49 if ((roundup == 2) || ((roundup == 1) && (result.backend().limbs()[0] & 1))) in restricted_multiply()
317 if ((roundup == 2) || ((roundup == 1) && t.backend().limbs()[0] & 1)) in operator =()
423 else if ((roundup == 2) || ((roundup == 1) && q.backend().limbs()[0] & 1)) in operator =()
/third_party/openssl/crypto/bn/
Drsa_sup_mul.c457 static void BN_to_limb(const BIGNUM *bn, limb_t *buf, size_t limbs) in BN_to_limb() argument
461 limb_t *ptr = buf + (limbs - real_limbs); in BN_to_limb()
/third_party/openssl/Configurations/
DREADME205 THIRTY_TWO_BIT bignum limbs are 32 bits,
212 BN_LLONG bignum limbs are 32 bits,
216 SIXTY_FOUR_BIT_LONG bignum limbs are 64 bits
218 SIXTY_FOUR_BIT bignums limbs are 64 bits,

12