| /third_party/vixl/test/ |
| H A D | test-utils.cc | 51 void ExecuteMemory(byte* buffer, size_t size, int byte_offset) { in ExecuteMemory() argument 55 VIXL_STATIC_ASSERT(sizeof(buffer) == sizeof(test_function)); in ExecuteMemory() 57 uintptr_t entry_point = reinterpret_cast<uintptr_t>(buffer); in ExecuteMemory() 64 aarch64::CPU::EnsureIAndDCacheCoherency(buffer, size); in ExecuteMemory() 69 __builtin___clear_cache(buffer, reinterpret_cast<char*>(buffer) + size); in ExecuteMemory()
|
| /third_party/protobuf/java/core/src/main/java/com/google/protobuf/ |
| H A D | UnsafeByteOperations.java | 39 * potentially expose the backing buffer of a {@link ByteString} to the application. 42 * guaranteed that the buffer backing the {@link ByteString} will never change! Mutation of a {@link 61 * parts of the code base modifying the buffer. In fact, both parts of the code base may be correct 69 * An unsafe operation that returns a {@link ByteString} that is backed by the provided buffer. 71 * @param buffer the buffer to be wrapped 72 * @return a {@link ByteString} backed by the provided buffer 74 public static ByteString unsafeWrap(byte[] buffer) { in unsafeWrap() argument 75 return ByteString.wrap(buffer); in unsafeWrap() 80 * provided buffer 87 unsafeWrap(byte[] buffer, int offset, int length) unsafeWrap() argument 97 unsafeWrap(ByteBuffer buffer) unsafeWrap() argument [all...] |
| /third_party/skia/modules/canvaskit/ |
| H A D | gm.js | 37 WasmGMTests.LoadResource = function(name, buffer) { 39 var bytePtr = copyArrayBuffer(buffer); 40 WasmGMTests._LoadResource(name, bytePtr, buffer.byteLength); 43 function copyArrayBuffer(buffer) { 44 var ptr = WasmGMTests._malloc(buffer.byteLength); 45 WasmGMTests.HEAPU8.set(new Uint8Array(buffer), ptr);
|
| /third_party/node/test/parallel/ |
| H A D | test-fs-writev-promises.js | 20 const buffer = Buffer.from(expected); 21 const bufferArr = [buffer, buffer]; 22 const expectedLength = bufferArr.length * buffer.byteLength; 38 const buffer = Buffer.from(expected); 39 const bufferArr = [buffer, buffer, buffer]; 40 const expectedLength = bufferArr.length * buffer.byteLength;
|
| H A D | test-http-keep-alive-max-requests.js | 54 let buffer = ''; 59 buffer += data; 61 if (buffer.endsWith('\r\n\r\n')) { 66 const [headers, body] = buffer.trim().split('\r\n\r\n'); 68 buffer = ''; 96 let buffer = ''; 101 buffer += data; 103 if (buffer.endsWith('\r\n\r\n')) { 104 const [headers, body] = buffer.trim().split('\r\n\r\n');
|
| /third_party/node/deps/v8/src/wasm/ |
| H A D | local-decl-encoder.cc | 21 byte* buffer = zone->NewArray<byte, LocalDeclEncoderBuffer>(Size() + size); in Prepend() local 22 size_t pos = Emit(buffer); in Prepend() 24 memcpy(buffer + pos, *start, size); in Prepend() 27 *start = buffer; in Prepend() 28 *end = buffer + pos; in Prepend() 31 size_t LocalDeclEncoder::Emit(byte* buffer) const { in Emit() 32 byte* pos = buffer; in Emit() 47 DCHECK_EQ(Size(), pos - buffer); in Emit() 48 return static_cast<size_t>(pos - buffer); in Emit()
|
| H A D | streaming-decoder.cc | 35 // The buffer passed into OnBytesReceived is owned by the caller. 95 // state provides a buffer to store the bytes required for the current state, 132 // The buffer to store the received bytes. 133 virtual base::Vector<uint8_t> buffer() = 0; 156 // Creates a buffer for the next section of the module. 173 if (!processor_->ProcessModuleHeader(state_->buffer(), 0)) Fail(); in ProcessModuleHeader() 176 void ProcessSection(SectionBuffer* buffer) { in ProcessSection() argument 179 buffer->section_code(), buffer->payload(), in ProcessSection() 180 buffer in ProcessSection() [all...] |
| /third_party/node/deps/v8/src/heap/ |
| H A D | slot-set.cc | 27 DCHECK_LT(chunk->buffer.size(), chunk->buffer.capacity()); in Insert() 28 chunk->buffer.push_back(slot); in Insert() 50 if (head_->buffer.size() == head_->buffer.capacity()) { in EnsureChunk() 51 head_ = NewChunk(head_, NextCapacity(head_->buffer.capacity())); in EnsureChunk() 59 chunk->buffer.reserve(capacity); in NewChunk() 60 DCHECK_EQ(chunk->buffer.capacity(), capacity); in NewChunk() 84 for (TypedSlot& slot : chunk->buffer) { in IterateSlotsInRanges()
|
| /third_party/skia/third_party/externals/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/ |
| H A D | AudioStreamBase.java | 63 StringBuffer buffer = new StringBuffer(); in dump() 65 buffer.append("frames written " + framesWritten + " - read " + framesRead in dump() 72 buffer.append( in dump() 80 buffer.append("buffer size = "); in dump() 82 buffer.append("?"); in dump() 86 buffer.append(bufferSize + " = (" + numBuffers + " * " + framesPerBurst + ") + " + remainder); in dump() 88 buffer.append(", xRun# = " + ((xRunCount < 0) ? "?" : xRunCount) + "\n"); in dump() 90 return buffer.toString(); in dump() 127 public abstract int write(float[] buffer, in argument [all...] |
| /third_party/skia/src/pdf/ |
| H A D | SkPDFResourceDict.cpp | 39 char buffer[1 + kMaxResourceNameLength]; in SkPDFWriteResourceName() local 40 buffer[0] = '/'; in SkPDFWriteResourceName() 41 char* end = get_resource_name(buffer + 1, type, key); in SkPDFWriteResourceName() 42 dst->write(buffer, (size_t)(end - buffer)); in SkPDFWriteResourceName() 57 char buffer[kMaxResourceNameLength]; in resource() local 58 char* end = get_resource_name(buffer, type, index); in resource() 59 return SkString(buffer, (size_t)(end - buffer)); in resource()
|
| /third_party/ffmpeg/libavcodec/ |
| H A D | get_bits.h | 43 * don't read past input buffer boundaries. This is protected 62 const uint8_t *buffer, *buffer_end; member 154 AV_RL64((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7) 157 AV_RB64((gb)->buffer + (name ## _index >> 3)) >> (32 - (name ## _index & 7)) 162 AV_RL32((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7) 165 AV_RB32((gb)->buffer + (name ## _index >> 3)) << (name ## _index & 7) 232 if (s->index >> 3 >= s->buffer_end - s->buffer) in refill_32() 237 s->cache = (uint64_t)AV_RL32(s->buffer + (s->index >> 3)) << s->bits_left | s->cache; in refill_32() 239 s->cache = s->cache | (uint64_t)AV_RB32(s->buffer + (s->index >> 3)) << (32 - s->bits_left); in refill_32() 247 if (s->index >> 3 >= s->buffer_end - s->buffer) in refill_64() [all...] |
| H A D | webvttenc.c | 35 AVBPrint buffer; member 49 av_vbprintf(&s->buffer, str, vargs); in webvtt_print() 116 av_bprint_append_data(&s->buffer, text, len); in webvtt_text_cb() 165 av_bprint_clear(&s->buffer); in webvtt_encode_frame() 183 if (!av_bprint_is_complete(&s->buffer)) in webvtt_encode_frame() 185 if (!s->buffer.len) in webvtt_encode_frame() 188 if (s->buffer.len > bufsize) { in webvtt_encode_frame() 192 memcpy(buf, s->buffer.str, s->buffer.len); in webvtt_encode_frame() 194 return s->buffer in webvtt_encode_frame() [all...] |
| /third_party/icu/icu4c/source/i18n/ |
| H A D | collationkeys.cpp | 69 // Do not write ignored bytes right at the end of the buffer. in GetAppendBuffer() 89 * uint8_t byte buffer, similar to CharString but simpler. 100 const uint8_t *data() const { return buffer.getAlias(); } in data() 101 uint8_t operator[](int32_t index) const { return buffer[index]; } in operator []() 103 uint8_t *data() { return buffer.getAlias(); } in data() 112 U_ASSERT(len > 0 && buffer[len - 1] == 1); in appendTo() 113 sink.Append(reinterpret_cast<const char *>(buffer.getAlias()), len - 1); in appendTo() 117 MaybeStackArray<uint8_t, 40> buffer; member in __anon3310::SortKeyLevel 128 if(len < buffer.getCapacity() || ensureCapacity(1)) { in appendByte() 129 buffer[le in appendByte() 336 char buffer[3] = { p2, (char)(p >> 8), (char)p }; writeSortKeyUpToQuaternary() local [all...] |
| /third_party/mesa3d/src/gallium/drivers/radeonsi/ |
| H A D | si_sdma_copy_image.c | 38 if (src->buffer.b.b.nr_samples > 1 || dst->buffer.b.b.nr_samples > 1) in si_prepare_for_sdma_copy() 41 if (dst->buffer.b.b.last_level != 0 || src->buffer.b.b.last_level != 0) in si_prepare_for_sdma_copy() 116 uint64_t dst_address = sdst->buffer.gpu_address + sdst->surface.u.gfx9.surf_offset; in si_sdma_v4_v5_copy_texture() 117 uint64_t src_address = ssrc->buffer.gpu_address + ssrc->surface.u.gfx9.surf_offset; in si_sdma_v4_v5_copy_texture() 120 unsigned copy_width = DIV_ROUND_UP(ssrc->buffer.b.b.width0, ssrc->surface.blk_w); in si_sdma_v4_v5_copy_texture() 121 unsigned copy_height = DIV_ROUND_UP(ssrc->buffer.b.b.height0, ssrc->surface.blk_h); in si_sdma_v4_v5_copy_texture() 123 bool tmz = (ssrc->buffer.flags & RADEON_FLAG_ENCRYPTED); in si_sdma_v4_v5_copy_texture() 124 assert (!tmz || (sdst->buffer in si_sdma_v4_v5_copy_texture() [all...] |
| /third_party/node/deps/icu-small/source/i18n/ |
| H A D | collationkeys.cpp | 69 // Do not write ignored bytes right at the end of the buffer. in GetAppendBuffer() 89 * uint8_t byte buffer, similar to CharString but simpler. 100 const uint8_t *data() const { return buffer.getAlias(); } in data() 101 uint8_t operator[](int32_t index) const { return buffer[index]; } in operator []() 103 uint8_t *data() { return buffer.getAlias(); } in data() 112 U_ASSERT(len > 0 && buffer[len - 1] == 1); in appendTo() 113 sink.Append(reinterpret_cast<const char *>(buffer.getAlias()), len - 1); in appendTo() 117 MaybeStackArray<uint8_t, 40> buffer; member in __anon11961::SortKeyLevel 128 if(len < buffer.getCapacity() || ensureCapacity(1)) { in appendByte() 129 buffer[le in appendByte() 336 char buffer[3] = { p2, (char)(p >> 8), (char)p }; writeSortKeyUpToQuaternary() local [all...] |
| /third_party/skia/third_party/externals/icu/source/i18n/ |
| H A D | collationkeys.cpp | 69 // Do not write ignored bytes right at the end of the buffer. in GetAppendBuffer() 89 * uint8_t byte buffer, similar to CharString but simpler. 100 const uint8_t *data() const { return buffer.getAlias(); } in data() 101 uint8_t operator[](int32_t index) const { return buffer[index]; } in operator []() 103 uint8_t *data() { return buffer.getAlias(); } in data() 112 U_ASSERT(len > 0 && buffer[len - 1] == 1); in appendTo() 113 sink.Append(reinterpret_cast<const char *>(buffer.getAlias()), len - 1); in appendTo() 117 MaybeStackArray<uint8_t, 40> buffer; member in __anon21189::SortKeyLevel 128 if(len < buffer.getCapacity() || ensureCapacity(1)) { in appendByte() 129 buffer[le in appendByte() 336 char buffer[3] = { p2, (char)(p >> 8), (char)p }; writeSortKeyUpToQuaternary() local [all...] |
| /third_party/ltp/lib/ |
| H A D | tst_rtnetlink.c | 23 char *buffer; member 41 buf = safe_realloc(file, lineno, ctx->buffer, size); in tst_rtnl_grow_buffer() 47 offset = ((char *)ctx->curmsg) - ctx->buffer; in tst_rtnl_grow_buffer() 48 ctx->buffer = buf; in tst_rtnl_grow_buffer() 59 free(ctx->buffer); in tst_rtnl_destroy_context() 76 ctx->buffer = NULL; in tst_rtnl_create_context() 94 ctx->buffer = safe_malloc(file, lineno, NULL, ctx->bufsize); in tst_rtnl_create_context() 96 if (!ctx->buffer) { in tst_rtnl_create_context() 101 memset(ctx->buffer, 0, ctx->bufsize); in tst_rtnl_create_context() 111 // all ptr->header and ptr->info pointers point to the same buffer in tst_rtnl_free_message() 169 char tmp, *tmpbuf, *buffer = NULL; tst_rtnl_recv() local [all...] |
| /third_party/skia/third_party/externals/libjpeg-turbo/simd/arm/aarch64/ |
| H A D | jsimd.c | 46 check_cpuinfo(char *buffer, const char *field, char *value) in check_cpuinfo() argument 52 if (strncmp(buffer, field, strlen(field)) != 0) in check_cpuinfo() 54 buffer += strlen(field); in check_cpuinfo() 55 while (isspace(*buffer)) in check_cpuinfo() 56 buffer++; in check_cpuinfo() 58 /* Check if 'value' is present in the buffer as a separate word */ in check_cpuinfo() 59 while ((p = strstr(buffer, value))) { in check_cpuinfo() 60 if (p > buffer && !isspace(*(p - 1))) { in check_cpuinfo() 61 buffer++; in check_cpuinfo() 66 buffer in check_cpuinfo() 77 char *buffer = (char *)malloc(bufsize); parse_proc_cpuinfo() local 994 jsimd_huff_encode_one_block(void *state, JOCTET *buffer, JCOEFPTR block, int last_dc_val, c_derived_tbl *dctbl, c_derived_tbl *actbl) jsimd_huff_encode_one_block() argument [all...] |
| /third_party/skia/third_party/externals/dawn/src/tests/white_box/ |
| H A D | D3D12ResidencyTests.cpp | 48 // Initialize a source buffer on the GPU to serve as a source to quickly copy data to other 94 bool CheckAllocationMethod(wgpu::Buffer buffer, in CheckAllocationMethod() argument 97 dawn_native::d3d12::ToBackend(dawn_native::FromAPI((buffer.Get()))); in CheckAllocationMethod() 101 bool CheckIfBufferIsResident(wgpu::Buffer buffer) const { in CheckIfBufferIsResident() 103 dawn_native::d3d12::ToBackend(dawn_native::FromAPI((buffer.Get()))); in CheckIfBufferIsResident() 144 // Touch one of the non-resident buffers. This should cause the buffer to become resident. in TEST_P() 147 // Check that this buffer is now resident. in TEST_P() 150 // Touch everything in bufferSet2 again to evict the buffer made resident in the previous in TEST_P() 182 // Touch one of the non-resident buffers. This should cause the buffer to become resident. in TEST_P() 187 // Touch everything in bufferSet2 again to evict the buffer mad in TEST_P() 197 wgpu::Buffer buffer = CreateBuffer(4, kMapReadBufferUsage); TEST_P() local 247 wgpu::Buffer buffer = CreateBuffer(4, kMapWriteBufferUsage); TEST_P() local [all...] |
| /third_party/backends/tools/ |
| H A D | sane-find-scanner.c | 164 /* Display a buffer in the log. Display by lines of 16 bytes. */ 222 scanner_do_scsi_inquiry (unsigned char *buffer, int sfd) in scanner_do_scsi_inquiry() argument 227 memset (buffer, '\0', 256); /* clear buffer */ in scanner_do_scsi_inquiry() 232 status = sanei_scsi_cmd (sfd, inquiry.cmd, inquiry.size, buffer, &size); in scanner_do_scsi_inquiry() 237 size = get_scsi_inquiry_additional_length (buffer) + 5; in scanner_do_scsi_inquiry() 241 status = sanei_scsi_cmd (sfd, inquiry.cmd, inquiry.size, buffer, &size); in scanner_do_scsi_inquiry() 247 scanner_identify_scsi_scanner (unsigned char *buffer, int sfd, in scanner_identify_scsi_scanner() argument 261 status = scanner_do_scsi_inquiry (buffer, sfd); in scanner_identify_scsi_scanner() 271 hexdump ("Inquiry for device:", buffer, in scanner_identify_scsi_scanner() 311 unsigned char buffer[16384]; check_scsi_file() local 413 char *buffer, short_buffer[2]; get_libusb_string_descriptor() local 767 unsigned char *buffer, short_buffer[2]; get_libusb_string_descriptor() local 1168 char buffer[4096]; build_scsi_dev_list() local [all...] |
| /third_party/libsnd/src/ |
| H A D | xi.c | 331 { char buffer [64], name [32] ; in xi_read_header() local 336 psf_binheader_readf (psf, "pb", 0, buffer, 21) ; in xi_read_header() 340 buffer [20] = 0 ; in xi_read_header() 341 if (strcmp (buffer, "Extended Instrument:") != 0) in xi_read_header() 344 memset (buffer, 0, sizeof (buffer)) ; in xi_read_header() 345 psf_binheader_readf (psf, "b", buffer, 23) ; in xi_read_header() 347 if (buffer [22] != 0x1A) in xi_read_header() 350 buffer [22] = 0 ; in xi_read_header() 351 for (k = 21 ; k >= 0 && buffer [ in xi_read_header() [all...] |
| /third_party/vk-gl-cts/external/amber/src/src/ |
| H A D | pipeline.cc | 275 if (attachment.buffer->ElementCount() != in Validate() 283 if (depth_stencil_buffer_.buffer && in Validate() 284 depth_stencil_buffer_.buffer->ElementCount() != fb_width_ * fb_height_) { in Validate() 285 return Result("shared depth buffer must have same size over all PIPELINES"); in Validate() 289 if (buf.buffer->GetFormat() == nullptr) { in Validate() 290 return Result("buffer (" + std::to_string(buf.descriptor_set) + ":" + in Validate() 318 auto width = att.buffer->GetWidth(); in ValidateGraphics() 319 auto height = att.buffer->GetHeight(); in ValidateGraphics() 320 for (uint32_t level = 1; level < att.buffer->GetMipLevels(); level++) { in ValidateGraphics() 324 std::to_string(att.buffer in ValidateGraphics() 816 Buffer* buffer = nullptr; GenerateOpenCLPodBuffers() local [all...] |
| /third_party/pulseaudio/src/modules/raop/ |
| H A D | raop-client.c | 64 #include "raop-packet-buffer.h" 226 * Function to write bits into a buffer. 227 * @param buffer Handle to the buffer. It will be incremented if new data requires it. 228 * @param bit_pos A pointer to a position buffer to keep track the current write location (0 for MSB, 7 for LSB) 229 * @param size A pointer to the byte size currently written. This allows the calling function to do simple buffer overflow checks 233 static inline void bit_writer(uint8_t **buffer, uint8_t *bit_pos, size_t *size, uint8_t data, uint8_t data_bit_len) { in bit_writer() argument 244 /* Calc the number of bits left in the current byte of buffer. */ in bit_writer() 253 **buffer |= bit_data; in bit_writer() 255 **buffer in bit_writer() 317 uint32_t *buffer = NULL; build_tcp_audio_packet() local 365 uint8_t *buffer = NULL; send_tcp_audio_packet() local 408 uint32_t *buffer = NULL; build_udp_audio_packet() local 456 uint8_t *buffer = NULL; send_udp_audio_packet() local 492 uint32_t *buffer = NULL; rebuild_udp_audio_packet() local 513 uint8_t *buffer = NULL; resend_udp_audio_packets() local 549 uint32_t *buffer = NULL; build_udp_sync_packet() local 620 uint32_t *buffer = NULL; build_udp_timing_packet() local [all...] |
| /third_party/alsa-utils/bat/ |
| H A D | latencytest.c | 36 static float sumaudio(struct bat *bat, short int *buffer, int frames) in sumaudio() argument 45 sum += abs(buffer[0]); in sumaudio() 46 buffer++; in sumaudio() 55 static void play_and_listen(struct bat *bat, void *buffer, int frames) in play_and_listen() argument 65 averageinput = (int) (sumaudio(bat, buffer, frames) / frames); in play_and_listen() 70 input = buffer; in play_and_listen() 83 /* Expect at least 1 buffer of round trip latency. */ in play_and_listen() 187 int handleinput(struct bat *bat, void *buffer, int frames) in handleinput() argument 192 bat->latency.sum += sumaudio(bat, buffer, frames); in handleinput() 206 play_and_listen(bat, buffer, frame in handleinput() 227 handleoutput(struct bat *bat, void *buffer, int bytes, int frames) handleoutput() argument [all...] |
| /third_party/icu/icu4c/source/io/unicode/ |
| H A D | ustdio.h | 54 and make sure that a character that is contained across buffer boundaries 70 internal conversion buffer. For example, read the buffer size # of 72 at the end of the last buffer. 77 order to prevent buffer overruns. (e.g. %256.256d). 83 better testing. This prevents buffer overflows. 787 * @param buffer The Unicode String to which to write. 790 * @return The number of Unicode code units written to <TT>buffer</TT>. This 795 u_sprintf(UChar *buffer, 802 * units of data are stored in <TT>buffer</T [all...] |