| /third_party/protobuf/java/core/src/main/java/com/google/protobuf/ |
| H A D | ByteString.java | 100 * System.arraycopy} is nullification of a new buffer before the copy. It has been shown the 376 static ByteString wrap(ByteBuffer buffer) { in wrap() argument 377 if (buffer.hasArray()) { in wrap() 378 final int offset = buffer.arrayOffset(); in wrap() 379 return ByteString.wrap(buffer.array(), offset + buffer.position(), buffer.remaining()); in wrap() 381 return new NioByteString(buffer); in wrap() 406 * @param bytes source buffer 531 * buffer i 999 private byte[] buffer; global() field in ByteString.Output 1057 copyArray(byte[] buffer, int length) copyArray() argument 1174 private final byte[] buffer; global() field in ByteString.CodedBuilder [all...] |
| /third_party/protobuf/src/google/protobuf/stubs/ |
| H A D | strutil.h | 60 // to identifiers in the protocol buffer language, not to natural-language 302 // a dest buffer. This should be used for non performance critical 458 // All functions take the output buffer as an arg. 460 // which may not be the beginning of the input buffer. 463 // Suggested buffer size for FastToBuffer functions. Also works with 467 PROTOBUF_EXPORT char* FastInt32ToBuffer(int32 i, char* buffer); 468 PROTOBUF_EXPORT char* FastInt64ToBuffer(int64 i, char* buffer); 469 char* FastUInt32ToBuffer(uint32 i, char* buffer); // inline below 470 char* FastUInt64ToBuffer(uint64 i, char* buffer); // inline below 471 PROTOBUF_EXPORT char* FastHexToBuffer(int i, char* buffer); 476 FastIntToBuffer(int i, char* buffer) FastIntToBuffer() argument 480 FastUIntToBuffer(unsigned int i, char* buffer) FastUIntToBuffer() argument 484 FastLongToBuffer(long i, char* buffer) FastLongToBuffer() argument 488 FastULongToBuffer(unsigned long i, char* buffer) FastULongToBuffer() argument 515 FastUInt32ToBuffer(uint32 i, char* buffer) FastUInt32ToBuffer() argument 519 FastUInt64ToBuffer(uint64 i, char* buffer) FastUInt64ToBuffer() argument [all...] |
| /third_party/mesa3d/src/gallium/drivers/radeonsi/ |
| H A D | si_texture.c | 330 ctx->flush_resource(ctx, &tex->buffer.b.b); in si_eliminate_fast_color_clear() 348 assert(tex->buffer.b.b.nr_samples <= 1); in si_texture_discard_cmask() 351 tex->cmask_base_address_reg = tex->buffer.gpu_address >> 8; in si_texture_discard_cmask() 356 if (tex->cmask_buffer != &tex->buffer) in si_texture_discard_cmask() 371 (!tex->buffer.b.is_shared || in si_can_disable_dcc() 372 !(tex->buffer.external_usage & PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) && in si_can_disable_dcc() 432 struct pipe_resource templ = tex->buffer.b.b; in si_reallocate_texture_inplace() 437 if (tex->buffer.b.is_shared || tex->num_planes > 1) in si_reallocate_texture_inplace() 461 si_resource_copy_region(&sctx->b, &new_tex->buffer.b.b, in si_reallocate_texture_inplace() 462 i, 0, 0, 0, &tex->buffer in si_reallocate_texture_inplace() [all...] |
| /foundation/graphic/graphic_2d/rosen/samples/hello_native_buffer/ |
| H A D | hello_native_buffer.cpp | 68 OH_NativeBuffer* buffer = OH_NativeBuffer_Alloc(&config); in main() local 69 if (buffer == nullptr) { in main() 73 int32_t ret = OH_NativeBuffer_Reference(buffer); in main() 79 OH_NativeBuffer_GetConfig(buffer, &checkConfig); in main() 82 uint32_t hwBufferID = OH_NativeBuffer_GetSeqNum(buffer); in main() 83 OHOS::SurfaceBuffer *sfBuffer = SurfaceBuffer::NativeBufferToSurfaceBuffer(buffer); in main() 94 ret = OH_NativeBuffer_Map(buffer, &virAddr); in main() 104 ret = OH_NativeBuffer_Unreference(buffer); in main() 113 ret = OH_NativeBuffer_Unmap(buffer); in main() 118 ret = OH_NativeBuffer_Unreference(buffer); in main() [all...] |
| /foundation/graphic/graphic_2d/rosen/modules/composer/hdi_backend/test/systemtest/ |
| H A D | hdilayer_context_systest.cpp | 54 sptr<SurfaceBuffer> buffer; in DrawBufferColor() local 64 GSError ret = pSurface_->RequestBuffer(buffer, releaseFence, config); in DrawBufferColor() 71 if (buffer == nullptr) { in DrawBufferColor() 75 auto addr = static_cast<uint8_t *>(buffer->GetVirAddr()); in DrawBufferColor() 76 DrawColor(addr, (uint32_t)buffer->GetWidth(), (uint32_t)buffer->GetHeight()); in DrawBufferColor() 85 ret = pSurface_->FlushBuffer(buffer, -1, flushConfig); in DrawBufferColor() 102 sptr<SurfaceBuffer> buffer = nullptr; in FillHdiLayer() local 106 GSError ret = cSurface_->AcquireBuffer(buffer, acquireFence, timestamp, damage); in FillHdiLayer() 113 hdiLayer_->SetBuffer(buffer, acquireSyncFenc in FillHdiLayer() [all...] |
| /foundation/multimedia/media_foundation/engine/foundation/utils/ |
| H A D | dump_buffer.cpp | 49 void DumpBufferToFile(const std::string& fileName, const std::shared_ptr<Plugin::Buffer>& buffer) in DumpBufferToFile() argument 52 if (buffer->GetMemory() == nullptr) { in DumpBufferToFile() 56 size_t bufferSize = buffer->GetMemory()->GetSize(); in DumpBufferToFile() 58 auto addr = reinterpret_cast<const char*>(buffer->GetMemory()->GetReadOnlyData()); in DumpBufferToFile() 99 void DumpBufferToLog(const char* desc, const std::shared_ptr<Plugin::Buffer>& buffer, uint64_t offset, size_t dumpSize) in DumpBufferToLog() argument 101 FALSE_RETURN_MSG(buffer && (!buffer->IsEmpty()), PUBLIC_LOG_S " Buffer(null or empty)", desc); in DumpBufferToLog() 102 size_t bufferSize = buffer->GetMemory()->GetSize(); in DumpBufferToLog() 105 char tmpStr[2 * DUMP_BUFFER2LOG_SIZE + 10] = {0}; // 字符串长度是打印的buffer长度的2倍 + 1 (字符串结束符) in DumpBufferToLog() 108 const uint8_t* p = buffer in DumpBufferToLog() [all...] |
| /foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/ |
| H A D | raw_stream_data.cpp | 30 raw->InitStreamData(std::move(data.buffer), data.bufLen, std::move(data.extBuffer), data.extLen); in MakeRawStream() 50 auto buffer = std::make_unique<char[]>(bufLen); in MakeRawStream() local 51 auto ret = memcpy_s(buffer.get(), bufLen, buf, bufLen); in MakeRawStream() 56 raw->InitStreamData(std::move(buffer), bufLen, nullptr, 0); in MakeRawStream() 61 auto buffer = std::make_unique<char[]>(bufLen + RawStreamData::FRAME_HEADER_LEN); in MakeRawStream() local 62 auto ret = memcpy_s(buffer.get() + RawStreamData::FRAME_HEADER_LEN, bufLen, buf, bufLen); in MakeRawStream() 68 reinterpret_cast<uint8_t *>(buffer.get())); in MakeRawStream() 70 raw->InitStreamData(std::move(buffer), bufLen + RawStreamData::FRAME_HEADER_LEN, nullptr, 0); in MakeRawStream() 75 int RawStreamData::InitStreamData(std::unique_ptr<char[]> buffer, ssize_t bufLen, in InitStreamData() argument 78 streamData_ = std::move(buffer); in InitStreamData() [all...] |
| /test/xts/device_attest/services/devattest_ability/test/tdd/gtest/src/ |
| H A D | attest_tdd_mock_hal.c | 103 int32_t AttestReadAuthStatus(char* buffer, uint32_t bufferLen) in AttestReadAuthStatus() argument 105 int32_t ret = memcpy_s(buffer, bufferLen, ATTEST_MOCK_HAL_STATUS, ATTEST_MOCK_HAL_STATUS_LEN); in AttestReadAuthStatus() 114 int32_t AttestReadAuthResultCode(char* buffer, uint32_t bufferLen) in AttestReadAuthResultCode() argument 116 int32_t ret = memcpy_s(buffer, bufferLen, ATTEST_RESULT_CODE, ATTEST_RESULT_CODE_LEN); in AttestReadAuthResultCode() 125 int32_t AttestWriteNetworkConfig(const char* buffer, uint32_t bufferLen) in AttestWriteNetworkConfig() argument 127 (void)buffer; in AttestWriteNetworkConfig() 132 int32_t AttestReadNetworkConfig(char* buffer, uint32_t bufferLen) in AttestReadNetworkConfig() argument 134 int32_t ret = memcpy_s(buffer, bufferLen, ATTEST_MOCK_HAL_NETWORK_CONFIG, ATTEST_MOCK_HAL_NETWORK_CONFIG_LEN); in AttestReadNetworkConfig() 138 int32_t AttestReadDefaultNetworkConfig(char* buffer, uint32_t bufferLen) in AttestReadDefaultNetworkConfig() argument 140 (void)buffer; in AttestReadDefaultNetworkConfig() [all...] |
| /third_party/cJSON/tests/ |
| H A D | parse_array.c | 47 parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } }; in assert_not_array() local 48 buffer.content = (const unsigned char*)json; in assert_not_array() 49 buffer.length = strlen(json) + sizeof(""); in assert_not_array() 50 buffer.hooks = global_hooks; in assert_not_array() 52 TEST_ASSERT_FALSE(parse_array(item, &buffer)); in assert_not_array() 58 parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } }; in assert_parse_array() local 59 buffer.content = (const unsigned char*)json; in assert_parse_array() 60 buffer.length = strlen(json) + sizeof(""); in assert_parse_array() 61 buffer.hooks = global_hooks; in assert_parse_array() 63 TEST_ASSERT_TRUE(parse_array(item, &buffer)); in assert_parse_array() [all...] |
| /third_party/icu/icu4c/source/common/ |
| H A D | charstr.h | 43 CharString() : len(0) { buffer[0]=0; } in CharString() 45 buffer[0]=0; in CharString() 49 buffer[0]=0; in CharString() 53 buffer[0]=0; in CharString() 80 char operator[](int32_t index) const { return buffer[index]; } in operator []() 81 StringPiece toStringPiece() const { return StringPiece(buffer.getAlias(), len); } in toStringPiece() 83 const char *data() const { return buffer.getAlias(); } in data() 84 char *data() { return buffer.getAlias(); } in data() 100 * @param dest Destination string buffer. 101 * @param capacity Size of the dest buffer (numbe 175 MaybeStackArray<char, 40> buffer; global() member in CharString [all...] |
| /third_party/mesa3d/src/gallium/drivers/virgl/ |
| H A D | virgl_streamout.c | 32 struct pipe_resource *buffer, in virgl_create_so_target() 37 struct virgl_resource *res = virgl_resource(buffer); in virgl_create_so_target() 47 pipe_resource_reference(&t->base.buffer, buffer); in virgl_create_so_target() 67 pipe_resource_reference(&t->base.buffer, NULL); in virgl_destroy_so_target() 82 struct virgl_resource *res = virgl_resource(targets[i]->buffer); in virgl_set_so_targets() 84 pipe_resource_reference(&vctx->so_targets[i].base.buffer, targets[i]->buffer); in virgl_set_so_targets() 88 pipe_resource_reference(&vctx->so_targets[i].base.buffer, NULL); in virgl_set_so_targets() 92 pipe_resource_reference(&vctx->so_targets[i].base.buffer, NUL in virgl_set_so_targets() 30 virgl_create_so_target( struct pipe_context *ctx, struct pipe_resource *buffer, unsigned buffer_offset, unsigned buffer_size) virgl_create_so_target() argument [all...] |
| /third_party/node/test/fixtures/wpt/wasm/jsapi/exception/ |
| H A D | basic.tentative.any.js | 24 const buffer = builder.toBuffer(); 25 const {instance} = await WebAssembly.instantiate(buffer, {}); 55 const buffer = builder.toBuffer(); 56 const {instance} = await WebAssembly.instantiate(buffer, {}); 69 const buffer = builder.toBuffer(); 70 const {instance} = await WebAssembly.instantiate(buffer, {}); 89 const buffer = builder.toBuffer(); 93 const {instance} = await WebAssembly.instantiate(buffer, { 113 const buffer = builder.toBuffer(); 117 const {instance} = await WebAssembly.instantiate(buffer, { [all...] |
| /third_party/node/deps/icu-small/source/common/ |
| H A D | charstr.h | 43 CharString() : len(0) { buffer[0]=0; } in CharString() 45 buffer[0]=0; in CharString() 49 buffer[0]=0; in CharString() 53 buffer[0]=0; in CharString() 80 char operator[](int32_t index) const { return buffer[index]; } in operator []() 81 StringPiece toStringPiece() const { return StringPiece(buffer.getAlias(), len); } in toStringPiece() 83 const char *data() const { return buffer.getAlias(); } in data() 84 char *data() { return buffer.getAlias(); } in data() 100 * @param dest Destination string buffer. 101 * @param capacity Size of the dest buffer (numbe 175 MaybeStackArray<char, 40> buffer; global() member in CharString [all...] |
| /third_party/icu/icu4c/source/io/ |
| H A D | ustream.cpp | 43 char buffer[200]; in operator <<() local 52 char *s, *sLimit = buffer + (sizeof(buffer) - 1); in operator <<() 55 s = buffer; in operator <<() 60 if(s > buffer) { in operator <<() 61 stream << buffer; in operator <<() local 82 char buffer[16]; in operator >>() local 132 buffer[idx++] = ch; in operator >>() 134 stream.putback(buffer[--idx]); in operator >>() 157 buffer[id in operator >>() [all...] |
| /third_party/mesa3d/src/gallium/drivers/i915/ |
| H A D | i915_resource_buffer.c | 48 struct i915_buffer *buffer = i915_buffer(resource); in i915_resource_destroy() local 49 if (buffer->free_on_destroy) in i915_resource_destroy() 50 align_free(buffer->data); in i915_resource_destroy() 51 FREE(buffer); in i915_resource_destroy() 57 if (tex->buffer) in i915_resource_destroy() 58 iws->buffer_destroy(iws, tex->buffer); in i915_resource_destroy() 74 struct i915_buffer *buffer = i915_buffer(resource); in i915_buffer_transfer_map() local 86 return buffer->data + transfer->box.x; in i915_buffer_transfer_map() 102 struct i915_buffer *buffer = i915_buffer(resource); in i915_buffer_subdata() local 104 memcpy(buffer in i915_buffer_subdata() [all...] |
| /third_party/mesa3d/src/gallium/auxiliary/util/ |
| H A D | u_suballoc.c | 29 /* A simple allocator that suballocates memory from a large buffer. */ 43 * \param zero_buffer_memory determines whether the buffer contents should be 67 pipe_resource_reference(&allocator->buffer, NULL); in u_suballocator_destroy() 77 /* Don't allow allocations larger than the buffer size. */ in u_suballocator_alloc() 81 /* Make sure we have enough space in the buffer. */ in u_suballocator_alloc() 82 if (!allocator->buffer || in u_suballocator_alloc() 84 /* Allocate a new buffer. */ in u_suballocator_alloc() 85 pipe_resource_reference(&allocator->buffer, NULL); in u_suballocator_alloc() 101 allocator->buffer = screen->resource_create(screen, &templ); in u_suballocator_alloc() 102 if (!allocator->buffer) in u_suballocator_alloc() [all...] |
| /third_party/node/deps/openssl/openssl/providers/implementations/rands/seeding/ |
| H A D | rand_win.c | 52 unsigned char *buffer; in ossl_pool_acquire_entropy() local 71 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 72 if (buffer != NULL) { in ossl_pool_acquire_entropy() 74 if (BCryptGenRandom(NULL, buffer, bytes_needed, in ossl_pool_acquire_entropy() 85 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 86 if (buffer != NULL) { in ossl_pool_acquire_entropy() 91 if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0) in ossl_pool_acquire_entropy() 104 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 105 if (buffer != NULL) { in ossl_pool_acquire_entropy() 111 if (CryptGenRandom(hProvider, bytes_needed, buffer) ! in ossl_pool_acquire_entropy() [all...] |
| /third_party/vk-gl-cts/external/amber/src/src/vulkan/ |
| H A D | push_constant.cc | 49 return a.offset + static_cast<uint32_t>(a.buffer->GetSizeInBytes()) < in GetVkPushConstantRange() 50 b.offset + static_cast<uint32_t>(b.buffer->GetSizeInBytes()); in GetVkPushConstantRange() 55 static_cast<uint32_t>(it->buffer->GetSizeInBytes()) - in GetVkPushConstantRange() 105 Result PushConstant::AddBuffer(const Buffer* buffer, uint32_t offset) { in AddBuffer() argument 108 push_constant_data_.back().buffer = buffer; in AddBuffer() 118 if (input.buffer->GetSizeInBytes() > in UpdateMemoryWithInput() 126 buffer_->SetFormat(input.buffer->GetFormat()); in UpdateMemoryWithInput() 127 } else if (!buffer_->GetFormat()->Equal(input.buffer->GetFormat())) { in UpdateMemoryWithInput() 131 buffer_->SetDataFromBuffer(input.buffer, inpu in UpdateMemoryWithInput() [all...] |
| /third_party/skia/src/gpu/ |
| H A D | GrBufferAllocPool.h | 30 * At creation time a minimum per-buffer size can be specified. Additionally, 40 * cpu buffer allocations to avoid reallocating them. 84 * GPU buffer objects. 91 * Returns a block of memory to hold data. A buffer designated to hold the 92 * data is given to the caller. The buffer may or may not be locked. The 100 * buffer at the offset indicated by offset. Until that time it may be 101 * in temporary storage and/or the buffer may be locked. 104 * @param alignment alignment constraint from start of buffer 105 * @param buffer returns the buffer tha 323 makeSpace(int drawCount, sk_sp<const GrBuffer>* buffer, size_t* offset) makeSpace() argument 332 makeIndexedSpace(int drawCount, sk_sp<const GrBuffer>* buffer, size_t* offset) makeIndexedSpace() argument [all...] |
| /third_party/openssl/providers/implementations/rands/seeding/ |
| H A D | rand_win.c | 52 unsigned char *buffer; in ossl_pool_acquire_entropy() local 71 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 72 if (buffer != NULL) { in ossl_pool_acquire_entropy() 74 if (BCryptGenRandom(NULL, buffer, bytes_needed, in ossl_pool_acquire_entropy() 85 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 86 if (buffer != NULL) { in ossl_pool_acquire_entropy() 91 if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0) in ossl_pool_acquire_entropy() 104 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy() 105 if (buffer != NULL) { in ossl_pool_acquire_entropy() 111 if (CryptGenRandom(hProvider, bytes_needed, buffer) ! in ossl_pool_acquire_entropy() [all...] |
| /third_party/skia/third_party/externals/icu/source/io/ |
| H A D | ustream.cpp | 43 char buffer[200]; in operator <<() local 52 char *s, *sLimit = buffer + (sizeof(buffer) - 1); in operator <<() 55 s = buffer; in operator <<() 60 if(s > buffer) { in operator <<() 61 stream << buffer; in operator <<() local 82 char buffer[16]; in operator >>() local 132 buffer[idx++] = ch; in operator >>() 134 stream.putback(buffer[--idx]); in operator >>() 157 buffer[id in operator >>() [all...] |
| /third_party/skia/tests/ |
| H A D | MemsetTest.cpp | 48 uint16_t buffer[TOTAL]; in test_16() local 52 set_zero(buffer, sizeof(buffer)); in test_16() 54 uint16_t* base = &buffer[PAD + alignment]; in test_16() 57 compare16(reporter, buffer, 0, PAD + alignment); in test_16() 65 uint32_t buffer[TOTAL]; in test_32() local 69 set_zero(buffer, sizeof(buffer)); in test_32() 71 uint32_t* base = &buffer[PAD + alignment]; in test_32() 74 compare32(reporter, buffer, in test_32() [all...] |
| /third_party/skia/src/shaders/gradients/ |
| H A D | SkSweepGradient.cpp | 36 sk_sp<SkFlattenable> SkSweepGradient::CreateProc(SkReadBuffer& buffer) { 38 if (!desc.unflatten(buffer)) { 41 const SkPoint center = buffer.readPoint(); 43 const auto tBias = buffer.readScalar(), 44 tScale = buffer.readScalar(); 53 void SkSweepGradient::flatten(SkWriteBuffer& buffer) const { 54 this->INHERITED::flatten(buffer); 55 buffer.writePoint(fCenter); 56 buffer.writeScalar(fTBias); 57 buffer [all...] |
| /third_party/skia/third_party/externals/icu/source/common/ |
| H A D | charstr.h | 43 CharString() : len(0) { buffer[0]=0; } in CharString() 45 buffer[0]=0; in CharString() 49 buffer[0]=0; in CharString() 53 buffer[0]=0; in CharString() 80 char operator[](int32_t index) const { return buffer[index]; } in operator []() 81 StringPiece toStringPiece() const { return StringPiece(buffer.getAlias(), len); } in toStringPiece() 83 const char *data() const { return buffer.getAlias(); } in data() 84 char *data() { return buffer.getAlias(); } in data() 100 * @param dest Destination string buffer. 101 * @param capacity Size of the dest buffer (numbe 175 MaybeStackArray<char, 40> buffer; global() member in CharString [all...] |
| /kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
| H A D | dynptr_fail.c | 257 char buffer[sizeof(*hdr)] = {}; in data_slice_out_of_bounds_skb() local 261 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in data_slice_out_of_bounds_skb() 1077 char buffer[sizeof(*hdr)] = {}; in skb_invalid_slice_write() local 1081 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_slice_write() 1098 char buffer[sizeof(*hdr)] = {}; in skb_invalid_data_slice1() local 1102 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice1() 1124 char buffer[sizeo in skb_invalid_data_slice2() local 1151 char buffer[sizeof(*hdr)] = {}; skb_invalid_data_slice3() local 1177 char buffer[sizeof(*hdr)] = {}; skb_invalid_data_slice4() local 1201 char buffer[sizeof(*hdr)] = {}; xdp_invalid_data_slice1() local 1226 char buffer[sizeof(*hdr)] = {}; xdp_invalid_data_slice2() local 1295 char buffer[sizeof(*hdr)] = {}; dynptr_slice_var_len1() local 1312 char buffer[sizeof(struct ethhdr)] = {}; dynptr_slice_var_len2() local 1368 char buffer[sizeof(struct ethhdr)] = {}; invalid_slice_rdwr_rdonly() local 1622 char buffer[sizeof(__u32)] = {}; clone_skb_packet_data() local 1648 char buffer[sizeof(__u32)] = {}; clone_xdp_packet_data() local 1676 char buffer[8] = {}; test_dynptr_skb_small_buff() local [all...] |