Home
last modified time | relevance | path

Searched refs:slice (Results 1 – 25 of 1415) sorted by relevance

12345678910>>...57

/external/python/cpython3/Lib/test/
Dtest_slice.py26 def slice_indices(slice, length): argument
33 step = 1 if slice.step is None else evaluate_slice_index(slice.step)
46 if slice.start is None:
49 start = evaluate_slice_index(slice.start)
53 if slice.stop is None:
56 stop = evaluate_slice_index(slice.stop)
75 self.assertRaises(TypeError, slice)
76 self.assertRaises(TypeError, slice, 1, 2, 3, 4)
79 self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)")
83 self.assertRaises(TypeError, hash, slice(5))
[all …]
/external/grpc-grpc/include/grpc/impl/codegen/
Dslice.h47 uint32_t (*hash)(grpc_slice slice);
116 #define GRPC_SLICE_START_PTR(slice) \ argument
117 ((slice).refcount ? (slice).data.refcounted.bytes \
118 : (slice).data.inlined.bytes)
119 #define GRPC_SLICE_LENGTH(slice) \ argument
120 ((slice).refcount ? (slice).data.refcounted.length \
121 : (slice).data.inlined.length)
122 #define GRPC_SLICE_SET_LENGTH(slice, newlen) \ argument
123 ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \
124 : ((slice).data.inlined.length = (uint8_t)(newlen)))
[all …]
/external/python/cpython2/Lib/test/
Dtest_slice.py14 self.assertRaises(TypeError, slice)
15 self.assertRaises(TypeError, slice, 1, 2, 3, 4)
18 self.assertEqual(repr(slice(1, 2, 3)), "slice(1, 2, 3)")
22 self.assertRaises(TypeError, hash, slice(5))
24 slice(5).__hash__()
27 s1 = slice(1, 2, 3)
28 s2 = slice(1, 2, 3)
29 s3 = slice(1, 2, 4)
41 s1 = slice(BadCmp())
42 s2 = slice(BadCmp())
[all …]
/external/grpc-grpc/test/core/slice/
Dslice_test.cc41 grpc_slice slice; in test_slice_malloc_returns_something_sensible() local
46 slice = grpc_slice_malloc(length); in test_slice_malloc_returns_something_sensible()
50 GPR_ASSERT(slice.data.refcounted.bytes); in test_slice_malloc_returns_something_sensible()
53 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length); in test_slice_malloc_returns_something_sensible()
55 if (slice.refcount) { in test_slice_malloc_returns_something_sensible()
56 GPR_ASSERT(slice.refcount->vtable != nullptr); in test_slice_malloc_returns_something_sensible()
57 GPR_ASSERT(slice.refcount->vtable->ref != nullptr); in test_slice_malloc_returns_something_sensible()
58 GPR_ASSERT(slice.refcount->vtable->unref != nullptr); in test_slice_malloc_returns_something_sensible()
59 GPR_ASSERT(slice.refcount->vtable->hash != nullptr); in test_slice_malloc_returns_something_sensible()
63 GRPC_SLICE_START_PTR(slice)[i] = static_cast<uint8_t>(i); in test_slice_malloc_returns_something_sensible() local
[all …]
/external/grpc-grpc/src/core/lib/surface/
Dvalidate_metadata.cc32 static grpc_error* conforms_to(grpc_slice slice, const uint8_t* legal_bits, in conforms_to() argument
34 const uint8_t* p = GRPC_SLICE_START_PTR(slice); in conforms_to()
35 const uint8_t* e = GRPC_SLICE_END_PTR(slice); in conforms_to()
41 char* dump = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); in conforms_to()
45 p - GRPC_SLICE_START_PTR(slice)), in conforms_to()
60 grpc_error* grpc_validate_header_key_is_legal(grpc_slice slice) { in grpc_validate_header_key_is_legal() argument
65 if (GRPC_SLICE_LENGTH(slice) == 0) { in grpc_validate_header_key_is_legal()
69 if (GRPC_SLICE_START_PTR(slice)[0] == ':') { in grpc_validate_header_key_is_legal() local
73 return conforms_to(slice, legal_header_bits, "Illegal header key"); in grpc_validate_header_key_is_legal()
76 int grpc_header_key_is_legal(grpc_slice slice) { in grpc_header_key_is_legal() argument
[all …]
/external/crosvm/sys_util/src/
Dfile_traits.rs48 fn read_volatile(&mut self, slice: VolatileSlice) -> Result<usize>; in read_volatile()
52 fn read_exact_volatile(&mut self, mut slice: VolatileSlice) -> Result<()> { in read_exact_volatile()
53 while slice.size() > 0 { in read_exact_volatile()
54 let bytes_read = self.read_volatile(slice)?; in read_exact_volatile()
60 slice = slice.offset(bytes_read as u64).unwrap(); in read_exact_volatile()
67 fn write_volatile(&mut self, slice: VolatileSlice) -> Result<usize>; in write_volatile()
71 fn write_all_volatile(&mut self, mut slice: VolatileSlice) -> Result<()> { in write_all_volatile()
72 while slice.size() > 0 { in write_all_volatile()
73 let bytes_written = self.write_volatile(slice)?; in write_all_volatile()
79 slice = slice.offset(bytes_written as u64).unwrap(); in write_all_volatile()
[all …]
/external/perfetto/src/trace_processor/metrics/android/
Dandroid_hwui_metric.sql38 FROM slice
39 INNER JOIN thread_track ON (thread_track.id = slice.track_id)
40 WHERE slice.name='DrawFrame' AND slice.dur >= 0
50 FROM slice
51 INNER JOIN thread_track ON (thread_track.id = slice.track_id)
52 WHERE slice.name='flush commands' AND slice.dur >= 0
62 FROM slice
63 INNER JOIN thread_track ON (thread_track.id = slice.track_id)
64 WHERE slice.name='prepareTree' AND slice.dur >= 0
74 FROM slice
[all …]
/external/arm-trusted-firmware/drivers/renesas/rcar/ddr/ddr_b/
Dboot_init_dram.c242 static void ddr_setval_s(uint32_t ch, uint32_t slice, uint32_t _regdef,
244 static uint32_t ddr_getval_s(uint32_t ch, uint32_t slice, uint32_t _regdef);
246 static void ddr_setval_ach_s(uint32_t slice, uint32_t regdef, uint32_t val);
666 static void ddr_setval_s(uint32_t ch, uint32_t slice, uint32_t _regdef, in ddr_setval_s() argument
677 adr = DDR_REGDEF_ADR(regdef) + 0x80 * slice; in ddr_setval_s()
690 static uint32_t ddr_getval_s(uint32_t ch, uint32_t slice, uint32_t _regdef) in ddr_getval_s() argument
700 adr = DDR_REGDEF_ADR(regdef) + 0x80 * slice; in ddr_getval_s()
719 static void ddr_setval_ach_s(uint32_t slice, uint32_t regdef, uint32_t val) in ddr_setval_ach_s() argument
724 ddr_setval_s(ch, slice, regdef, val); in ddr_setval_ach_s()
734 uint32_t slice; in ddr_setval_ach_as() local
[all …]
/external/grpc-grpc/src/core/ext/transport/chttp2/transport/
Dframe_data.cc112 grpc_slice slice = grpc_slice_buffer_take_first(slices); in grpc_deframe_unprocessed_incoming_frames() local
114 beg = GRPC_SLICE_START_PTR(slice); in grpc_deframe_unprocessed_incoming_frames()
115 end = GRPC_SLICE_END_PTR(slice); in grpc_deframe_unprocessed_incoming_frames()
121 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
128 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
146 msg = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); in grpc_deframe_unprocessed_incoming_frames()
153 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
158 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
167 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
176 grpc_slice_unref_internal(slice); in grpc_deframe_unprocessed_incoming_frames()
[all …]
/external/grpc-grpc/test/core/http/
Dformat_request_test.cc29 grpc_slice slice; in test_format_get_request() local
37 slice = grpc_httpcli_format_get_request(&req); in test_format_get_request()
39 GPR_ASSERT(0 == grpc_slice_str_cmp(slice, in test_format_get_request()
48 grpc_slice_unref(slice); in test_format_get_request()
54 grpc_slice slice; in test_format_post_request() local
64 slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); in test_format_post_request()
66 GPR_ASSERT(0 == grpc_slice_str_cmp(slice, in test_format_post_request()
78 grpc_slice_unref(slice); in test_format_post_request()
84 grpc_slice slice; in test_format_post_request_no_body() local
92 slice = grpc_httpcli_format_post_request(&req, nullptr, 0); in test_format_post_request_no_body()
[all …]
/external/tensorflow/tensorflow/core/util/
Dtensor_slice_set.cc33 Status TensorSliceSet::Register(const TensorSlice& slice, const string& tag) { in Register() argument
35 TF_RETURN_IF_ERROR(slice.SliceTensorShape(shape_, &result_shape)); in Register()
36 string str = slice.DebugString(); in Register()
39 slices_hull_ = slice; in Register()
43 if (slices_hull_.Overlaps(slice)) { in Register()
45 if (slice.Overlaps(x.second.slice)) { in Register()
52 slices_hull_.UpdateToCover(slice); in Register()
55 TensorSliceSet::SliceInfo info = {slice, tag, result_shape.num_elements()}; in Register()
61 const TensorSlice& slice, in QueryMeta() argument
65 string str = slice.DebugString(); in QueryMeta()
[all …]
Dsaved_tensor_slice_util.cc28 string EncodeTensorNameSlice(const string& name, const TensorSlice& slice) { in EncodeTensorNameSlice() argument
33 tensorflow::strings::OrderedCode::WriteNumIncreasing(&buffer, slice.dims()); in EncodeTensorNameSlice()
34 for (int d = 0; d < slice.dims(); ++d) { in EncodeTensorNameSlice()
38 slice.start(d)); in EncodeTensorNameSlice()
40 slice.length(d)); in EncodeTensorNameSlice()
46 tensorflow::TensorSlice* slice) { in DecodeTensorNameSlice() argument
69 slice->SetFullSlice(x); in DecodeTensorNameSlice()
83 slice->set_start(d, start); in DecodeTensorNameSlice()
84 slice->set_length(d, length); in DecodeTensorNameSlice()
91 TensorSlice* slice, TensorShape* shape_slice) { in ParseShapeAndSlice() argument
[all …]
/external/tensorflow/tensorflow/lite/testing/op_tests/
Dstrided_slice_np_style.py36 "spec": [[slice(3, 7, 2), slice(None)],
38 slice(3, 7, 1), tf.newaxis,
39 slice(None)], [slice(1, 5, 1), slice(None)]],
45 "spec": [[slice(3, 7, 2)], [tf.newaxis, slice(None)]],
51 "spec": [[slice(3, 7, 2), slice(None), 2]],
57 "spec": [[slice(3, 7, 2), Ellipsis]],
64 slice(3, 7, 2),
65 slice(None), Ellipsis]],
/external/angle/src/libANGLE/renderer/metal/doc/
DTextureDataCompleteness.md16 * glTexImage/glCopyImage(slice,level):
17 * a single image (`images[slice][level]`: 2D/3D MTLTexture no mipmap + single slice) is
18 created to store data for the texture at this level/slice.
19 * glTexSubImage/glCopyTexSubImage(slice,level):
20 * modifies the data of `images[slice][level]`;
24 - `images[0][0]` --> copy to actual texture's slice 0, level 0.
25 - `images[0][1]` --> copy to actual texture's slice 0, level 1.
26 - `images[0][2]` --> copy to actual texture's slice 0, level 2.
29 the specified level/slice.
30 - `images[0][0]` -> view of actual texture's slice 0, level 0.
[all …]
/external/grpc-grpc/test/core/iomgr/
Dload_file_test.cc38 grpc_slice slice; in test_load_empty_file() local
50 error = grpc_load_file(tmp_name, 0, &slice); in test_load_empty_file()
52 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); in test_load_empty_file()
61 grpc_slice_unref(slice); in test_load_empty_file()
67 grpc_slice slice; in test_load_failure() local
79 error = grpc_load_file(tmp_name, 0, &slice); in test_load_failure()
82 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); in test_load_failure()
84 grpc_slice_unref(slice); in test_load_failure()
89 grpc_slice slice; in test_load_small_file() local
103 error = grpc_load_file(tmp_name, 0, &slice); in test_load_small_file()
[all …]
/external/grpc-grpc/src/core/lib/slice/
Dslice.cc31 char* grpc_slice_to_c_string(grpc_slice slice) { in grpc_slice_to_c_string() argument
32 char* out = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1)); in grpc_slice_to_c_string()
33 memcpy(out, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)); in grpc_slice_to_c_string()
34 out[GRPC_SLICE_LENGTH(slice)] = 0; in grpc_slice_to_c_string()
52 grpc_slice grpc_slice_ref_internal(grpc_slice slice) { in grpc_slice_ref_internal() argument
53 if (slice.refcount) { in grpc_slice_ref_internal()
54 slice.refcount->vtable->ref(slice.refcount); in grpc_slice_ref_internal()
56 return slice; in grpc_slice_ref_internal()
59 void grpc_slice_unref_internal(grpc_slice slice) { in grpc_slice_unref_internal() argument
60 if (slice.refcount) { in grpc_slice_unref_internal()
[all …]
Dslice_buffer.cc263 grpc_slice slice = grpc_slice_buffer_take_first(src); in slice_buffer_move_first_maybe_ref() local
264 size_t slice_len = GRPC_SLICE_LENGTH(slice); in slice_buffer_move_first_maybe_ref()
266 grpc_slice_buffer_add(dst, slice); in slice_buffer_move_first_maybe_ref()
269 grpc_slice_buffer_add(dst, slice); in slice_buffer_move_first_maybe_ref()
273 src, grpc_slice_split_tail_maybe_ref(&slice, n, GRPC_SLICE_REF_BOTH)); in slice_buffer_move_first_maybe_ref()
274 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
275 grpc_slice_buffer_add(dst, slice); in slice_buffer_move_first_maybe_ref()
279 src, grpc_slice_split_tail_maybe_ref(&slice, n, GRPC_SLICE_REF_TAIL)); in slice_buffer_move_first_maybe_ref()
280 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
281 grpc_slice_buffer_add_indexed(dst, slice); in slice_buffer_move_first_maybe_ref()
[all …]
Dslice_intern.cc112 static uint32_t interned_slice_hash(grpc_slice slice) { in interned_slice_hash() argument
114 reinterpret_cast<interned_slice_refcount*>(slice.refcount); in interned_slice_hash()
154 grpc_slice slice; in materialize() local
155 slice.refcount = &s->base; in materialize()
156 slice.data.refcounted.bytes = reinterpret_cast<uint8_t*>(s + 1); in materialize()
157 slice.data.refcounted.length = s->length; in materialize()
158 return slice; in materialize()
179 grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, in grpc_slice_maybe_static_intern() argument
181 if (GRPC_IS_STATIC_METADATA_STRING(slice)) { in grpc_slice_maybe_static_intern()
182 return slice; in grpc_slice_maybe_static_intern()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i915/
Dintel_mipmap_tree.c385 free((*mt)->level[i].slice); in intel_miptree_release()
465 assert(mt->level[level].slice == NULL); in intel_miptree_set_level_info()
467 mt->level[level].slice = calloc(d, sizeof(*mt->level[0].slice)); in intel_miptree_set_level_info()
468 mt->level[level].slice[0].x_offset = mt->level[level].level_x; in intel_miptree_set_level_info()
469 mt->level[level].slice[0].y_offset = mt->level[level].level_y; in intel_miptree_set_level_info()
483 mt->level[level].slice[img].x_offset = mt->level[level].level_x + x; in intel_miptree_set_image_offset()
484 mt->level[level].slice[img].y_offset = mt->level[level].level_y + y; in intel_miptree_set_image_offset()
488 mt->level[level].slice[img].x_offset, in intel_miptree_set_image_offset()
489 mt->level[level].slice[img].y_offset); in intel_miptree_set_image_offset()
494 GLuint level, GLuint slice, in intel_miptree_get_image_offset() argument
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/SROA/
Dpr37267.ll15 ; The reported error happened when rewriteIntegerStore try to widen a split tail of slice 1 for [4,…
17 ; slice 1: WWWW
18 ; slice 2: WWWW
19 ; slice 3: RR
20 ; slice 4: RR
23 ; slice 1: [2,6)
27 ; slice 2: [8,12)
31 ; slice 3: [8,10)
34 ; slice 4: [2,4)
49 ; The reported error happened when visitLoadInst rewrites a split tail of slice 1 for [4, 8) partit…
[all …]
/external/grpc-grpc/test/core/surface/
Dbyte_buffer_reader_test.cc38 grpc_slice slice; in test_read_one_slice() local
45 slice = grpc_slice_from_copied_string("test"); in test_read_one_slice()
46 buffer = grpc_raw_byte_buffer_create(&slice, 1); in test_read_one_slice()
47 grpc_slice_unref(slice); in test_read_one_slice()
60 grpc_slice slice; in test_read_one_slice_malloc() local
67 slice = grpc_slice_malloc(4); in test_read_one_slice_malloc()
68 memcpy(GRPC_SLICE_START_PTR(slice), "test", 4); in test_read_one_slice_malloc()
69 buffer = grpc_raw_byte_buffer_create(&slice, 1); in test_read_one_slice_malloc()
70 grpc_slice_unref(slice); in test_read_one_slice_malloc()
83 grpc_slice slice; in test_read_none_compressed_slice() local
[all …]
/external/grpc-grpc/src/core/tsi/alts/handshaker/
Dalts_handshaker_service_api_util.cc63 grpc_slice slice = grpc_slice_from_copied_buffer(data, size); in create_slice() local
66 memcpy(cb_slice, &slice, sizeof(*cb_slice)); in create_slice()
70 void destroy_slice(grpc_slice* slice) { in destroy_slice() argument
71 if (slice != nullptr) { in destroy_slice()
72 grpc_slice_unref_internal(*slice); in destroy_slice()
73 gpr_free(slice); in destroy_slice()
79 grpc_slice* slice = static_cast<grpc_slice*>(*arg); in encode_string_or_bytes_cb() local
81 return pb_encode_string(stream, GRPC_SLICE_START_PTR(*slice), in encode_string_or_bytes_cb()
82 GRPC_SLICE_LENGTH(*slice)); in encode_string_or_bytes_cb()
103 const grpc_slice* slice = static_cast<const grpc_slice*>(var->data); in encode_repeated_string_cb() local
[all …]
/external/eigen/unsupported/test/
Dcxx11_tensor_morphing.cpp102 slice1 = tensor.slice(indices, sizes); in test_simple_slice()
108 slice2 = tensor.slice(indices2, sizes2); in test_simple_slice()
125 TensorRef<Tensor<const float, 1> > slice_ref(m.slice(offsets, m.dimensions())); in test_const_slice()
149 …tensor3 = tensor1.slice(indices1, sizes1).contract(tensor2.slice(indices2, sizes2), contract_along… in test_slice_in_expr()
160 …Tensor<float, 1, DataLayout> tensor6 = tensor4.reshape(DSizes<ptrdiff_t, 1>(7*7)).exp().slice(DSiz… in test_slice_in_expr()
183 result.slice(first_slice, sizes12) = tensor1; in test_slice_as_lvalue()
185 result.slice(second_slice, sizes12).device(Eigen::DefaultDevice()) = tensor2; in test_slice_as_lvalue()
189 result.slice(third_slice, sizes3) = tensor3; in test_slice_as_lvalue()
193 result.slice(fourth_slice, sizes4) = tensor4; in test_slice_as_lvalue()
216 result.slice(fifth_slice, sizes5) = tensor5.slice(fifth_slice, sizes5); in test_slice_as_lvalue()
[all …]
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DNioByteString.java55 this.buffer = buffer.slice().order(ByteOrder.nativeOrder()); in NioByteString()
63 return ByteString.copyFrom(buffer.slice()); in writeReplace()
99 ByteBuffer slice = slice(beginIndex, endIndex); in substring() local
100 return new NioByteString(slice); in substring()
111 ByteBuffer slice = buffer.slice(); in copyToInternal() local
112 slice.position(sourceOffset); in copyToInternal()
113 slice.get(target, targetOffset, numberToCopy); in copyToInternal()
118 target.put(buffer.slice()); in copyTo()
141 ByteBufferWriter.write(slice(sourceOffset, sourceOffset + numberToWrite), out); in writeToInternal()
146 output.writeLazy(buffer.slice()); in writeTo()
[all …]
/external/perfetto/test/trace_processor/
Dtrack_event_slices.sql21 slice.ts,
22 slice.dur,
23 slice.category,
24 slice.name,
25 slice.arg_set_id
26 from slice
27 left join track on slice.track_id = track.id
28 left join process_track on slice.track_id = process_track.id
30 left join thread_track on slice.track_id = thread_track.id

12345678910>>...57