Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 76) sorted by relevance

1234

/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiTypePrinter.kt99 buffer: StringBuilder, in <lambda>()
104 appendNullnessSuffix(nullable, buffer) // else: not null: no suffix in <lambda>()
315 val buffer = StringBuilder() in <lambda>() constant
335 buffer.append(prefix) in <lambda>()
336 buffer.append('.') in <lambda>()
340 appendAnnotations(buffer, list, elementAnnotations) in <lambda>()
342 buffer.append(target.name) in <lambda>()
345 buffer, in <lambda>()
351 appendNullnessSuffix(list, buffer, elementAnnotations) in <lambda>()
354 return buffer.toString() in <lambda>()
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/hvpm/
Dtransformers.py122 def _transform_buffer(self, buffer): argument
134 for index in range(len(buffer)):
149 buffer[index] = time_data + data.tobytes()
151 return buffer
198 def _transform_buffer(self, buffer): argument
200 for i in range(len(buffer)):
201 buffer[i] = Packet(buffer[i])
202 if (buffer[i].time_since_start >
204 self._process_dropped_count(buffer[i])
206 return buffer
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/lvpm_stock/
Dstock_transformers.py85 def _transform_buffer(self, buffer): argument
91 for index in range(len(buffer)):
99 buffer[index] = time_data + data
101 return buffer
154 def _transform_buffer(self, buffer): argument
162 def _transform_buffer(self, buffer): argument
169 for i, packet in enumerate(buffer):
182 buffer[i] = None
185 buffer[i] = Packet(packet, time_since_start, time_of_read)
187 return buffer
[all …]
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/
DSector.java37 protected final ByteBuffer buffer; field in Sector
44 this.buffer = ByteBuffer.allocate(size); in Sector()
45 this.buffer.order(ByteOrder.LITTLE_ENDIAN); in Sector()
57 buffer.rewind(); in read()
58 buffer.limit(buffer.capacity()); in read()
59 device.read(offset, buffer); in read()
83 buffer.position(0); in write()
84 buffer.limit(buffer.capacity()); in write()
85 device.write(offset, buffer); in write()
90 return buffer.getShort(offset) & 0xffff; in get16()
[all …]
DFsInfoSector.java145 buffer.position(0x00); in init()
146 buffer.put((byte) 0x52); in init()
147 buffer.put((byte) 0x52); in init()
148 buffer.put((byte) 0x61); in init()
149 buffer.put((byte) 0x41); in init()
153 buffer.position(0x1e4); in init()
154 buffer.put((byte) 0x72); in init()
155 buffer.put((byte) 0x72); in init()
156 buffer.put((byte) 0x41); in init()
157 buffer.put((byte) 0x61); in init()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/zip/
DZipUtils.java236 static void assertByteOrderLittleEndian(ByteBuffer buffer) { in assertByteOrderLittleEndian() argument
237 if (buffer.order() != ByteOrder.LITTLE_ENDIAN) { in assertByteOrderLittleEndian()
242 public static int getUnsignedInt16(ByteBuffer buffer, int offset) { in getUnsignedInt16() argument
243 return buffer.getShort(offset) & 0xffff; in getUnsignedInt16()
246 public static int getUnsignedInt16(ByteBuffer buffer) { in getUnsignedInt16() argument
247 return buffer.getShort() & 0xffff; in getUnsignedInt16()
250 static void setUnsignedInt16(ByteBuffer buffer, int offset, int value) { in setUnsignedInt16() argument
254 buffer.putShort(offset, (short) value); in setUnsignedInt16()
257 static void setUnsignedInt32(ByteBuffer buffer, int offset, long value) { in setUnsignedInt32() argument
261 buffer.putInt(offset, (int) value); in setUnsignedInt32()
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/engine/
Dtransformer.py68 def _transform_buffer(self, buffer): argument
134 buffer = self._transform_buffer(indexed_buffer.buffer)
135 if buffer is BufferStream.END:
137 indexed_buffer.buffer = buffer
143 def _transform_buffer(self, buffer): argument
164 buffer_or_buffers = self._transform_buffer(indexed_buffer.buffer)
182 for buffer in buffer_list:
183 new_buffer = IndexedBuffer(self._next_index, buffer)
187 def _transform_buffer(self, buffer): argument
203 buffer = self._transform_buffer(indexed_buffer.buffer)
[all …]
Dtransformers.py51 def _transform_buffer(self, buffer): argument
57 for sample in buffer:
64 return BufferList([buffer])
83 def _transform_buffer(self, buffer): argument
89 for sample in buffer:
94 return buffer
127 def _transform_buffer(self, buffer): argument
163 (len(buffer) + len(self._leftovers)) % self._mean_width)
165 tailless_buffer = np.array(buffer[:len(buffer) - tail_length])
175 self._leftovers = buffer[len(buffer) - tail_length:]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/
DDataSlice.kt19 data class DataSlice(var buffer: ByteArray, variable in trebuchet.io.DataSlice
28 constructor(buffer: ByteArray) : this(buffer, 0, buffer.size)
31 inline operator fun get(i: Int): Byte = buffer[startIndex + i] in get()
36 dest.set(buffer, this.startIndex + startIndex, this.startIndex + endIndex) in get()
42 fun set(buffer: ByteArray, startIndex: Int, endIndex: Int) { in set()
43 this.buffer = buffer in set()
58 if (buffer[myIndex] != other.buffer[otherIndex]) { in equals()
73 hash = 31 * hash + buffer[i].toInt() in hashCode()
80 override fun toString() = String(buffer, startIndex, length) in toString()
83 if (length - buffer.size < 50) { in toString()
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/
Dtransformers_test.py116 buffer = [
125 values = downsampler._transform_buffer(buffer)
127 self.assertEqual(len(values), len(buffer) / 2)
131 ((buffer[2 * i] + buffer[2 * i + 1]) / 2).main_current)
135 buffer = [
143 downsampler._transform_buffer(buffer)
146 self.assertIn(buffer[-2], downsampler._leftovers)
147 self.assertIn(buffer[-1], downsampler._leftovers)
156 buffer = [
163 values = downsampler._transform_buffer(buffer)
[all …]
Dtransformer_test.py125 output_stream.add_indexed_buffer.call_args[ARGS][0].buffer)
131 buffer = [0, 1, 2]
133 side_effect=[buffer, buffer, buffer, BufferStream.END])
195 self.assertEqual(expected_buffer, call[ARGS][0].buffer)
261 output_stream.add_indexed_buffer.call_args_list[0][ARGS][0].buffer)
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/util/
DBufferReader.kt26 open class BufferReaderState(var buffer: ByteArray, var index: Int, var endIndexExclusive: Int) { in isDigit() variable in trebuchet.util.BufferReaderState
29 inline fun peek() = buffer[index] in isDigit()
31 inline fun isDigit() = buffer[index].isDigit() in isDigit()
42 while (index < endIndexExclusive && buffer[index] == char) { index++ } in isDigit()
56 val foundAt = search.find(buffer, index, endIndexExclusive) in isDigit()
60 inline fun readByte() = buffer[index++] in isDigit()
116 tempPreview.buffer = reader.buffer in read()
138 return buffer[this@BufferReader.index + index].toChar() in get()
148 this.buffer = slice.buffer in reset()
170 val c = buffer[index] - '0'.toByte() in readLong()
[all …]
DStringSearch.kt134 … fun find(buffer: GenericByteBuffer, startIndex: Long = 0, endIndex: Long = buffer.length): Long { in find()
138 while (lookForIndex >= 0 && buffer[index] == lookFor[lookForIndex].toByte()) { in find()
146 index += maxOf(skipLut[buffer[index].toInt() and 0xFF], suffixSkip[lookForIndex]) in find()
151 fun find(buffer: ByteArray, startIndex: Int = 0, endIndex: Int = buffer.size): Int { in find()
155 while (lookForIndex >= 0 && buffer[index] == lookFor[lookForIndex].toByte()) { in find()
163 index += maxOf(skipLut[buffer[index].toInt() and 0xFF], suffixSkip[lookForIndex]) in find()
170 val buffer = window.slice in findInWindow() constant
174 while (lookForIndex >= 0 && buffer[index] == lookFor[lookForIndex].toByte()) { in findInWindow()
182 index += maxOf(skipLut[buffer[index].toInt() and 0xFF], suffixSkip[lookForIndex]) in findInWindow()
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DChainedDataSourceTest.java72 ByteBuffer buffer = mChain.getByteBuffer(begin, size); in getByteBufferFromAllPossibleRanges() local
75 buffer); in getByteBufferFromAllPossibleRanges()
90 ByteBuffer buffer = ByteBuffer.allocate(size); in copyTo() local
91 mChain.copyTo(begin, size, buffer); in copyTo()
92 assertEquals(size, buffer.position()); in copyTo()
94 buffer.rewind(); in copyTo()
97 buffer); in copyTo()
107 ByteBuffer buffer = mChain.slice(begin, size).getByteBuffer(0, size); in slice() local
111 buffer); in slice()
116 private void assertByteBufferEquals(ByteBuffer buffer, ByteBuffer buffer2) { in assertByteBufferEquals() argument
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DVerityTreeBuilder.java173 ByteBuffer buffer = ByteBuffer.allocate(CHUNK_SIZE); in digestDataByChunks() local
174 dataSource.copyTo(offset, CHUNK_SIZE, buffer); in digestDataByChunks()
175 buffer.rewind(); in digestDataByChunks()
176 byte[] hash = saltedDigest(buffer); in digestDataByChunks()
183 ByteBuffer buffer; in digestDataByChunks() local
184 buffer = ByteBuffer.allocate(CHUNK_SIZE); // initialized to 0. in digestDataByChunks()
185 dataSource.copyTo(offset, remaining, buffer); in digestDataByChunks()
186 buffer.rewind(); in digestDataByChunks()
188 byte[] hash = saltedDigest(buffer); in digestDataByChunks()
209 private static ByteBuffer slice(ByteBuffer buffer, int begin, int end) { in slice() argument
[all …]
DByteBufferDataSource.java36 public ByteBufferDataSource(ByteBuffer buffer) { in ByteBufferDataSource() argument
37 this(buffer, true); in ByteBufferDataSource()
44 private ByteBufferDataSource(ByteBuffer buffer, boolean sliceRequired) { in ByteBufferDataSource() argument
45 mBuffer = (sliceRequired) ? buffer.slice() : buffer; in ByteBufferDataSource()
46 mSize = buffer.remaining(); in ByteBufferDataSource()
DChainedDataSource.java86 ByteBuffer buffer = ByteBuffer.allocate(size); in getByteBuffer() local
87 for (; i < mSources.length && buffer.hasRemaining(); i++) { in getByteBuffer()
88 long sizeToCopy = Math.min(mSources[i].size() - offset, buffer.remaining()); in getByteBuffer()
89 mSources[i].copyTo(offset, Math.toIntExact(sizeToCopy), buffer); in getByteBuffer()
92 buffer.rewind(); in getByteBuffer()
93 return buffer; in getByteBuffer()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/extractors/
DZlibExtractor.kt28 private fun findStart(buffer: GenericByteBuffer): Long { in findStart()
29 var start = buffer.indexOf(TRACE, 100) in findStart()
35 while (start < buffer.length && in findStart()
36 (buffer[start] == '\n'.toByte() || buffer[start] == '\r'.toByte())) { in findStart()
56 inflater.setInput(nextBuffer.buffer, nextBuffer.startIndex, nextBuffer.length) in <lambda>()
96 override fun extractorFor(buffer: GenericByteBuffer, feedback: ImportFeedback): Extractor? { in extractorFor()
97 val start = findStart(buffer) in extractorFor()
98 val toRead = minOf((buffer.length - start).toInt(), SIZE_TO_CHECK) in extractorFor()
107 val tmpBuffer = ByteArray(toRead) { buffer[start + it] } in extractorFor()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/collections/
DSparseArray.kt328 val buffer = StringBuilder(mSize * 28) in toString() constant
329 buffer.append('{') in toString()
332 buffer.append(", ") in toString()
335 buffer.append(key) in toString()
336 buffer.append('=') in toString()
339 buffer.append(value) in toString()
341 buffer.append("(this Map)") in toString()
344 buffer.append('}') in toString()
345 return buffer.toString() in toString()
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/util/
DRamDisk.java58 final byte[] buffer = new byte[4096]; in readGzipped()
60 int read = zis.read(buffer); in readGzipped()
65 bos.write(buffer, 0, read); in readGzipped()
66 read = zis.read(buffer); in readGzipped()
76 private RamDisk(ByteBuffer buffer, int sectorSize) { in RamDisk() argument
77 this.size = buffer.limit(); in RamDisk()
79 this.data = buffer; in RamDisk()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DExtraField.java147 ByteBuffer buffer = ByteBuffer.wrap(rawData); in parseSegments() local
149 while (buffer.remaining() > 0) { in parseSegments()
150 int headerId = LittleEndianUtils.readUnsigned2Le(buffer); in parseSegments()
151 int dataSize = LittleEndianUtils.readUnsigned2Le(buffer); in parseSegments()
161 if (buffer.remaining() < dataSize) { in parseSegments()
168 + buffer.remaining() in parseSegments()
171 buffer.get(data); in parseSegments()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DAndroidBinXmlParser.java839 private static int getUnsignedInt8(ByteBuffer buffer) { in getUnsignedInt8() argument
840 return buffer.get() & 0xff; in getUnsignedInt8()
843 private static int getUnsignedInt16(ByteBuffer buffer) { in getUnsignedInt16() argument
844 return buffer.getShort() & 0xffff; in getUnsignedInt16()
847 private static long getUnsignedInt32(ByteBuffer buffer) { in getUnsignedInt32() argument
848 return buffer.getInt() & 0xffffffffL; in getUnsignedInt32()
851 private static long getUnsignedInt32(ByteBuffer buffer, int position) { in getUnsignedInt32() argument
852 return buffer.getInt(position) & 0xffffffffL; in getUnsignedInt32()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DConfigCompletorTest.java46 final String buffer = "run "; in testFullList() local
47 mConfigCompletor.complete(buffer, buffer.length(), mCandidates); in testFullList()
55 final String buffer = "run util/wi"; in testPartialMatch() local
56 mConfigCompletor.complete(buffer, buffer.length(), mCandidates); in testPartialMatch()
/tools/tradefederation/core/src/com/android/tradefed/util/
DConfigCompletor.java42 public int complete(String buffer, int cursor, List candidates) { in complete() argument
44 if (buffer.trim().equals("run")) { in complete()
46 } else if (buffer.startsWith("run ")) { in complete()
47 Matcher matcher = mRunPattern.matcher(buffer); in complete()
51 if (match.startsWith(buffer)) { in complete()
55 return buffer.length() - matcher.group(2).length(); in complete()
/tools/test/graphicsbenchmark/functional_tests/native/
Dmprotect_test.cpp31 char *buffer; variable
147 … vkMapMemory(device, testBufferMemory, bufferOffset, pagesInBuffer * pagesize, 0, (void**)&buffer); in TEST()
149 ASSERT_NE(buffer, nullptr) << "vkMapMemory() returned a null buffer."; in TEST()
153 …ASSERT_EQ(mprotect(buffer - bufferOffset, pagesInBuffer * pagesize + 1, PROT_READ), 0) << "mprotec… in TEST()
155 for (char *p = buffer; p != (buffer + pagesInBuffer * pagesize); p++) { in TEST()

1234