Browse Source

Hide macros and functions

These macros and functions are only in the public interface for testing purposes or because of `#[macro_export]` pollution
Aaron Kutch 4 years ago
parent
commit
d65785b8ee

+ 2 - 0
src/int/leading_zeros.rs

@@ -4,6 +4,7 @@
 // Compilers will insert the check for zero in cases where it is needed.
 
 /// Returns the number of leading binary zeros in `x`.
+#[doc(hidden)]
 pub fn usize_leading_zeros_default(x: usize) -> usize {
     // The basic idea is to test if the higher bits of `x` are zero and bisect the number
     // 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 {
 // RISC-V that allows `(x >= power-of-two) as usize` to be branchless.
 
 /// Returns the number of leading binary zeros in `x`.
+#[doc(hidden)]
 pub fn usize_leading_zeros_riscv(x: usize) -> usize {
     let mut x = x;
     // the number of potential leading zeros

+ 1 - 0
src/int/specialized_div_rem/asymmetric.rs

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

+ 1 - 0
src/int/specialized_div_rem/binary_long.rs

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

+ 1 - 0
src/int/specialized_div_rem/delegate.rs

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

+ 1 - 0
src/int/specialized_div_rem/norm_shift.rs

@@ -1,4 +1,5 @@
 /// Creates a function used by some division algorithms to compute the "normalization shift".
+#[doc(hidden)]
 #[macro_export]
 macro_rules! impl_normalization_shift {
     (

+ 1 - 0
src/int/specialized_div_rem/trifecta.rs

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