MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Not

Function Not

pkg/util/bitarray/bitarray.go:406–416  ·  view source on GitHub ↗

Not computes the complement of a bit array.

(d BitArray)

Source from the content-addressed store, hash-verified

404
405// Not computes the complement of a bit array.
406func Not(d BitArray) BitArray {
407 res := d.Clone()
408 for i, w := range res.words {
409 res.words[i] = ^w
410 }
411 if res.lastBitsUsed > 0 {
412 lastWord := len(res.words) - 1
413 res.words[lastWord] &= (^word(0) << (numBitsPerWord - res.lastBitsUsed))
414 }
415 return res
416}
417
418// And computes the logical AND of two bit arrays.
419// The caller must ensure they have the same bit size.

Callers 1

eval.goFile · 0.92

Calls 1

CloneMethod · 0.45

Tested by

no test coverage detected