Hide macros and functions
These macros and functions are only in the public interface for testing purposes or because of `#[macro_export]` pollution
This commit is contained in:
parent
756a9dea00
commit
d2a2525035
6 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -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,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 {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue