Home
last modified time | relevance | path

Searched refs:mask_t (Results 1 – 2 of 2) sorted by relevance

/system/core/init/
Dkeychords.cpp50 Keychords::Mask::Mask(size_t bit) : bits_((bit + sizeof(mask_t) - 1) / sizeof(mask_t), 0) {} in Mask()
53 auto idx = bit / (kBitsPerByte * sizeof(mask_t)); in SetBit()
56 bits_[idx] |= mask_t(1) << (bit % (kBitsPerByte * sizeof(mask_t))); in SetBit()
58 bits_[idx] &= ~(mask_t(1) << (bit % (kBitsPerByte * sizeof(mask_t)))); in SetBit()
63 auto idx = bit / (kBitsPerByte * sizeof(mask_t)); in GetBit()
64 return bits_[idx] & (mask_t(1) << (bit % (kBitsPerByte * sizeof(mask_t)))); in GetBit()
68 return bits_.size() * sizeof(mask_t); in bytesize()
76 return bits_.size() * sizeof(mask_t) * kBitsPerByte; in size()
80 auto idx = bit / (kBitsPerByte * sizeof(mask_t)); in resize()
Dkeychords.h61 typedef unsigned int mask_t; typedef
64 std::vector<mask_t> bits_;