Home
last modified time | relevance | path

Searched refs:bit_index (Results 1 – 25 of 65) sorted by relevance

123

/external/cronet/stable/base/allocator/partition_allocator/src/partition_alloc/
Dfreeslot_bitmap.h39 size_t bit_index = in GetFreeSlotBitmapCellPtrAndBitIndex() local
41 PA_DCHECK(bit_index < kFreeSlotBitmapBitsPerCell); in GetFreeSlotBitmapCellPtrAndBitIndex()
42 return {reinterpret_cast<FreeSlotBitmapCellType*>(cell_addr), bit_index}; in GetFreeSlotBitmapCellPtrAndBitIndex()
62 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapSlotIsUsed()
63 return (*cell & CellWithAOne(bit_index)) == 0; in FreeSlotBitmapSlotIsUsed()
69 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapMarkSlotAsUsed()
70 *cell &= ~CellWithAOne(bit_index); in FreeSlotBitmapMarkSlotAsUsed()
76 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapMarkSlotAsFree()
77 *cell |= CellWithAOne(bit_index); in FreeSlotBitmapMarkSlotAsFree()
91 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapReset()
[all …]
Daddress_pool_manager.cc477 size_t bit_index = 0; in CountUsedSuperPages() local
480 for (size_t super_page_index = 0; bit_index < bitsize; ++super_page_index) { in CountUsedSuperPages()
482 for (bit_index = super_page_index * bits_per_super_page; in CountUsedSuperPages()
483 bit_index < (super_page_index + 1) * bits_per_super_page && in CountUsedSuperPages()
484 bit_index < bitsize; in CountUsedSuperPages()
485 ++bit_index) { in CountUsedSuperPages()
486 if (bitmap[bit_index]) { in CountUsedSuperPages()
/external/cronet/tot/base/allocator/partition_allocator/src/partition_alloc/
Dfreeslot_bitmap.h39 size_t bit_index = in GetFreeSlotBitmapCellPtrAndBitIndex() local
41 PA_DCHECK(bit_index < kFreeSlotBitmapBitsPerCell); in GetFreeSlotBitmapCellPtrAndBitIndex()
42 return {reinterpret_cast<FreeSlotBitmapCellType*>(cell_addr), bit_index}; in GetFreeSlotBitmapCellPtrAndBitIndex()
62 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapSlotIsUsed()
63 return (*cell & CellWithAOne(bit_index)) == 0; in FreeSlotBitmapSlotIsUsed()
69 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapMarkSlotAsUsed()
70 *cell &= ~CellWithAOne(bit_index); in FreeSlotBitmapMarkSlotAsUsed()
76 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapMarkSlotAsFree()
77 *cell |= CellWithAOne(bit_index); in FreeSlotBitmapMarkSlotAsFree()
91 auto [cell, bit_index] = GetFreeSlotBitmapCellPtrAndBitIndex(slot_start); in FreeSlotBitmapReset()
[all …]
Daddress_pool_manager.cc477 size_t bit_index = 0; in CountUsedSuperPages() local
480 for (size_t super_page_index = 0; bit_index < bitsize; ++super_page_index) { in CountUsedSuperPages()
482 for (bit_index = super_page_index * bits_per_super_page; in CountUsedSuperPages()
483 bit_index < (super_page_index + 1) * bits_per_super_page && in CountUsedSuperPages()
484 bit_index < bitsize; in CountUsedSuperPages()
485 ++bit_index) { in CountUsedSuperPages()
486 if (bitmap[bit_index]) { in CountUsedSuperPages()
/external/openthread/third_party/tcplp/lib/
Dbitmap.c140 size_t bit_index = i & 0x7; // Amount to left shift to get bit in MSB in bmp_read_bit() local
141 return ((uint8_t) (buf[byte_index] << bit_index)) >> 7; in bmp_read_bit()
146 size_t bit_index = i & 0x7; // Amount to left shift to get bit in MSB in bmp_write_bit() local
147 size_t bit_shift = 7 - bit_index; // Amount to right shift to get bit in LSB in bmp_write_bit()
153 size_t bit_index = i & 0x7; // Amount to left shift to get bit in MSB in bmp_read_byte() local
154 if (bit_index == 0) { in bmp_read_byte()
157 return (buf[byte_index] << bit_index) | (buf[byte_index + 1] >> (8 - bit_index)); in bmp_read_byte()
162 size_t bit_index = i & 0x7; // Amount to left shift to get bit in MSB in bmp_write_byte() local
163 if (bit_index == 0) { in bmp_write_byte()
167 buf[byte_index] = (buf[byte_index] & (0xFF << (8 - bit_index))) | (byte >> bit_index); in bmp_write_byte()
[all …]
/external/libsrtp2/crypto/math/
Ddatatypes.c242 const int bit_index = shift & 31; in v128_right_shift() local
251 if (bit_index == 0) { in v128_right_shift()
261 b = x->v32[from] << bit_index; in v128_right_shift()
263 b |= x->v32[from - 1] >> (32 - bit_index); in v128_right_shift()
277 const int bit_index = shift & 31; in v128_left_shift() local
284 if (bit_index == 0) { in v128_left_shift()
289 x->v32[i] = (x->v32[i + base_index] >> bit_index) ^ in v128_left_shift()
290 (x->v32[i + base_index + 1] << (32 - bit_index)); in v128_left_shift()
291 x->v32[4 - base_index - 1] = x->v32[4 - 1] >> bit_index; in v128_left_shift()
303 int bitvector_get_bit(const bitvector_t *v, int bit_index) in bitvector_get_bit() argument
[all …]
/external/libsrtp2/crypto/include/
Ddatatypes.h334 #define _bitvector_get_bit(v, bit_index) \ argument
335 (((((v)->word[((bit_index) >> 5)]) >> ((bit_index)&31)) & 1))
337 #define _bitvector_set_bit(v, bit_index) \ argument
338 ((((v)->word[((bit_index) >> 5)] |= ((uint32_t)1 << ((bit_index)&31)))))
340 #define _bitvector_clear_bit(v, bit_index) \ argument
341 ((((v)->word[((bit_index) >> 5)] &= ~((uint32_t)1 << ((bit_index)&31)))))
347 #define bitvector_get_bit(v, bit_index) _bitvector_get_bit(v, bit_index) argument
348 #define bitvector_set_bit(v, bit_index) _bitvector_set_bit(v, bit_index) argument
349 #define bitvector_clear_bit(v, bit_index) _bitvector_clear_bit(v, bit_index) argument
354 int bitvector_get_bit(const bitvector_t *v, int bit_index);
[all …]
/external/cronet/tot/base/memory/
Dprotected_memory_unittest.cc46 const auto check_bit_not_writeable = [=](const size_t bit_index) { in VerifyByteSequenceIsNotWriteable() argument
47 const size_t byte_index = bit_index / CHAR_BIT; in VerifyByteSequenceIsNotWriteable()
48 const size_t local_bit_index = bit_index % CHAR_BIT; in VerifyByteSequenceIsNotWriteable()
52 << " at bit " << bit_index << " of " << number_of_bits; in VerifyByteSequenceIsNotWriteable()
65 for (size_t bit_index = bit_increment; bit_index < (number_of_bits - 1); in VerifyByteSequenceIsNotWriteable() local
66 bit_index += bit_increment) { in VerifyByteSequenceIsNotWriteable()
67 check_bit_not_writeable(bit_index); in VerifyByteSequenceIsNotWriteable()
/external/cronet/stable/base/memory/
Dprotected_memory_unittest.cc46 const auto check_bit_not_writeable = [=](const size_t bit_index) { in VerifyByteSequenceIsNotWriteable() argument
47 const size_t byte_index = bit_index / CHAR_BIT; in VerifyByteSequenceIsNotWriteable()
48 const size_t local_bit_index = bit_index % CHAR_BIT; in VerifyByteSequenceIsNotWriteable()
52 << " at bit " << bit_index << " of " << number_of_bits; in VerifyByteSequenceIsNotWriteable()
65 for (size_t bit_index = bit_increment; bit_index < (number_of_bits - 1); in VerifyByteSequenceIsNotWriteable() local
66 bit_index += bit_increment) { in VerifyByteSequenceIsNotWriteable()
67 check_bit_not_writeable(bit_index); in VerifyByteSequenceIsNotWriteable()
/external/protobuf/src/google/protobuf/compiler/javanano/
Djavanano_helpers.cc528 std::string GetBitFieldNameForBit(int bit_index) { in GetBitFieldNameForBit() argument
529 return GetBitFieldName(bit_index / 32); in GetBitFieldNameForBit()
532 std::string GenerateGetBit(int bit_index) { in GenerateGetBit() argument
533 std::string var_name = GetBitFieldNameForBit(bit_index); in GenerateGetBit()
534 int bit_in_var_index = bit_index % 32; in GenerateGetBit()
541 std::string GenerateSetBit(int bit_index) { in GenerateSetBit() argument
542 std::string var_name = GetBitFieldNameForBit(bit_index); in GenerateSetBit()
543 int bit_in_var_index = bit_index % 32; in GenerateSetBit()
550 std::string GenerateClearBit(int bit_index) { in GenerateClearBit() argument
551 std::string var_name = GetBitFieldNameForBit(bit_index); in GenerateClearBit()
[all …]
Djavanano_helpers.h157 std::string GetBitFieldNameForBit(int bit_index);
162 std::string GenerateGetBit(int bit_index);
167 std::string GenerateSetBit(int bit_index);
172 std::string GenerateClearBit(int bit_index);
178 std::string GenerateDifferentBit(int bit_index);
/external/icing/icing/file/
Dfile-backed-bitmap.cc202 libtextclassifier3::Status FileBackedBitmap::Set(int bit_index, in Set() argument
204 if (bit_index >= NumBits()) { in Set()
207 libtextclassifier3::Status status = GrowTo(bit_index); in Set()
220 const int word_index = bit_index / kNumWordBits; in Set()
221 const int word_mask = 1u << (bit_index % kNumWordBits); in Set()
233 libtextclassifier3::StatusOr<bool> FileBackedBitmap::Get(int bit_index) const { in Get()
234 if (bit_index >= NumBits()) { in Get()
237 file_path_.c_str(), NumBits(), bit_index)); in Get()
240 const Word word_index = bit_index / kNumWordBits; in Get()
241 const Word word_mask = 1u << (bit_index % kNumWordBits); in Get()
Dfile-backed-bitmap.h101 libtextclassifier3::Status Set(int bit_index, bool bit_value);
106 libtextclassifier3::StatusOr<bool> Get(int bit_index) const;
/external/trusty/arm-trusted-firmware/drivers/nxp/clk/s32cc/
Dmc_rgm.c28 int bit_index; in mc_rgm_periph_reset() local
35 bit_index = __builtin_ffs(mask); in mc_rgm_periph_reset()
36 if (bit_index < 1) { in mc_rgm_periph_reset()
40 i = (uint32_t)bit_index - 1U; in mc_rgm_periph_reset()
/external/rust/android-crates-io/crates/bindgen/codegen/
Dbitfield_unit.rs25 let bit_index = if cfg!(target_endian = "big") { in get_bit() localVariable
31 let mask = 1 << bit_index; in get_bit()
43 let bit_index = if cfg!(target_endian = "big") { in set_bit() localVariable
49 let mask = 1 << bit_index; in set_bit()
/external/cronet/stable/third_party/abseil-cpp/absl/debugging/internal/
Dbounded_utf8_length_sequence.h63 const uint32_t bit_index = 2 * (index % 32); in InsertAndReturnSumOfPredecessors() local
64 const uint64_t ones_bit = uint64_t{1} << bit_index; in InsertAndReturnSumOfPredecessors()
99 (uint64_t{utf8_length - 1} << bit_index) | in InsertAndReturnSumOfPredecessors()
/external/angle/third_party/abseil-cpp/absl/debugging/internal/
Dbounded_utf8_length_sequence.h63 const uint32_t bit_index = 2 * (index % 32); in InsertAndReturnSumOfPredecessors() local
64 const uint64_t ones_bit = uint64_t{1} << bit_index; in InsertAndReturnSumOfPredecessors()
99 (uint64_t{utf8_length - 1} << bit_index) | in InsertAndReturnSumOfPredecessors()
/external/cronet/tot/third_party/abseil-cpp/absl/debugging/internal/
Dbounded_utf8_length_sequence.h63 const uint32_t bit_index = 2 * (index % 32); in InsertAndReturnSumOfPredecessors() local
64 const uint64_t ones_bit = uint64_t{1} << bit_index; in InsertAndReturnSumOfPredecessors()
99 (uint64_t{utf8_length - 1} << bit_index) | in InsertAndReturnSumOfPredecessors()
/external/abseil-cpp/absl/debugging/internal/
Dbounded_utf8_length_sequence.h63 const uint32_t bit_index = 2 * (index % 32); in InsertAndReturnSumOfPredecessors() local
64 const uint64_t ones_bit = uint64_t{1} << bit_index; in InsertAndReturnSumOfPredecessors()
99 (uint64_t{utf8_length - 1} << bit_index) | in InsertAndReturnSumOfPredecessors()
/external/tinyalsa/
Dtinypcminfo.c95 static inline const char *pcm_get_format_name(unsigned bit_index) in pcm_get_format_name() argument
97 return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; in pcm_get_format_name()
/external/cronet/stable/net/disk_cache/blockfile/
Dbitmap.cc203 const int bit_index = *index; in FindNextBit() local
204 if (bit_index >= limit || limit <= 0) in FindNextBit()
208 int word_index = bit_index >> kLogIntBits; in FindNextBit()
214 if (Get(bit_index) == value) in FindNextBit()
217 const int first_bit_offset = bit_index & (kIntBits - 1); in FindNextBit()
/external/cronet/tot/net/disk_cache/blockfile/
Dbitmap.cc203 const int bit_index = *index; in FindNextBit() local
204 if (bit_index >= limit || limit <= 0) in FindNextBit()
208 int word_index = bit_index >> kLogIntBits; in FindNextBit()
214 if (Get(bit_index) == value) in FindNextBit()
217 const int first_bit_offset = bit_index & (kIntBits - 1); in FindNextBit()
/external/tinyalsa_new/utils/
Dtinypcminfo.c98 static inline const char *pcm_get_format_name(unsigned bit_index) in pcm_get_format_name() argument
100 return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; in pcm_get_format_name()
/external/rust/android-crates-io/crates/bit_field/src/
Dlib.rs289 let bit_index = bit % T::BIT_LENGTH; in get_bit() localVariable
290 self[slice_index].get_bit(bit_index) in get_bit()
326 let bit_index = bit % T::BIT_LENGTH; in set_bit() localVariable
327 self[slice_index].set_bit(bit_index, value); in set_bit()
/external/blktrace/iowatcher/
Dplot.c197 int bit_index; in set_gdd_bit() local
214 bit_index = row_int * gdd->cols + col_int; in set_gdd_bit()
215 arr_index = bit_index / 8; in set_gdd_bit()
216 bit_mod = bit_index % 8; in set_gdd_bit()
987 int bit_index; in svg_io_graph_movie() local
998 bit_index = row * gdd->cols + col; in svg_io_graph_movie()
999 arr_index = bit_index / 8; in svg_io_graph_movie()
1000 bit_mod = bit_index % 8; in svg_io_graph_movie()
1026 int bit_index; in svg_io_graph() local
1031 bit_index = row * gdd->cols + col; in svg_io_graph()
[all …]

123