Home
last modified time | relevance | path

Searched refs:to_vec (Results 1 – 25 of 118) sorted by relevance

12345

/external/mesa3d/src/mesa/math/
Dm_xform_tmp.h74 TAG(transform_points1_general)( GLvector4f *to_vec, in TAG()
80 GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; in TAG()
94 to_vec->size = 4; in TAG()
95 to_vec->flags |= VEC_SIZE_4; in TAG()
96 to_vec->count = from_vec->count; in TAG()
100 TAG(transform_points1_identity)( GLvector4f *to_vec, in TAG()
107 GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; in TAG()
110 if (to_vec == from_vec) return; in TAG()
114 to_vec->size = 1; in TAG()
115 to_vec->flags |= VEC_SIZE_1; in TAG()
[all …]
/external/rust/crates/serde_cbor/tests/
Dser.rs48 use serde_cbor::{from_slice, to_vec};
54 assert_eq!(&to_vec(&value).unwrap()[..], b"ffoobar"); in test_string()
60 assert_eq!(&to_vec(&value).unwrap()[..], b"\x83\x01\x02\x03"); in test_list()
71 let vec = to_vec(&object).unwrap(); in test_object()
85 let vec = to_vec(&serde_cbor::value::to_value(object.clone()).unwrap()).unwrap(); in test_object_list_keys()
115 let vec = to_vec(&serde_cbor::value::to_value(object.clone()).unwrap()).unwrap(); in test_object_object_keys()
129 let vec = to_vec(&12.3f64).unwrap(); in test_float()
135 let vec = to_vec(&4000.5f32).unwrap(); in test_f32()
141 let vec = to_vec(&::std::f64::INFINITY).unwrap(); in test_infinity()
147 let vec = to_vec(&::std::f64::NEG_INFINITY).unwrap(); in test_neg_infinity()
[all …]
Denum.rs36 use serde_cbor::{from_slice, to_vec};
61 let raw = &to_vec(&enum_struct).unwrap(); in test_enum()
82 let re: ReprEnumStruct = from_slice(&to_vec(&repr_enum_struct).unwrap()).unwrap(); in test_repr_enum()
96 let re_a: DataEnum = from_slice(&to_vec(&data_enum_a).unwrap()).unwrap(); in test_data_enum()
99 let re_b: DataEnum = from_slice(&to_vec(&data_enum_b).unwrap()).unwrap(); in test_data_enum()
105 println!("{:?}", &to_vec(&data_enum_c).unwrap()); in test_data_enum()
106 let re_c: DataEnum = from_slice(&to_vec(&data_enum_c).unwrap()).unwrap(); in test_data_enum()
128 assert_eq!(to_vec(&142u8).unwrap(), to_vec(&Newtype(142u8)).unwrap()); in test_newtype_struct()
190 let empty_s = to_vec(&Bar::Empty).unwrap(); in test_enum_as_map()
194 let number_s = to_vec(&Bar::Number(42)).unwrap(); in test_enum_as_map()
[all …]
Dde.rs52 use serde_cbor::{de, error, to_vec, Deserializer};
84 assert_eq!(value.unwrap(), Value::Bytes(b"foobar".to_vec())); in test_byte_string()
195 assert_eq!(value.unwrap(), Value::Bytes(b"\x01#Eg".to_vec())); in test_indefinite_byte_string()
202 _test_multiple_indefinite_strings(de::from_mut_slice(input.to_vec().as_mut())); in test_multiple_indefinite_strings()
212 Value::Bytes(b"\x01#Eg".to_vec()) in _test_multiple_indefinite_strings()
294 let v = to_vec(&obj1).unwrap(); in test_option_roundtrip()
305 let v = to_vec(&obj1).unwrap(); in test_option_none_roundtrip()
331 &to_vec(&de::from_slice::<Value>(expected).unwrap()).unwrap(), in test_object_determinism_roundtrip()
369 let mut mutcopy = slice[..*end_of_slice].to_vec(); in stream_deserializer_eof_in_indefinite()
732 let buf = to_vec(&ip).unwrap(); in test_ipaddr_deserialization()
Dtags.rs4 use serde_cbor::{from_slice, to_vec};
43 let bytes2 = to_vec(&value1).unwrap(); in tagged_cbor_roundtrip()
Dstd_types.rs9 use serde_cbor::ser::{to_vec, to_vec_packed};
27 assert_eq!(to_vec(&expr).unwrap(), serialized);
56 to_vec(&expr).expect("ser1 works"),
/external/crosvm/devices/src/virtio/input/
Ddefaults.rs18 b"Crosvm Virtio Trackpad".to_vec(), in new_trackpad_config()
19 b"virtio-trackpad".to_vec(), in new_trackpad_config()
31 b"Crosvm Virtio Mouse".to_vec(), in new_mouse_config()
32 b"virtio-mouse".to_vec(), in new_mouse_config()
44 b"Crosvm Virtio Keyboard".to_vec(), in new_keyboard_config()
45 b"virtio-keyboard".to_vec(), in new_keyboard_config()
56 b"Crosvm Virtio Switches".to_vec(), in new_switches_config()
57 b"virtio-switches".to_vec(), in new_switches_config()
69 b"Crosvm Virtio Touchscreen".to_vec(), in new_single_touch_config()
70 b"virtio-touchscreen".to_vec(), in new_single_touch_config()
[all …]
/external/rust/crates/quiche/src/
Doctets.rs186 let mut vec = self.get_bytes(len)?.to_vec(); in get_varint()
299 pub fn to_vec(&self) -> Vec<u8> { in to_vec() method
300 self.as_ref().to_vec() in to_vec()
405 let mut vec = self.get_bytes(len)?.to_vec(); in get_varint()
627 pub fn to_vec(&self) -> Vec<u8> { in to_vec() method
628 self.as_ref().to_vec() in to_vec()
1067 let mut d = b"helloworld".to_vec(); in split()
1093 let mut d = b"helloworld".to_vec(); in split_at()
1099 let mut exp1 = b"hello".to_vec(); in split_at()
1102 let mut exp2 = b"world".to_vec(); in split_at()
[all …]
/external/crosvm/acpi_tables/src/
Daml.rs131 bytes.append(&mut part.to_vec()); in to_aml_bytes()
174 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
183 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
192 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
455 bytes.append(&mut 9u16.to_le_bytes().to_vec()); in to_aml_bytes()
459 bytes.append(&mut self.base.to_le_bytes().to_vec()); in to_aml_bytes()
460 bytes.append(&mut self.length.to_le_bytes().to_vec()); in to_aml_bytes()
522 bytes.append(&mut (length as u16).to_le_bytes().to_vec()); in push_header()
538 bytes.append(&mut 0u16.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
539 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
[all …]
/external/rust/crates/tokio/tests/
Dio_read_until.rs36 let mut chunk = b"We say ".to_vec(); in read_until_not_all_ready()
41 chunk = b"I solve ".to_vec(); in read_until_not_all_ready()
66 let mut chunk = b"Foo".to_vec(); in read_until_fail()
/external/crosvm/protos/tests/
Dtrunks.rs15 request.set_command(b"...".to_vec()); in send_command_request()
22 response.set_response(b"...".to_vec()); in send_command_response()
/external/rust/crates/android_logger/src/
Dlib.rs512 let mut expected_result = [b'a'; LOGGING_TAG_MAX_LEN - 2].to_vec(); in fill_tag_bytes_truncates_long_tag()
514 assert_eq!(result.to_vec(), expected_result); in fill_tag_bytes_truncates_long_tag()
525 let mut expected_result = short_tag.to_vec(); in fill_tag_bytes_keeps_short_tag()
527 assert_eq!(result.to_vec()[..4], expected_result); in fill_tag_bytes_keeps_short_tag()
555 assert_eq!(&writer.buffer.to_vec()[..writer.len], "\n90".as_bytes()); in temporal_flush()
598 writer.buffer[..log_string.len()].to_vec(), in output_specified_len_leaves_buffer_unchanged()
612 assert_eq!(writer.buffer[..10].to_vec(), "3423456789".as_bytes()); in copy_bytes_to_start()
627 writer.buffer[..test_string.len()].to_vec(), in copy_bytes_to_start_nop()
/external/rust/crates/quiche/examples/
Dserver.rs269 clients.insert(scid.to_vec(), (src, client)); in main()
391 std::net::IpAddr::V4(a) => a.octets().to_vec(), in mint_token()
392 std::net::IpAddr::V6(a) => a.octets().to_vec(), in mint_token()
422 std::net::IpAddr::V4(a) => a.octets().to_vec(), in validate_token()
423 std::net::IpAddr::V6(a) => a.octets().to_vec(), in validate_token()
441 let uri = String::from_utf8(uri.to_vec()).unwrap(); in handle_stream()
460 .unwrap_or_else(|_| b"Not Found!\r\n".to_vec()); in handle_stream()
Dhttp3-server.rs278 clients.insert(scid.to_vec(), (src, client)); in main()
448 std::net::IpAddr::V4(a) => a.octets().to_vec(), in mint_token()
449 std::net::IpAddr::V6(a) => a.octets().to_vec(), in mint_token()
479 std::net::IpAddr::V4(a) => a.octets().to_vec(), in validate_token()
480 std::net::IpAddr::V6(a) => a.octets().to_vec(), in validate_token()
589 Err(_) => (404, b"Not Found!".to_vec()), in build_response()
/external/rust/crates/memchr/src/tests/
Dmod.rs29 needles: statict.needles.to_vec(), in memchr_tests()
30 positions: statict.positions.to_vec(), in memchr_tests()
335 let mut needles = self.needles.to_vec(); in needles()
350 let mut positions = self.positions.to_vec(); in positions()
354 self.positions.to_vec() in positions()
/external/rust/cxx/demo/src/
Dmain.rs48 let chunks = vec![b"fearless".to_vec(), b"concurrency".to_vec()]; in main()
/external/rust/crates/gdbstub/src/protocol/common/
Dhex.rs172 let mut payload = b"ffffff4".to_vec(); in decode_hex_buf_odd()
179 let mut payload = b"12345".to_vec(); in decode_hex_buf_2()
186 let mut payload = b"1".to_vec(); in decode_hex_buf_short()
/external/crosvm/src/plugin/
Dvcpu.rs90 VcpuRequest_StateSet::REGS => VcpuRegs(vcpu.get_regs()?).as_slice().to_vec(), in get_vcpu_state()
91 VcpuRequest_StateSet::SREGS => VcpuSregs(vcpu.get_sregs()?).as_slice().to_vec(), in get_vcpu_state()
92 VcpuRequest_StateSet::FPU => VcpuFpu(vcpu.get_fpu()?).as_slice().to_vec(), in get_vcpu_state()
93 VcpuRequest_StateSet::DEBUGREGS => VcpuDebugregs(vcpu.get_debugregs()?).as_slice().to_vec(), in get_vcpu_state()
94 VcpuRequest_StateSet::XCREGS => VcpuXcregs(vcpu.get_xcrs()?).as_slice().to_vec(), in get_vcpu_state()
95 VcpuRequest_StateSet::LAPIC => VcpuLapicState(vcpu.get_lapic()?).as_slice().to_vec(), in get_vcpu_state()
96 VcpuRequest_StateSet::MP => VcpuMpState(vcpu.get_mp_state()?).as_slice().to_vec(), in get_vcpu_state()
97 VcpuRequest_StateSet::EVENTS => VcpuEvents(vcpu.get_vcpu_events()?).as_slice().to_vec(), in get_vcpu_state()
435 io.data = data.as_slice().to_vec(); in process()
440 io.regs = VcpuRegs(regs).as_slice().to_vec(); in process()
/external/skia/include/private/
DSkVx.h174 SI Vec<4,float> to_vec(VExt<4,float> v) { return bit_pun<Vec<4,float>>(v); }
178 SINT Vec <N,T> to_vec(const VExt<N,T>& v) { return bit_pun<Vec <N,T>>(v); }
181 return to_vec<N,T>(to_vext(x) + to_vext(y));
184 return to_vec<N,T>(to_vext(x) - to_vext(y));
187 return to_vec<N,T>(to_vext(x) * to_vext(y));
190 return to_vec<N,T>(to_vext(x) / to_vext(y));
194 return to_vec<N,T>(to_vext(x) ^ to_vext(y));
197 return to_vec<N,T>(to_vext(x) & to_vext(y));
200 return to_vec<N,T>(to_vext(x) | to_vext(y));
203 SINT Vec<N,T> operator!(const Vec<N,T>& x) { return to_vec<N,T>(!to_vext(x)); }
[all …]
/external/rust/crates/bytes/benches/
Dbytes.rs57 let bytes = Bytes::from(b"hello world 1234567890 and have a good byte 0987654321".to_vec()); in clone_shared()
69 let bytes = Arc::new(b"hello world 1234567890 and have a good byte 0987654321".to_vec()); in clone_arc_vec()
/external/rust/crates/serde_cbor/examples/
Dtags.rs63 let bytes1 = serde_cbor::to_vec(&bookmark)?; in main()
68 let bytes2 = serde_cbor::to_vec(&value1)?; in main()
/external/rust/crates/serde_cbor/src/value/
Dmod.rs97 let a = crate::to_vec(a).expect("self is serializable"); in cmp()
98 let b = crate::to_vec(b).expect("other is serializable"); in cmp()
/external/rust/crates/protobuf/src/
Drepeated.rs330 RepeatedField::from_vec(values.to_vec()) in from_slice()
341 pub fn to_vec(&self) -> Vec<T> { in to_vec() method
342 self.as_ref().to_vec() in to_vec()
350 vec: self.to_vec(), in clone()
/external/rust/crates/tokio/src/util/
Dlinked_list.rs471 assert_eq!([5, 7, 31].to_vec(), items); in push_and_drain()
542 assert_eq!([31, 7].to_vec(), items); in remove_by_address()
558 assert_eq!([31, 5].to_vec(), items); in remove_by_address()
575 assert_eq!([7, 5].to_vec(), items); in remove_by_address()
598 assert_eq!([7].to_vec(), items); in remove_by_address()
618 assert_eq!([5].to_vec(), items); in remove_by_address()
/external/rust/crates/flate2/examples/
Ddeflateencoder-read.rs19 Ok(ret_vec[0..count].to_vec()) in deflateencoder_read_hello_world()

12345