MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Not

Function Not

postgres/parser/utils/bitarray.go:420–430  ·  view source on GitHub ↗

Not computes the complement of a bit array.

(d BitArray)

Source from the content-addressed store, hash-verified

418
419// Not computes the complement of a bit array.
420func Not(d BitArray) BitArray {
421 res := d.Clone()
422 for i, w := range res.words {
423 res.words[i] = ^w
424 }
425 if res.lastBitsUsed > 0 {
426 lastWord := len(res.words) - 1
427 res.words[lastWord] &= (^word(0) << (numBitsPerWord - res.lastBitsUsed))
428 }
429 return res
430}
431
432// And computes the logical AND of two bit arrays.
433// The caller must ensure they have the same bit size.

Callers

nothing calls this directly

Calls 1

CloneMethod · 0.45

Tested by

no test coverage detected