/third_party/python/Lib/test/ |
H A D | test_slice.py | 1 # tests for slice objects; in particular the indices method. 16 Helper function to convert a slice argument to an integer, and raise 24 "slice indices must be integers or " 27 def slice_indices(slice, length): 29 Reference implementation for the slice.indices method. 34 step = 1 if slice.step is None else evaluate_slice_index(slice.step) 40 raise ValueError("slice step cannot be zero") 47 if slice.start is None: 50 start = evaluate_slice_index(slice [all...] |
/third_party/jerryscript/tests/jerry/ |
H A D | array-prototype-slice.js | 19 var array1 = array.slice(); 20 var array2 = array.slice("a", "3"); 21 var array3 = array.slice(-2); 22 var array4 = array.slice(-12, undefined); 23 var array5 = array.slice(undefined, -3); 24 var array6 = array.slice(Infinity, NaN); 25 var array7 = array.slice(-Infinity, Infinity); 26 var array8 = array.slice(NaN, -Infinity); 65 var result = array.slice(4294967293, -1) 70 var result = array.slice( [all...] |
H A D | string-prototype-slice.js | 18 res = str.slice(); 21 res = str.slice(1, 6); 24 res = str.slice("a", "-4"); 27 res = str.slice(-5); 30 res = str.slice(-12, undefined); 33 res = str.slice(undefined, -20); 36 res = str.slice(undefined, undefined); 39 res = str.slice(Infinity, NaN); 42 res = str.slice(-Infinity, Infinity); 45 res = str.slice(Na [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/ti/icssg/ |
H A D | icssg_classifier.c | 31 (offs[slice].ft1_slot_base + FT1_SLOT_SIZE * (n) + (reg)) 66 (offs[slice].ft3_slot_base + FT3_SLOT_SIZE * (n) + (reg)) 74 #define RX_CLASS_N_REG(slice, n, reg) \ 75 (offs[slice].rx_class_base + RX_CLASS_EN_SIZE * (n) + (reg)) 80 #define RX_CLASS_GATES_N_REG(slice, n) \ 81 (offs[slice].rx_class_gates_base + RX_CLASS_GATES_SIZE * (n)) 205 static void rx_class_ft1_set_start_len(struct regmap *miig_rt, int slice, in rx_class_ft1_set_start_len() argument 210 offset = offs[slice].ft1_start_len; in rx_class_ft1_set_start_len() 215 static void rx_class_ft1_set_da(struct regmap *miig_rt, int slice, in rx_class_ft1_set_da() argument 220 offset = FT1_N_REG(slice, in rx_class_ft1_set_da() 227 rx_class_ft1_set_da_mask(struct regmap *miig_rt, int slice, int n, const u8 *addr) rx_class_ft1_set_da_mask() argument 239 rx_class_ft1_cfg_set_type(struct regmap *miig_rt, int slice, int n, enum ft1_cfg_type type) rx_class_ft1_cfg_set_type() argument 249 rx_class_sel_set_type(struct regmap *miig_rt, int slice, int n, enum rx_class_sel_type type) rx_class_sel_set_type() argument 259 rx_class_set_and(struct regmap *miig_rt, int slice, int n, u32 data) rx_class_set_and() argument 268 rx_class_set_or(struct regmap *miig_rt, int slice, int n, u32 data) rx_class_set_or() argument 284 icssg_class_set_mac_addr(struct regmap *miig_rt, int slice, u8 *mac) icssg_class_set_mac_addr() argument 292 icssg_class_disable(struct regmap *miig_rt, int slice) icssg_class_disable() argument 334 icssg_class_default(struct regmap *miig_rt, int slice, bool allmulti) icssg_class_default() argument 359 icssg_ft1_set_mac_addr(struct regmap *miig_rt, int slice, u8 *mac_addr) icssg_ft1_set_mac_addr() argument [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | hqx.c | 156 HQXSlice *slice = &ctx->slice[slice_no]; in hqx_decode_422() local 157 GetBitContext *gb = &slice->gb; in hqx_decode_422() 175 ctx->dcb, slice->block[i], &last_dc); in hqx_decode_422() 180 put_blocks(ctx, 0, x, y, flag, slice->block[0], slice->block[2], hqx_quant_luma); in hqx_decode_422() 181 put_blocks(ctx, 0, x + 8, y, flag, slice->block[1], slice->block[3], hqx_quant_luma); in hqx_decode_422() 182 put_blocks(ctx, 2, x >> 1, y, flag, slice->block[4], slice in hqx_decode_422() 190 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_422a() local 240 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_444() local 276 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_444a() local [all...] |
H A D | dxva2_h264.c | 119 * intra slice in dxva2_h264_decode_slice) */ in fill_picture_parameters() 199 static void fill_slice_short(DXVA_Slice_H264_Short *slice, in fill_slice_short() argument 202 memset(slice, 0, sizeof(*slice)); in fill_slice_short() 203 slice->BSNALunitDataLocation = position; in fill_slice_short() 204 slice->SliceBytesInBuffer = size; in fill_slice_short() 205 slice->wBadSliceChopping = 0; in fill_slice_short() 218 static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, in fill_slice_long() argument 226 memset(slice, 0, sizeof(*slice)); in fill_slice_long() 308 DXVA_Slice_H264_Short *slice = NULL; commit_bitstream_and_slice_buffer() local [all...] |
H A D | dxva2_vc1.c | 36 DXVA_SliceInfo slice[MAX_SLICES]; member 165 static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice, in fill_slice() argument 171 memset(slice, 0, sizeof(*slice)); in fill_slice() 172 slice->wHorizontalPosition = 0; in fill_slice() 173 slice->wVerticalPosition = s->mb_y; in fill_slice() 174 slice->dwSliceBitsInBuffer = 8 * size; in fill_slice() 175 slice->dwSliceDataLocation = position; in fill_slice() 176 slice->bStartCodeBitOffset = 0; in fill_slice() 177 slice in fill_slice() 197 DXVA_SliceInfo *slice = NULL; commit_bitstream_and_slice_buffer() local [all...] |
/third_party/jerryscript/tests/jerry/es2015/ |
H A D | typedarray-prototype-slice-ext-arraybuffer.js | 32 typed.prototype.slice.call(undefined); 43 assert(typed.slice(1, 3).toString() === "1,2"); 44 assert(typed.slice(2, 5).toString() === "2,3,4"); 45 assert(typed.slice(0, 6).toString() === "0,1,2,3,4,5"); 48 assert(typed.slice(-2, 5).toString() === "4"); 49 assert(typed.slice(0, -3).toString() === "0,1,2"); 50 assert(typed.slice(-1, -4).toString() === ""); 53 assert(typed.slice(7, 1).toString() === ""); 54 assert(typed.slice(2, 9).toString() === "2,3,4,5"); 57 assert(typed.slice(undefine [all...] |
H A D | typedarray-prototype-slice.js | 30 e.prototype.slice.call (undefined); 37 assert(e.slice(1, 3).toString() === "1,2"); 38 assert(e.slice(2, 5).toString() === "2,3,4"); 39 assert(e.slice(0, 6).toString() === "0,1,2,3,4,5"); 42 assert(e.slice(-2, 5).toString() === "4"); 43 assert(e.slice(0, -3).toString() === "0,1,2"); 44 assert(e.slice(-1, -4).toString() === ""); 47 assert(e.slice(7, 1).toString() === ""); 48 assert(e.slice(2, 9).toString() === "2,3,4,5"); 51 assert(e.slice(undefine [all...] |
/third_party/rust/crates/nix/test/sys/ |
H A D | test_mman.rs | 31 let slice: &mut [u8] = unsafe { in test_mremap_grow() 41 std::slice::from_raw_parts_mut(mem as *mut u8, ONE_K) in test_mremap_grow() 43 assert_eq!(slice[ONE_K - 1], 0x00); in test_mremap_grow() 44 slice[ONE_K - 1] = 0xFF; in test_mremap_grow() 45 assert_eq!(slice[ONE_K - 1], 0xFF); in test_mremap_grow() 47 let slice: &mut [u8] = unsafe { in test_mremap_grow() 50 slice.as_mut_ptr() as *mut c_void, in test_mremap_grow() 59 slice.as_mut_ptr() as *mut c_void, in test_mremap_grow() 66 std::slice::from_raw_parts_mut(mem as *mut u8, 10 * ONE_K) in test_mremap_grow() 70 assert_eq!(slice[ONE_ in test_mremap_grow() [all...] |
/third_party/skia/third_party/externals/tint/tools/src/list/ |
H A D | list_test.go | 56 slice := []int{1, 2, 3} 57 l := list.Wrap(&slice) 76 slice := make([]int, 5) 77 l := list.Wrap(&slice) 85 slice := []int{} 86 l := list.Wrap(&slice) 90 if len(slice) != 10 { 91 t.Errorf("len(slice) after Resize(10) is %v", len(slice)) 96 slice [all...] |
/third_party/typescript/tests/baselines/reference/ |
H A D | typeGuardsAsAssertions.js | 36 x = typeof x === "string" ? x.slice() : "abc"; 48 x = x.slice(); 108 x!.slice(); 110 x!.slice(); 112 x!.slice(); 114 x!.slice(); 116 x!.slice(); 118 x!.slice(); 120 x!.slice(); 125 x!.slice(); [all...] |
/third_party/mesa3d/src/panfrost/lib/ |
H A D | pan_layout.c | 206 struct pan_image_slice_layout *slice, in panfrost_compute_checksum_size() 213 slice->crc.stride = tile_count_x * CHECKSUM_BYTES_PER_TILE; in panfrost_compute_checksum_size() 215 return slice->crc.stride * tile_count_y; in panfrost_compute_checksum_size() 360 struct pan_image_slice_layout *slice = &layout->slices[l]; in pan_image_layout_init() local 370 slice->offset = offset; in pan_image_layout_init() 398 slice->row_stride = in pan_image_layout_init() 400 slice->afbc.header_size = in pan_image_layout_init() 401 ALIGN_POT(slice->row_stride * (effective_height / align_h), in pan_image_layout_init() 404 if (explicit_layout && explicit_layout->row_stride < slice->row_stride) in pan_image_layout_init() 408 slice in pan_image_layout_init() 205 panfrost_compute_checksum_size( struct pan_image_slice_layout *slice, unsigned width, unsigned height) panfrost_compute_checksum_size() argument 484 const struct pan_image_slice_layout *slice = &iview->image->layout.slices[level]; pan_iview_get_surface() local [all...] |
/third_party/rust/crates/cxx/tests/ffi/ |
H A D | cast.rs | 2 use std::slice; 4 pub fn c_char_to_unsigned(slice: &[c_char]) -> &[u8] { in c_char_to_unsigned() 5 let ptr = slice.as_ptr().cast::<u8>(); in c_char_to_unsigned() 6 let len = slice.len(); in c_char_to_unsigned() 7 unsafe { slice::from_raw_parts(ptr, len) } in c_char_to_unsigned() 10 pub fn unsigned_to_c_char(slice: &[u8]) -> &[c_char] { in unsigned_to_c_char() 11 let ptr = slice.as_ptr().cast::<c_char>(); in unsigned_to_c_char() 12 let len = slice.len(); in unsigned_to_c_char() 13 unsafe { slice::from_raw_parts(ptr, len) } in unsigned_to_c_char()
|
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ |
H A D | NioByteString.java | 55 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() 100 return new NioByteString(slice); in substring() 111 ByteBuffer slice = buffer.slice(); in copyToInternal() 112 slice.position(sourceOffset); in copyToInternal() 113 slice.get(target, targetOffset, numberToCopy); in copyToInternal() 118 target.put(buffer.slice()); in copyTo() 281 private ByteBuffer slice(int beginIndex, int endIndex) { slice() method in NioByteString [all...] |
/third_party/node/deps/v8/src/interpreter/ |
H A D | constant-array-builder.cc | 115 // Print all the entries in the slice to help debug duplicates. in CheckAllElementsAreUnique() 149 ConstantArraySlice* slice = idx_slice_[--i]; in size() local 150 if (slice->size() > 0) { in size() 151 return slice->start_index() + slice->size(); in size() 159 for (ConstantArraySlice* slice : idx_slice_) { in IndexToSlice() 160 if (index <= slice->max_index()) { in IndexToSlice() 161 return slice; in IndexToSlice() 170 const ConstantArraySlice* slice = IndexToSlice(index); in At() local 171 DCHECK_LT(index, slice in At() 293 ConstantArraySlice* slice = nullptr; OperandSizeToSlice() local 320 ConstantArraySlice* slice = IndexToSlice(index); SetDeferredAt() local 325 ConstantArraySlice* slice = IndexToSlice(index); SetJumpTableSmi() local 358 ConstantArraySlice* slice = OperandSizeToSlice(operand_size); CommitReservedEntry() local [all...] |
/kernel/linux/linux-5.10/drivers/misc/eeprom/ |
H A D | eeprom.c | 35 u8 valid; /* bitfield, bit!=0 if slice is valid */ 42 static void eeprom_update_client(struct i2c_client *client, u8 slice) in eeprom_update_client() argument 49 if (!(data->valid & (1 << slice)) || in eeprom_update_client() 50 time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { in eeprom_update_client() 51 dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice); in eeprom_update_client() 54 for (i = slice << 5; i < (slice + 1) << 5; i += 32) in eeprom_update_client() 60 for (i = slice << 5; i < (slice in eeprom_update_client() 81 u8 slice; eeprom_read() local [all...] |
H A D | max6875.c | 54 static void max6875_update_slice(struct i2c_client *client, int slice) in max6875_update_slice() argument 60 if (slice >= USER_EEPROM_SLICES) in max6875_update_slice() 65 buf = &data->data[slice << SLICE_BITS]; in max6875_update_slice() 67 if (!(data->valid & (1 << slice)) || in max6875_update_slice() 68 time_after(jiffies, data->last_updated[slice])) { in max6875_update_slice() 70 dev_dbg(&client->dev, "Starting update of slice %u\n", slice); in max6875_update_slice() 72 data->valid &= ~(1 << slice); in max6875_update_slice() 74 addr = USER_EEPROM_BASE + (slice << SLICE_BITS); in max6875_update_slice() 99 data->last_updated[slice] in max6875_update_slice() 112 int slice, max_slice; max6875_read() local [all...] |
/kernel/linux/linux-6.6/drivers/misc/eeprom/ |
H A D | max6875.c | 54 static void max6875_update_slice(struct i2c_client *client, int slice) in max6875_update_slice() argument 60 if (slice >= USER_EEPROM_SLICES) in max6875_update_slice() 65 buf = &data->data[slice << SLICE_BITS]; in max6875_update_slice() 67 if (!(data->valid & (1 << slice)) || in max6875_update_slice() 68 time_after(jiffies, data->last_updated[slice])) { in max6875_update_slice() 70 dev_dbg(&client->dev, "Starting update of slice %u\n", slice); in max6875_update_slice() 72 data->valid &= ~(1 << slice); in max6875_update_slice() 74 addr = USER_EEPROM_BASE + (slice << SLICE_BITS); in max6875_update_slice() 99 data->last_updated[slice] in max6875_update_slice() 112 int slice, max_slice; max6875_read() local [all...] |
H A D | eeprom.c | 35 u8 valid; /* bitfield, bit!=0 if slice is valid */ 42 static void eeprom_update_client(struct i2c_client *client, u8 slice) in eeprom_update_client() argument 49 if (!(data->valid & (1 << slice)) || in eeprom_update_client() 50 time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { in eeprom_update_client() 51 dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice); in eeprom_update_client() 54 for (i = slice << 5; i < (slice + 1) << 5; i += 32) in eeprom_update_client() 60 for (i = slice << 5; i < (slice in eeprom_update_client() 81 u8 slice; eeprom_read() local [all...] |
/kernel/linux/linux-6.6/rust/alloc/ |
H A D | slice.rs | 3 //! Utilities for the slice primitive type. 5 //! *[See also the slice primitive type](slice).* 8 //! using a certain function. For example, `slice.iter()` yields an [`Iter`]. 10 //! A few functions are provided to create a slice from a value reference 25 use core::slice::sort; 39 pub use core::slice::range; 41 pub use core::slice::ArrayChunks; 43 pub use core::slice::ArrayChunksMut; 45 pub use core::slice [all...] |
/third_party/node/deps/npm/node_modules/iconv-lite/encodings/ |
H A D | utf7.js | 68 res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. 77 var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); 92 res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. 94 var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); 97 base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. 98 b64str = b64str.slice(0, canBeDecoded); 162 bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); 197 return buf.slice(0, bufIdx); 204 bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); 212 return buf.slice( [all...] |
/third_party/skia/platform_tools/android/apps/skottie/ |
H A D | skottie_metric.sql | 11 FROM slice 12 INNER JOIN thread_track ON (thread_track.id = slice.track_id) 13 WHERE slice.name='dequeueBuffer' AND slice.dur >= 0 22 FROM slice 23 INNER JOIN thread_track ON (thread_track.id = slice.track_id) 25 WHERE slice.name='DrawFrame' AND slice.dur >= 0 26 ORDER BY slice.ts 36 FROM slice [all...] |
/kernel/linux/linux-5.10/arch/mips/sgi-ip27/ |
H A D | ip27-nmi.c | 37 void install_cpu_nmi_handler(int slice) in install_cpu_nmi_handler() argument 41 nmi_addr = (nmi_t *)NMI_ADDR(get_nasid(), slice); in install_cpu_nmi_handler() 56 void nmi_cpu_eframe_save(nasid_t nasid, int slice) in nmi_cpu_eframe_save() argument 64 slice * IP27_NMI_KREGS_CPU_SIZE); in nmi_cpu_eframe_save() 66 pr_emerg("NMI nasid %d: slice %d\n", nasid, slice); in nmi_cpu_eframe_save() 132 void nmi_dump_hub_irq(nasid_t nasid, int slice) in nmi_dump_hub_irq() argument 136 if (slice == 0) { /* Slice A */ in nmi_dump_hub_irq() 158 int slice; in nmi_node_eframe_save() local 164 for (slice in nmi_node_eframe_save() [all...] |
/kernel/linux/linux-6.6/arch/mips/sgi-ip27/ |
H A D | ip27-nmi.c | 37 void install_cpu_nmi_handler(int slice) in install_cpu_nmi_handler() argument 41 nmi_addr = (nmi_t *)NMI_ADDR(get_nasid(), slice); in install_cpu_nmi_handler() 56 void nmi_cpu_eframe_save(nasid_t nasid, int slice) in nmi_cpu_eframe_save() argument 64 slice * IP27_NMI_KREGS_CPU_SIZE); in nmi_cpu_eframe_save() 66 pr_emerg("NMI nasid %d: slice %d\n", nasid, slice); in nmi_cpu_eframe_save() 132 void nmi_dump_hub_irq(nasid_t nasid, int slice) in nmi_dump_hub_irq() argument 136 if (slice == 0) { /* Slice A */ in nmi_dump_hub_irq() 158 int slice; in nmi_node_eframe_save() local 164 for (slice in nmi_node_eframe_save() [all...] |