Skip to content

Commit d65785b

Browse files
committed
Hide macros and functions
These macros and functions are only in the public interface for testing purposes or because of `#[macro_export]` pollution
1 parent 1d15e4e commit d65785b

File tree

6 files changed

+7
-0
lines changed

6 files changed

+7
-0
lines changed

src/int/leading_zeros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Compilers will insert the check for zero in cases where it is needed.
55

66
/// Returns the number of leading binary zeros in `x`.
7+
#[doc(hidden)]
78
pub fn usize_leading_zeros_default(x: usize) -> usize {
89
// The basic idea is to test if the higher bits of `x` are zero and bisect the number
910
// 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 {
7576
// RISC-V that allows `(x >= power-of-two) as usize` to be branchless.
7677

7778
/// Returns the number of leading binary zeros in `x`.
79+
#[doc(hidden)]
7880
pub fn usize_leading_zeros_riscv(x: usize) -> usize {
7981
let mut x = x;
8082
// the number of potential leading zeros

src/int/specialized_div_rem/asymmetric.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// assembly instruction that can divide a 128 bit integer by a 64 bit integer if the quotient fits
44
/// in 64 bits. The 128 bit version of this algorithm would use that fast hardware division to
55
/// construct a full 128 bit by 128 bit division.
6+
#[doc(hidden)]
67
#[macro_export]
78
macro_rules! impl_asymmetric {
89
(

src/int/specialized_div_rem/binary_long.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/// predicate instructions. For architectures with predicated instructions, one of the algorithms
55
/// described in the documentation of these functions probably has higher performance, and a custom
66
/// assembly routine should be used instead.
7+
#[doc(hidden)]
78
#[macro_export]
89
macro_rules! impl_binary_long {
910
(

src/int/specialized_div_rem/delegate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// binary long division to divide integers larger than what hardware division by itself can do. This
33
/// function is intended for microarchitectures that have division hardware, but not fast enough
44
/// multiplication hardware for `impl_trifecta` to be faster.
5+
#[doc(hidden)]
56
#[macro_export]
67
macro_rules! impl_delegate {
78
(

src/int/specialized_div_rem/norm_shift.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// Creates a function used by some division algorithms to compute the "normalization shift".
2+
#[doc(hidden)]
23
#[macro_export]
34
macro_rules! impl_normalization_shift {
45
(

src/int/specialized_div_rem/trifecta.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// larger than the largest hardware integer division supported. These functions use large radix
33
/// division algorithms that require both fast division and very fast widening multiplication on the
44
/// target microarchitecture. Otherwise, `impl_delegate` should be used instead.
5+
#[doc(hidden)]
56
#[macro_export]
67
macro_rules! impl_trifecta {
78
(

0 commit comments

Comments
 (0)