MCPcopy
hub / github.com/uber/aresdb / SetAllValid

Method SetAllValid

memstore/vectors/vector.go:275–280  ·  view source on GitHub ↗

SetAllValid set all bits to be 1 in a bool typed vector.

()

Source from the content-addressed store, hash-verified

273
274// SetAllValid set all bits to be 1 in a bool typed vector.
275func (v *Vector) SetAllValid() {
276 // buffer are 64 bytes aligned so we can assign word by word.
277 for i := 0; i < v.Bytes; i += 4 {
278 *(*uint32)(utils.MemAccess(unsafe.Pointer(v.buffer), i)) = 0xFFFFFFFF
279 }
280}
281
282// CheckAllValid checks whether all bits are 1 in a bool typed vector.
283func (v *Vector) CheckAllValid() bool {

Callers 3

CopyOnWriteMethod · 0.80
fillWithDefaultValueMethod · 0.80
vector_test.goFile · 0.80

Calls 1

MemAccessFunction · 0.92

Tested by

no test coverage detected