File tree 6 files changed +7
-0
lines changed
6 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 4
4
// Compilers will insert the check for zero in cases where it is needed.
5
5
6
6
/// Returns the number of leading binary zeros in `x`.
7
+ #[ doc( hidden) ]
7
8
pub fn usize_leading_zeros_default ( x : usize ) -> usize {
8
9
// The basic idea is to test if the higher bits of `x` are zero and bisect the number
9
10
// of leading zeros. It is possible for all branches of the bisection to use the same
@@ -75,6 +76,7 @@ pub fn usize_leading_zeros_default(x: usize) -> usize {
75
76
// RISC-V that allows `(x >= power-of-two) as usize` to be branchless.
76
77
77
78
/// Returns the number of leading binary zeros in `x`.
79
+ #[ doc( hidden) ]
78
80
pub fn usize_leading_zeros_riscv ( x : usize ) -> usize {
79
81
let mut x = x;
80
82
// the number of potential leading zeros
Original file line number Diff line number Diff line change 3
3
/// assembly instruction that can divide a 128 bit integer by a 64 bit integer if the quotient fits
4
4
/// in 64 bits. The 128 bit version of this algorithm would use that fast hardware division to
5
5
/// construct a full 128 bit by 128 bit division.
6
+ #[ doc( hidden) ]
6
7
#[ macro_export]
7
8
macro_rules! impl_asymmetric {
8
9
(
Original file line number Diff line number Diff line change 4
4
/// predicate instructions. For architectures with predicated instructions, one of the algorithms
5
5
/// described in the documentation of these functions probably has higher performance, and a custom
6
6
/// assembly routine should be used instead.
7
+ #[ doc( hidden) ]
7
8
#[ macro_export]
8
9
macro_rules! impl_binary_long {
9
10
(
Original file line number Diff line number Diff line change 2
2
/// binary long division to divide integers larger than what hardware division by itself can do. This
3
3
/// function is intended for microarchitectures that have division hardware, but not fast enough
4
4
/// multiplication hardware for `impl_trifecta` to be faster.
5
+ #[ doc( hidden) ]
5
6
#[ macro_export]
6
7
macro_rules! impl_delegate {
7
8
(
Original file line number Diff line number Diff line change 1
1
/// Creates a function used by some division algorithms to compute the "normalization shift".
2
+ #[ doc( hidden) ]
2
3
#[ macro_export]
3
4
macro_rules! impl_normalization_shift {
4
5
(
Original file line number Diff line number Diff line change 2
2
/// larger than the largest hardware integer division supported. These functions use large radix
3
3
/// division algorithms that require both fast division and very fast widening multiplication on the
4
4
/// target microarchitecture. Otherwise, `impl_delegate` should be used instead.
5
+ #[ doc( hidden) ]
5
6
#[ macro_export]
6
7
macro_rules! impl_trifecta {
7
8
(
You can’t perform that action at this time.
0 commit comments