MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / set_bit

Method set_bit

Tools/BitVector.h:193–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 return (bytes[i/8] >> (i % 8)) & 1;
192 }
193 void set_bit(int i,unsigned int a)
194 {
195 if ((size_t)i >= nbits)
196 throw overflow("BitVector", i, nbits);
197 int j = i/8, k = i&7;
198 if (a==1)
199 { bytes[j] |= (octet)(1UL<<k); }
200 else
201 { bytes[j] &= (octet)~(1UL<<k); }
202 }
203
204 void add(const BitVector& A, const BitVector& B)
205 {

Callers 1

operator=Method · 0.45

Calls 1

overflowClass · 0.85

Tested by

no test coverage detected