// AddSet adds all elements in another set.
323529
func (gs *groupSet) AddSet(gs2 *groupSet) {
	// acquire locks in order
	p1 := uintptr(unsafe.Pointer(gs))
	p2 := uintptr(unsafe.Pointer(gs2))
	switch {
	case p1 < p2:
		gs.Lock()
		gs2.Lock()
		defer gs.Unlock()
		defer gs2.Unlock()
	case p1 > p2:
		gs2.Lock()
		gs.Lock()
		defer gs2.Unlock()
		defer gs.Unlock()
	default:
		return // they're the same!
	}

	for g := range gs2.m {
		gs.m[g] = struct{}{}
	}
}
1250801
func (s *SyncedSet) Add(datas ...interface{}) {
	s.Lock()
	defer s.Unlock()
	for _, data := range datas {
		s.set[data] = true
	}
}
248043
func (tree *MutableTree) Set(key, value []byte) bool {
	orphaned, updated := tree.set(key, value)
	tree.addOrphans(orphaned)
	return updated
}
830503
func (db *RedisDB) setSet(k string, set setKey) {
	db.keys[k] = "set"
	db.setKeys[k] = set
	db.keyVersion[k]++
}
1185013
func (b *RWSetBuilder) AddToReadSet(ns string, key string, version *version.Height) {
	nsPubRwBuilder := b.getOrCreateNsPubRwBuilder(ns)
	nsPubRwBuilder.readMap[key] = NewKVRead(key, version)
}
262806
func (s *Set) Add(item interface{}) {
	s.lock.Lock()
	defer s.lock.Unlock()
	s.items[item] = struct{}{}
}
898593
func (r *DB) set(data interface{}, allowed ...string) string {
	set := r.setMap(data, allowed...)
	return r.setImplode(", ", set)
}
394155
func NewSet(items ...interface{}) Set {
	res := setImpl{
		data: make(map[interface{}]struct{}),
	}
	for _, item := range items {
		res.Add(item)
	}
	return res
}
1191668
func (s *Set) IsSet(name interface{}) bool {
	if opt := s.Lookup(name); opt != nil {
		return opt.Seen()
	}
	return false
}
286431
func (c *Strings) Set(value string) error {
	*c = append(*c, value)
	return nil
}
1086050
func (s *stringSet) Add(vs ...string) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
831106
func NewSet(f SchemaSetFunc, items []interface{}) *Set {
	s := &Set{F: f}
	for _, i := range items {
		s.Add(i)
	}

	return s
}
642035
func (b *Bitset) Append(other *Bitset) {
	b.ensureCapacity(other.numBits)

	for i := 0; i < other.numBits; i++ {
		if other.At(i) {
			b.bits[b.numBits/8] |= 0x80 >> uint(b.numBits%8)
		}
		b.numBits++
	}
}
552876
func AddLinkSet(linkSet *(map[string]Link), obj ModelObj) error {
	// Allocate the linkset if its nil
	if *linkSet == nil {
		*linkSet = make(map[string]Link)
	}

	// add the link to map
	(*linkSet)[obj.GetKey()] = Link{
		ObjType: obj.GetType(),
		ObjKey:  obj.GetKey(),
	}

	return nil
}
716813
func (cb *CommonBlock) Set(other Block) {
	otherCommon := other.ToCommonBlock()
	cb.IsInd = otherCommon.IsInd
	cb.UnknownFieldSetHandler = otherCommon.UnknownFieldSetHandler
	cb.SetEncodedSize(otherCommon.GetEncodedSize())
}
1340001
func (s *Set) PowerSet() *Set {
	// If set is empty, return set of empty set
	if s.Size() == 0 {
		pSet := New()
		pSet.Add(New())
		return pSet
	}

	// Call the recursive powerSet function on a clone of this set
	return powerSet(s.Clone())
}
745953
func (s *AttributeValue) SetS(v string) *AttributeValue {
	s.S = &v
	return s
}