Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 53) sorted by relevance

123

/third_party/flatbuffers/rust/flatbuffers/src/
Dverifier.rs12 index: usize,
13 position: usize,
17 position: usize,
21 position: usize,
55 range: Range<usize>,
61 range: Range<usize>,
66 position: usize,
72 range: Range<usize>,
81 position: usize,
131 fn new_range_oob<T>(start: usize, end: usize) -> Result<T> { in new_range_oob() argument
[all …]
Dprimitives.rs25 pub const FLATBUFFERS_MAX_BUFFER_SIZE: usize = (1u64 << 31) as usize;
27 pub const FILE_IDENTIFIER_LENGTH: usize = 4;
29 pub const VTABLE_METADATA_FIELDS: usize = 2;
31 pub const SIZE_U8: usize = size_of::<u8>();
32 pub const SIZE_I8: usize = size_of::<i8>();
34 pub const SIZE_U16: usize = size_of::<u16>();
35 pub const SIZE_I16: usize = size_of::<i16>();
37 pub const SIZE_U32: usize = size_of::<u32>();
38 pub const SIZE_I32: usize = size_of::<i32>();
40 pub const SIZE_U64: usize = size_of::<u64>();
[all …]
Dvtable.rs26 loc: usize,
36 pub fn init(buf: &'a [u8], loc: usize) -> Self { in init()
39 pub fn num_fields(&self) -> usize { in num_fields() argument
42 pub fn num_bytes(&self) -> usize { in num_bytes() argument
43 unsafe { read_scalar_at::<VOffsetT>(self.buf, self.loc) as usize } in num_bytes()
45 pub fn object_inline_num_bytes(&self) -> usize { in object_inline_num_bytes() argument
47 n as usize in object_inline_num_bytes()
49 pub fn get_field(&self, idx: usize) -> VOffsetT { in get_field()
63 if byte_loc as usize >= self.num_bytes() { in get()
66 unsafe { read_scalar_at::<VOffsetT>(self.buf, self.loc + byte_loc as usize) } in get()
[all …]
Dvector.rs30 pub struct Vector<'a, T: 'a>(&'a [u8], usize, PhantomData<T>);
66 pub fn new(buf: &'a [u8], loc: usize) -> Self { in new()
75 pub fn len(&self) -> usize { in len() argument
76 unsafe { read_scalar_at::<UOffsetT>(&self.0, self.1) as usize } in len()
86 pub fn get(&self, idx: usize) -> T::Inner { in get()
87 debug_assert!(idx < self.len() as usize); in get()
90 T::follow(self.0, self.1 as usize + SIZE_UOFFSET + sz * idx) in get()
106 let len = unsafe { read_scalar_at::<UOffsetT>(&buf, loc) } as usize; in safe_slice()
137 pub fn follow_cast_ref<'a, T: Sized + 'a>(buf: &'a [u8], loc: usize) -> &'a T { in follow_cast_ref()
146 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
[all …]
Darray.rs25 pub struct Array<'a, T: 'a, const N: usize>(&'a [u8], PhantomData<T>);
27 impl<'a, T: 'a, const N: usize> Debug for Array<'a, T, N>
39 impl<'a, T: 'a, const N: usize> Array<'a, T, N> {
51 pub const fn len(&self) -> usize { in len() argument
59 impl<'a, T: Follow<'a> + 'a, const N: usize> Array<'a, T, N> {
61 pub fn get(&self, idx: usize) -> T::Inner { in get()
73 impl<'a, T: Follow<'a> + Debug, const N: usize> Into<[T::Inner; N]> for Array<'a, T, N> {
83 impl<'a, T: Follow<'a> + 'a, const N: usize> Follow<'a> for Array<'a, T, N> {
86 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
91 pub fn emplace_scalar_array<T: EndianScalar, const N: usize>( in emplace_scalar_array()
[all …]
Dbuilder.rs33 pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16;
47 head: usize,
55 min_align: usize,
68 pub fn new_with_capacity(size: usize) -> Self { in new_with_capacity()
75 pub fn with_capacity(size: usize) -> Self { in with_capacity()
139 pub fn collapse(self) -> (Vec<u8>, usize) { in collapse() argument
182 pub fn num_written_vtables(&self) -> usize { in num_written_vtables() argument
227 pub fn start_vector<T: Push>(&mut self, num_items: usize) { in start_vector() argument
242 pub fn end_vector<T: Push>(&mut self, num_elems: usize) -> WIPOffset<Vector<'fbb, T>> { in end_vector()
260 let ptr = offset.value() as usize; in create_shared_string()
[all …]
Dpush.rs29 fn size() -> usize { in size()
40 pub struct PushAlignment(usize);
43 pub fn new(x: usize) -> Self { in new()
47 pub fn value(&self) -> usize { in value() argument
51 pub fn max_of(&self, o: usize) -> Self { in max_of()
Dtable.rs24 pub loc: usize,
29 pub fn new(buf: &'a [u8], loc: usize) -> Self { in new()
42 let o = self.vtable().get(slot_byte_loc) as usize; in get()
53 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
Dfollow.rs32 fn follow(buf: &'buf [u8], loc: usize) -> Self::Inner; in follow()
45 pub fn self_follow(&'a self, buf: &'a [u8], loc: usize) -> T::Inner { in self_follow()
52 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
Dvtable_writer.rs46 debug_assert_eq!(n as usize, self.buf.len()); in write_vtable_byte_length()
63 let idx = vtable_offset as usize; in get_field_offset()
73 let idx = vtable_offset as usize; in write_field_offset()
/third_party/iowow/src/utils/
Diwarr.c181 list->usize = unit_size; in iwulist_init()
210 return iwulist_init(list, IWULIST_ALLOC_UNIT, list->usize); in iwulist_clear()
238 return iwulist_create(list->anum, list->usize); in iwulist_clone()
245 nlist->array = malloc(anum * list->usize); in iwulist_clone()
250 memcpy(nlist->array, list->array + list->start, list->num * list->usize); in iwulist_clone()
251 nlist->usize = list->usize; in iwulist_clone()
265 return list->array + index * list->usize; in iwulist_at()
273 return list->array + index * list->usize; in iwulist_at2()
280 void *nptr = realloc(list->array, anum * list->usize); in iwulist_push()
287 memcpy(list->array + index * list->usize, data, list->usize); in iwulist_push()
[all …]
/third_party/qrcodegen/rust/src/
Dlib.rs213 let datausedbits: usize = loop { in encode_segments_advanced()
215 let datacapacitybits: usize = QrCode::get_num_data_codewords(version, ecl) * 8; in encode_segments_advanced()
216 let dataused: Option<usize> = QrSegment::get_total_bits(segs, version); in encode_segments_advanced()
248 let datacapacitybits: usize = QrCode::get_num_data_codewords(version, ecl) * 8; in encode_segments_advanced()
250 let numzerobits: usize = std::cmp::min(4, datacapacitybits - bb.0.len()); in encode_segments_advanced()
252 let numzerobits: usize = bb.0.len().wrapping_neg() & 7; in encode_segments_advanced()
284 let size = usize::from(ver.value()) * 4 + 17; in encode_codewords()
363 self.modules[(y * self.size + x) as usize] in module()
369 &mut self.modules[(y * self.size + x) as usize] in module_mut()
391 let numalign: usize = alignpatpos.len(); in draw_function_patterns()
[all …]
/third_party/flatbuffers/rust/flexbuffers/src/reader/
Dmap.rs28 pub(super) values_address: usize,
29 pub(super) keys_address: usize,
32 pub(super) length: usize,
48 values_address: usize::default(), in default()
49 keys_address: usize::default(), in default()
52 length: usize::default(), in default()
73 pub fn len(&self) -> usize { in len() argument
84 fn lazy_strcmp(&self, key_addr: usize, key: &str) -> Ordering { in lazy_strcmp() argument
91 pub fn index_key(&self, key: &str) -> Option<usize> { in index_key() argument
117 fn usize_index(&self, i: usize) -> Result<Reader<B>, Error> { in usize_index()
[all …]
Dvector.rs27 pub(super) length: usize,
43 length: usize::default() in default()
50 pub fn len(&self) -> usize { in len() argument
57 fn get_elem_type(&self, i: usize) -> Result<(FlexBufferType, BitWidth), Error> { in get_elem_type()
70 pub fn idx(&self, i: usize) -> Reader<B> { in idx()
74 pub fn index(&self, i: usize) -> Result<Reader<B>, Error> { in index()
Dmod.rs149 address: usize,
169 address: usize::default(), in default()
196 fn safe_sub(a: usize, b: usize) -> Result<usize, Error> { in safe_sub() argument
200 fn deref_offset(buffer: &[u8], address: usize, width: BitWidth) -> Result<usize, Error> { in deref_offset() argument
208 mut address: usize, in new() argument
262 pub fn length(&self) -> usize { in length() argument
276 (self.buffer.as_ptr() as usize).rem(8) == 0 in is_aligned()
350 fn get_key_len(&self) -> Result<usize, Error> { in get_key_len() argument
389 fn get_map_info(&self) -> Result<(usize, BitWidth), Error> { in get_map_info() argument
643 fn read_usize(buffer: &[u8], address: usize, width: BitWidth) -> usize { in read_usize() argument
[all …]
Diter.rs23 pub(super) front: usize,
24 end: usize,
49 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
/third_party/flutter/skia/third_party/externals/wuffs/script/bench-rust-gif-dot-rs/src/
Dmain.rs55 const WIDTH: usize = 1165;
56 const HEIGHT: usize = 859;
57 const BYTES_PER_PIXEL: usize = 3; // Red, green, blue.
58 const NUM_BYTES: usize = WIDTH * HEIGHT * BYTES_PER_PIXEL;
60 const COLOR_TABLE_OFFSET: usize = 13;
61 const GRAPHIC_BLOCK_OFFSET: usize = 782;
113 let num_bytes = gif::lzw::decode_lzw(&colors, code_size as usize, blocks, dst).unwrap(); in decode()
/third_party/flatbuffers/rust/flexbuffers/src/builder/
Dvalue.rs33 Key(usize),
36 address: usize,
46 pub fn $name(n: usize) -> Value {
145 pub fn prefix_length(&self) -> usize { in prefix_length() argument
170 pub fn get_address(&self) -> Option<usize> { in get_address() argument
177 pub fn set_address_or_panic(&mut self, new_address: usize) { in set_address_or_panic() argument
196 pub fn relative_address(self, written_at: usize) -> Option<Value> { in relative_address()
208 pub fn width_in_vector(self, vector_start: usize, idx: usize) -> BitWidth { in width_in_vector() argument
218 let bytes = width as usize + 1; in width_in_vector()
Dser.rs27 nesting: Vec<Option<usize>>,
331 fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq, Self::Error> { in serialize_seq()
335 fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple, Self::Error> { in serialize_tuple()
342 _len: usize, in serialize_tuple_struct() argument
352 _len: usize, in serialize_tuple_variant() argument
359 fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap, Self::Error> { in serialize_map()
366 _len: usize, in serialize_struct() argument
376 _len: usize, in serialize_struct_variant() argument
492 fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq, Error> { in serialize_seq()
495 fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple, Error> { in serialize_tuple()
[all …]
/third_party/flatbuffers/rust/flexbuffers/src/
Dbitwidth.rs45 pub fn n_bytes(self) -> usize { in n_bytes() argument
46 1 << self as usize in n_bytes()
48 pub fn from_nbytes(n: impl std::convert::Into<usize>) -> Option<Self> { in from_nbytes()
86 impl_bitwidth_from!(usize, u64, u32, u16, u8);
110 for _ in 0..alignment as usize { in align()
/third_party/flutter/skia/third_party/externals/wuffs/script/bench-rust-gif/src/
Dmain.rs46 const WIDTH: usize = 1165;
47 const HEIGHT: usize = 859;
48 const BYTES_PER_PIXEL: usize = 1; // Palette index.
49 const NUM_BYTES: usize = WIDTH * HEIGHT * BYTES_PER_PIXEL;
/third_party/flatbuffers/tests/include_test/sub/
Dinclude_test2_generated.rs73 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
106 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
136 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
143 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
172 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
223 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
253 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
/third_party/musl/porting/linux/user/src/malloc/
Dmemalign.c53 n->usize = len; in __memalign()
72 c->usize = OVERHEAD; in __memalign()
75 n->usize = len; in __memalign()
Dmalloc.c330 return (((size_t)c) ^ c->csize ^ c->usize ^ (c->state & M_STATE_MASK)) << M_CHECKSUM_SHIFT; in chunk_checksum_calculate()
372 char * start = ((char *)CHUNK_TO_MEM(c)) + c->usize; in chunk_poison_set()
373 size_t size = CHUNK_SIZE(c) - OVERHEAD - c->usize; in chunk_poison_set()
383 size_t padding_size = csize - OVERHEAD - c->usize; in chunk_poison_check()
384 char *start = (char *)c + OVERHEAD + c->usize; in chunk_poison_check()
464 w->usize = POINTER_USAGE; in expand_heap()
600 split->usize = POINTER_USAGE; in pretrim()
623 split->usize = POINTER_USAGE; in trim()
666 c->usize = user_size; in internal_malloc()
717 c->usize = user_size; in internal_malloc()
[all …]
/third_party/flatbuffers/tests/namespace_test/
Dnamespace_test1_generated.rs74 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
107 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
213 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
246 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
277 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
284 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
313 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()
413 fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { in follow()
453 v: &mut flatbuffers::Verifier, pos: usize in run_verifier()

123