Documentation ¶
Overview ¶
Package bits provides a mockable wrapper for math/bits.
Index ¶
- type Impl
- func (*Impl) Add(x uint, y uint, carry uint) (sum uint, carryOut uint)
- func (*Impl) Add32(x uint32, y uint32, carry uint32) (sum uint32, carryOut uint32)
- func (*Impl) Add64(x uint64, y uint64, carry uint64) (sum uint64, carryOut uint64)
- func (*Impl) Div(hi uint, lo uint, y uint) (quo uint, rem uint)
- func (*Impl) Div32(hi uint32, lo uint32, y uint32) (quo uint32, rem uint32)
- func (*Impl) Div64(hi uint64, lo uint64, y uint64) (quo uint64, rem uint64)
- func (*Impl) LeadingZeros(x uint) int
- func (*Impl) LeadingZeros16(x uint16) int
- func (*Impl) LeadingZeros32(x uint32) int
- func (*Impl) LeadingZeros64(x uint64) int
- func (*Impl) LeadingZeros8(x uint8) int
- func (*Impl) Len(x uint) int
- func (*Impl) Len16(x uint16) (n int)
- func (*Impl) Len32(x uint32) (n int)
- func (*Impl) Len64(x uint64) (n int)
- func (*Impl) Len8(x uint8) int
- func (*Impl) Mul(x uint, y uint) (hi uint, lo uint)
- func (*Impl) Mul32(x uint32, y uint32) (hi uint32, lo uint32)
- func (*Impl) Mul64(x uint64, y uint64) (hi uint64, lo uint64)
- func (*Impl) OnesCount(x uint) int
- func (*Impl) OnesCount16(x uint16) int
- func (*Impl) OnesCount32(x uint32) int
- func (*Impl) OnesCount64(x uint64) int
- func (*Impl) OnesCount8(x uint8) int
- func (*Impl) Rem(hi uint, lo uint, y uint) uint
- func (*Impl) Rem32(hi uint32, lo uint32, y uint32) uint32
- func (*Impl) Rem64(hi uint64, lo uint64, y uint64) uint64
- func (*Impl) Reverse(x uint) uint
- func (*Impl) Reverse16(x uint16) uint16
- func (*Impl) Reverse32(x uint32) uint32
- func (*Impl) Reverse64(x uint64) uint64
- func (*Impl) Reverse8(x uint8) uint8
- func (*Impl) ReverseBytes(x uint) uint
- func (*Impl) ReverseBytes16(x uint16) uint16
- func (*Impl) ReverseBytes32(x uint32) uint32
- func (*Impl) ReverseBytes64(x uint64) uint64
- func (*Impl) RotateLeft(x uint, k int) uint
- func (*Impl) RotateLeft16(x uint16, k int) uint16
- func (*Impl) RotateLeft32(x uint32, k int) uint32
- func (*Impl) RotateLeft64(x uint64, k int) uint64
- func (*Impl) RotateLeft8(x uint8, k int) uint8
- func (*Impl) Sub(x uint, y uint, borrow uint) (diff uint, borrowOut uint)
- func (*Impl) Sub32(x uint32, y uint32, borrow uint32) (diff uint32, borrowOut uint32)
- func (*Impl) Sub64(x uint64, y uint64, borrow uint64) (diff uint64, borrowOut uint64)
- func (*Impl) TrailingZeros(x uint) int
- func (*Impl) TrailingZeros16(x uint16) int
- func (*Impl) TrailingZeros32(x uint32) int
- func (*Impl) TrailingZeros64(x uint64) int
- func (*Impl) TrailingZeros8(x uint8) int
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) LeadingZeros ¶
func (*Impl) LeadingZeros16 ¶
func (*Impl) LeadingZeros32 ¶
func (*Impl) LeadingZeros64 ¶
func (*Impl) LeadingZeros8 ¶
func (*Impl) OnesCount16 ¶
func (*Impl) OnesCount32 ¶
func (*Impl) OnesCount64 ¶
func (*Impl) OnesCount8 ¶
func (*Impl) ReverseBytes ¶
func (*Impl) ReverseBytes16 ¶
func (*Impl) ReverseBytes32 ¶
func (*Impl) ReverseBytes64 ¶
func (*Impl) TrailingZeros ¶
func (*Impl) TrailingZeros16 ¶
func (*Impl) TrailingZeros32 ¶
func (*Impl) TrailingZeros64 ¶
func (*Impl) TrailingZeros8 ¶
type Interface ¶
type Interface interface { Add(x uint, y uint, carry uint) (sum uint, carryOut uint) Add32(x uint32, y uint32, carry uint32) (sum uint32, carryOut uint32) Add64(x uint64, y uint64, carry uint64) (sum uint64, carryOut uint64) Div(hi uint, lo uint, y uint) (quo uint, rem uint) Div32(hi uint32, lo uint32, y uint32) (quo uint32, rem uint32) Div64(hi uint64, lo uint64, y uint64) (quo uint64, rem uint64) LeadingZeros(x uint) int LeadingZeros16(x uint16) int LeadingZeros32(x uint32) int LeadingZeros64(x uint64) int LeadingZeros8(x uint8) int Len(x uint) int Len16(x uint16) (n int) Len32(x uint32) (n int) Len64(x uint64) (n int) Len8(x uint8) int Mul(x uint, y uint) (hi uint, lo uint) Mul32(x uint32, y uint32) (hi uint32, lo uint32) Mul64(x uint64, y uint64) (hi uint64, lo uint64) OnesCount(x uint) int OnesCount16(x uint16) int OnesCount32(x uint32) int OnesCount64(x uint64) int OnesCount8(x uint8) int Rem(hi uint, lo uint, y uint) uint Rem32(hi uint32, lo uint32, y uint32) uint32 Rem64(hi uint64, lo uint64, y uint64) uint64 Reverse(x uint) uint Reverse16(x uint16) uint16 Reverse32(x uint32) uint32 Reverse64(x uint64) uint64 Reverse8(x uint8) uint8 ReverseBytes(x uint) uint ReverseBytes16(x uint16) uint16 ReverseBytes32(x uint32) uint32 ReverseBytes64(x uint64) uint64 RotateLeft(x uint, k int) uint RotateLeft16(x uint16, k int) uint16 RotateLeft32(x uint32, k int) uint32 RotateLeft64(x uint64, k int) uint64 RotateLeft8(x uint8, k int) uint8 Sub(x uint, y uint, borrow uint) (diff uint, borrowOut uint) Sub32(x uint32, y uint32, borrow uint32) (diff uint32, borrowOut uint32) Sub64(x uint64, y uint64, borrow uint64) (diff uint64, borrowOut uint64) TrailingZeros(x uint) int TrailingZeros16(x uint16) int TrailingZeros32(x uint32) int TrailingZeros64(x uint64) int TrailingZeros8(x uint8) int }
Click to show internal directories.
Click to hide internal directories.