Function toggleSet [src]

Flips all bits in this bit set which are present in the toggles bit set. Both sets must have the same bit_length.

Prototype

pub fn toggleSet(self: *Self, toggles: Self) void

Parameters

self: *Selftoggles: Self

Source

pub fn toggleSet(self: *Self, toggles: Self) void { assert(toggles.bit_length == self.bit_length); const num_masks = numMasks(self.bit_length); for (self.masks[0..num_masks], 0..) |*mask, i| { mask.* ^= toggles.masks[i]; } }