Documentation ¶
Index ¶
Constants ¶
View Source
const ( // On 32-bit platforms: 0xFFFFFFFF // On 64-bit platforms: 0xFFFFFFFFFFFFFFFF MaxUint = ^uint(0) // On 32-bit platforms: 2 // On 64-bit platforms: 3 LogSizeOfUintInBytes = MaxUint>>8&1 + MaxUint>>16&1 + MaxUint>>32&1 // On 32-bit platforms: 4 // On 64-bit platforms: 8 SizeOfUintInBytes = 1 << LogSizeOfUintInBytes // On 32-bit platforms: 32 // On 64-bit platforms: 64 SizeOfUintInBits = SizeOfUintInBytes << 3 )
Variables ¶
This section is empty.
Functions ¶
func SizeOf ¶
func SizeOf[T constraints.Unsigned]() int
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
bits
Package bits implements bit counting and manipulation functions for the predeclared unsigned integer types.
|
Package bits implements bit counting and manipulation functions for the predeclared unsigned integer types. |
bits/impl/onescount
References: http://www.hackersdelight.org/hdcodetxt/pop.c.txt http://www.dalkescientific.com/writings/diary/archive/2008/07/03/hakmem_and_other_popcounts.html
|
References: http://www.hackersdelight.org/hdcodetxt/pop.c.txt http://www.dalkescientific.com/writings/diary/archive/2008/07/03/hakmem_and_other_popcounts.html |
bits/impl/onescount/hakmem
Source: https://stackoverflow.com/q/8590432/142239 Source: http://www.stmintz.com/ccc/index.php?id=94570
|
Source: https://stackoverflow.com/q/8590432/142239 Source: http://www.stmintz.com/ccc/index.php?id=94570 |
bits/impl/onescount/pop0
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop0)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop0) |
bits/impl/onescount/pop1
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop1) Source: java.lang.Integer#bitCount Source: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/lang/Integer.java#Integer.bitCount%28int%29 Source: java.lang.Long#bitCount Source: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/lang/Long.java#Long.bitCount%28long%29
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop1) Source: java.lang.Integer#bitCount Source: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/lang/Integer.java#Integer.bitCount%28int%29 Source: java.lang.Long#bitCount Source: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/java/lang/Long.java#Long.bitCount%28long%29 |
bits/impl/onescount/pop1a
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop1 + alternative) Source: https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c#L840-L859 Source: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36041#c8
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop1 + alternative) Source: https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c#L840-L859 Source: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36041#c8 |
bits/impl/onescount/pop2
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop2)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop2) |
bits/impl/onescount/pop2a
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop2 + alternative)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop2 + alternative) |
bits/impl/onescount/pop3
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop3)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop3) |
bits/impl/onescount/pop5
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop5)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop5) |
bits/impl/onescount/reset
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop4)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop4) |
bits/impl/onescount/subtract
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop5a)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop5a) |
bits/impl/onescount/table
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop6)
|
Source: http://www.hackersdelight.org/hdcodetxt/pop.c.txt (pop6) |
Click to show internal directories.
Click to hide internal directories.