MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / SetCopyOnWrite

Method SetCopyOnWrite

roaring64/roaring64.go:1187–1189  ·  view source on GitHub ↗

SetCopyOnWrite sets this bitmap to use copy-on-write so that copies are fast and memory conscious if the parameter is true, otherwise we leave the default where hard copies are made (copy-on-write requires extra care in a threaded context). Calling SetCopyOnWrite(true) on a bitmap created with FromB

(val bool)

Source from the content-addressed store, hash-verified

1185// (copy-on-write requires extra care in a threaded context).
1186// Calling SetCopyOnWrite(true) on a bitmap created with FromBuffer is unsafe.
1187func (rb *Bitmap) SetCopyOnWrite(val bool) {
1188 rb.highlowcontainer.copyOnWrite = val
1189}
1190
1191// GetCopyOnWrite gets this bitmap's copy-on-write property
1192func (rb *Bitmap) GetCopyOnWrite() (val bool) {

Callers 15

TestIssue386Function · 0.95
TestCloneOfCOWFunction · 0.95
TestCloneOfCOWRangeFunction · 0.95
TestStringerCOWFunction · 0.95
TestFastCardCOWFunction · 0.95
TestIntersects1COWFunction · 0.95
TestRangePanicCOWFunction · 0.95
TestRangeRemovalCOWFunction · 0.95
TestFlipOnEmptyCOWFunction · 0.95
TestBitmapRankCOWFunction · 0.95

Calls

no outgoing calls

Tested by 15

TestIssue386Function · 0.76
TestCloneOfCOWFunction · 0.76
TestCloneOfCOWRangeFunction · 0.76
TestStringerCOWFunction · 0.76
TestFastCardCOWFunction · 0.76
TestIntersects1COWFunction · 0.76
TestRangePanicCOWFunction · 0.76
TestRangeRemovalCOWFunction · 0.76
TestFlipOnEmptyCOWFunction · 0.76
TestBitmapRankCOWFunction · 0.76