Source File
hash.go
Belonging Package
src.elv.sh/pkg/persistent/hash
// Package hash contains some common hash functions suitable for use in hash// maps.package hashimportconst DJBInit uint32 = 5381func (, uint32) uint32 {return mul33() +}func ( ...uint32) uint32 {:= DJBInitfor , := range {= DJBCombine(, )}return}func ( uint32) uint32 {return}func ( uint64) uint32 {return mul33(uint32(>>32)) + uint32(&0xffffffff)}func ( unsafe.Pointer) uint32 {if unsafe.Sizeof() == 4 {return UInt32(uint32(uintptr()))} else {return UInt64(uint64(uintptr()))}// NOTE: We don't care about 128-bit archs yet.}func ( uintptr) uint32 {if unsafe.Sizeof() == 4 {return UInt32(uint32())} else {return UInt64(uint64())}}func ( string) uint32 {:= DJBInitfor := 0; < len(); ++ {= DJBCombine(, uint32([]))}return}func ( uint32) uint32 {return <<5 +}
The pages are generated with Golds v0.2.8-preview. (GOOS=darwin GOARCH=arm64)