(container []uint16, bitmap1, bitmap2 []uint64)
| 95 | } |
| 96 | |
| 97 | func fillArrayXOR(container []uint16, bitmap1, bitmap2 []uint64) { |
| 98 | if len(bitmap1) != len(bitmap2) { |
| 99 | panic("array lengths don't match") |
| 100 | } |
| 101 | // TODO: rewrite in assembly |
| 102 | pos := 0 |
| 103 | for k := 0; k < len(bitmap1); k++ { |
| 104 | bitset := bitmap1[k] ^ bitmap2[k] |
| 105 | for bitset != 0 { |
| 106 | t := bitset & -bitset |
| 107 | container[pos] = uint16((k*64 + int(popcount(t-1)))) |
| 108 | pos = pos + 1 |
| 109 | bitset ^= t |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | func highbits(x uint32) uint16 { |
| 115 | return uint16(x >> 16) |
no test coverage detected
searching dependent graphs…