// CreateBitset initializes a bit set with 2^numBitsWide bits
962210
func CreateBitset(numBitsWide uint) *bitset.BitSet {
	maxSize := 1 << numBitsWide
	return bitset.New(uint(maxSize))
}
673034
func (fds *FDSet) Set(fd uintptr) {
	fds.X__fds_bits[fd/NFDBITS] |= (1 << (fd % NFDBITS))
}
512820
func NewBitArray(bits int) *BitArray {
	if bits <= 0 {
		return nil
	}
	return &BitArray{
		Bits:  bits,
		Elems: make([]uint64, (bits+63)/64),
	}
}
1141438
func (k *kubernetesClient) createStatefulSet(spec *apps.StatefulSet) error {
	_, err := k.client().AppsV1().StatefulSets(k.namespace).Create(spec)
	return errors.Trace(err)
}
1317508
func New(length uint) (bset *BitSet) {
	defer func() {
		if r := recover(); r != nil {
			bset = &BitSet{
				0,
				make([]uint64, 0),
			}
		}
	}()

	bset = &BitSet{
		length,
		make([]uint64, wordsNeeded(length)),
	}

	return bset
}
1189251
func (b *BitSet) Set(o int) {
	bucketID := o / 8
	oInBucket := uint8(o % 8)
	if o >= b.size {
		return
	}
	b.set[bucketID] = (b.set[bucketID] | 0x1<<oInBucket)
}
1341446
func (b *Bitmap) Set(index int, value bool) {
	byteIndex := index / 8
	bitMask := byte(1 << (uint(index) & 0x7))
	if value {
		b.data[byteIndex] |= bitMask
	} else {
		b.data[byteIndex] &= 0xff - bitMask
	}
}
728322
func (b *Bitset) SetAll(value int) {
	for i := 0; i < b.size; i++ {
		b.setImpl(i, value)
	}
}
786327
func (b *Generator) Bitset(idx uint) ([]byte, error) {
	if b.nextSec != b.sections {
		return nil, errors.New("bloom not fully generated yet")
	}
	if idx >= types.BloomBitLength {
		return nil, errBloomBitOutOfBounds
	}
	return b.blooms[idx], nil
}
318998
func Set(z *big.Int, z1, z0 uint64) *big.Int {
	ww := makeWord(z.Bits(), 128/bits.UintSize)
	if bits.UintSize == 32 {
		ww[3] = big.Word(z1 >> 32)
		ww[2] = big.Word(z1)
		ww[1] = big.Word(z0 >> 32)
		ww[0] = big.Word(z0)
	} else {
		ww[1] = big.Word(z1)
		ww[0] = big.Word(z0)
	}
	return z.SetBits(ww)
}
106665
func NewBigInts(size int) *BigInts {
	return &BigInts{
		bigints: make([]*big.Int, size),
	}
}
1053816
func (bitmap *bitmap) set(index int, bit int) {
	if index >= bitmap.Size {
		panic("index out of range")
	}

	div, mod := index>>3, index&0x07
	shift := byte(1 << uint(7-mod))

	bitmap.data[div] &= ^shift
	if bit > 0 {
		bitmap.data[div] |= shift
	}
}
1366402
func (s *WavSettings) SetBitDepth(v int64) *WavSettings {
	s.BitDepth = &v
	return s
}
817930
func (b *BitSet) Set(i uint) *BitSet {
	b.extendSetMaybe(i)
	b.set[i>>log2WordSize] |= 1 << (i & (wordSize - 1))
	return b
}
973270
func (c *daemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
	result = &v1beta2.DaemonSet{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("daemonsets").
		Body(daemonSet).
		Do().
		Into(result)
	return
}
1318011
func (b *bitReader) init(in []byte) error {
	if len(in) < 1 {
		return errors.New("corrupt stream: too short")
	}
	b.in = in
	b.off = uint(len(in))
	// The highest bit of the last byte indicates where to start
	v := in[len(in)-1]
	if v == 0 {
		return errors.New("corrupt stream, did not find end of stream")
	}
	b.bitsRead = 64
	b.value = 0
	b.fill()
	b.fill()
	b.bitsRead += 8 - uint8(highBits(uint32(v)))
	return nil
}
859175
func (s *Bitset) Bits() []uint {
	res := make([]uint, s.BitCount())
	index := 0
	for i, l := Uint0, s.length; i < l; i++ {
		if s.IsSet(i) {
			res[index] = i
			index++
		}
	}

	return res
}