"Fossies" - the Fresh Open Source Software Archive

Member "gdrive-2.1.1/vendor/github.com/soniakeys/graph/bits64.go" (28 May 2021, 583 Bytes) of package /linux/misc/gdrive-2.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Go source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2014 Sonia Keys
    2 // License MIT: http://opensource.org/licenses/MIT
    3 
    4 // +build !386,!arm
    5 
    6 package graph
    7 
    8 const (
    9     wordSize = 64
   10     wordExp  = 6 // 2^6 = 64
   11 )
   12 
   13 // reference: http://graphics.stanford.edu/~seander/bithacks.html
   14 const deBruijnMultiple = 0x03f79d71b4ca8b09
   15 const deBruijnShift = 58
   16 
   17 var deBruijnBits = []int{
   18     0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4,
   19     62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5,
   20     63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11,
   21     54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6,
   22 }