| /foundation/arkui/ace_engine_lite/frameworks/src/core/base/ |
| H A D | string_util.cpp | 33 char *buffer = StringUtil::Malloc(size); in Copy() local 34 if (buffer == nullptr) { in Copy() 37 if (strncpy_s(buffer, size + 1, sequence, size) == 0) { in Copy() 38 return buffer; in Copy() 40 ace_free(buffer); in Copy() 46 char *buffer = static_cast<char *>(ace_malloc(size + 1)); in Malloc() local 47 if (buffer == nullptr) { in Malloc() 50 buffer[size] = '\0'; in Malloc() 51 return buffer; in Malloc() 75 char *buffer in Slice() local [all...] |
| /test/ostest/wukong/common/include/ |
| H A D | special_test_object.h | 55 char buffer[50]; in toString() local 58 result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", endX_, endY_, startX_, startY_); in toString() 60 result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", startX_, startY_, endX_, endY_); in toString() 65 return std::string(buffer); in toString() 84 char buffer[50]; in toString() local 85 int result = sprintf_s(buffer, sizeof(buffer), "Point: (%d, %d)", x_, y_); in toString() 89 return std::string(buffer); in toString() 104 char buffer[50]; toString() local [all...] |
| /third_party/mesa3d/src/gallium/auxiliary/gallivm/ |
| H A D | lp_bld_debug.cpp | 91 disassemble(const void* func, std::ostream &buffer) in disassemble() argument 109 buffer << "error: could not create disassembler for triple " in disassemble() 124 buffer << std::setw(6) << (unsigned long)pc << ":\t"; in disassemble() 130 buffer << "invalid\n"; in disassemble() 142 buffer << std::hex << std::setfill('0') << std::setw(2) in disassemble() 146 buffer << std::dec << " "; in disassemble() 154 buffer << std::setw(Size) << outline << '\n'; in disassemble() 176 buffer << "disassembly larger than " << extent << " bytes, aborting\n"; in disassemble() 181 buffer << '\n'; in disassemble() 189 buffer << "disassembl in disassemble() 200 std::ostringstream buffer; lp_disassemble() local [all...] |
| /third_party/skia/third_party/externals/libwebp/examples/ |
| H A D | anim_dump.c | 100 WebPDecBuffer buffer; in main() local 101 WebPInitDecBuffer(&buffer); in main() 102 buffer.colorspace = MODE_RGBA; in main() 103 buffer.is_external_memory = 1; in main() 104 buffer.width = image.canvas_width; in main() 105 buffer.height = image.canvas_height; in main() 106 buffer.u.RGBA.rgba = image.frames[i].rgba; in main() 107 buffer.u.RGBA.stride = buffer.width * sizeof(uint32_t); in main() 108 buffer in main() [all...] |
| /third_party/skia/third_party/externals/harfbuzz/test/api/ |
| H A D | test-multithread.c | 46 fill_the_buffer (hb_buffer_t *buffer) in fill_the_buffer() argument 48 hb_buffer_add_utf8 (buffer, text, -1, 0, -1); in fill_the_buffer() 49 hb_buffer_guess_segment_properties (buffer); in fill_the_buffer() 50 hb_shape (font, buffer, NULL, 0); in fill_the_buffer() 54 validity_check (hb_buffer_t *buffer) { in validity_check() argument 55 if (hb_buffer_diff (ref_buffer, buffer, (hb_codepoint_t) -1, 0)) in validity_check() 60 hb_buffer_serialize_glyphs (buffer, 0, hb_buffer_get_length (ref_buffer), in validity_check() 79 hb_buffer_t *buffer = (hb_buffer_t *) data; in thread_func() local 87 hb_buffer_clear_contents (buffer); in thread_func() 88 fill_the_buffer (buffer); in thread_func() 106 hb_buffer_t *buffer = hb_buffer_create (); test_body() local [all...] |
| /third_party/skia/third_party/externals/dng_sdk/source/ |
| H A D | dng_simple_image.cpp | 161 void dng_simple_image::AcquireTileBuffer (dng_tile_buffer &buffer, in AcquireTileBuffer() argument 166 buffer.fArea = area; in AcquireTileBuffer() 168 buffer.fPlane = fBuffer.fPlane; in AcquireTileBuffer() 169 buffer.fPlanes = fBuffer.fPlanes; in AcquireTileBuffer() 170 buffer.fRowStep = fBuffer.fRowStep; in AcquireTileBuffer() 171 buffer.fColStep = fBuffer.fColStep; in AcquireTileBuffer() 172 buffer.fPlaneStep = fBuffer.fPlaneStep; in AcquireTileBuffer() 173 buffer.fPixelType = fBuffer.fPixelType; in AcquireTileBuffer() 174 buffer.fPixelSize = fBuffer.fPixelSize; in AcquireTileBuffer() 176 buffer in AcquireTileBuffer() [all...] |
| /arkcompiler/ets_runtime/ecmascript/base/ |
| H A D | bit_helper.h | 33 inline T ReadBuffer(void **buffer, size_t offset) in ReadBuffer() argument 35 T result = *(reinterpret_cast<T *>(*buffer)); in ReadBuffer() 36 *buffer = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(*buffer) + offset); in ReadBuffer() 41 inline T ReadBuffer(void **buffer) in ReadBuffer() argument 43 T result = *(reinterpret_cast<T *>(*buffer)); in ReadBuffer() 44 *buffer = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(*buffer) + result.offset_); in ReadBuffer() 48 inline char *ReadBuffer(void **buffer) in ReadBuffer() argument 50 auto result = reinterpret_cast<char *>(*buffer); in ReadBuffer() 56 ReadBufferInSize(void **buffer) ReadBufferInSize() argument [all...] |
| /kernel/linux/linux-5.10/drivers/scsi/ |
| H A D | ch.c | 187 void *buffer, unsigned buflength, in ch_do_scsi() 198 result = scsi_execute_req(ch->device, cmd, direction, buffer, in ch_do_scsi() 238 u_char *buffer; in ch_read_element_status() local 241 buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); in ch_read_element_status() 242 if(!buffer) in ch_read_element_status() 256 buffer, 256, DMA_FROM_DEVICE))) { in ch_read_element_status() 257 if (((buffer[16] << 8) | buffer[17]) != elem) { in ch_read_element_status() 259 elem,(buffer[16] << 8) | buffer[1 in ch_read_element_status() 186 ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len, void *buffer, unsigned buflength, enum dma_data_direction direction) ch_do_scsi() argument 295 u_char *buffer; ch_readconfig() local 507 u_char *buffer; ch_set_voltag() local 755 u_char *buffer; ch_ioctl() local [all...] |
| /kernel/linux/linux-6.6/drivers/scsi/ |
| H A D | ch.c | 187 void *buffer, unsigned int buflength, enum req_op op) in ch_do_scsi() 200 result = scsi_execute_cmd(ch->device, cmd, op, buffer, buflength, in ch_do_scsi() 240 u_char *buffer; in ch_read_element_status() local 243 buffer = kmalloc(512, GFP_KERNEL); in ch_read_element_status() 244 if(!buffer) in ch_read_element_status() 258 buffer, 256, REQ_OP_DRV_IN))) { in ch_read_element_status() 259 if (((buffer[16] << 8) | buffer[17]) != elem) { in ch_read_element_status() 261 elem,(buffer[16] << 8) | buffer[1 in ch_read_element_status() 186 ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len, void *buffer, unsigned int buflength, enum req_op op) ch_do_scsi() argument 297 u_char *buffer; ch_readconfig() local 509 u_char *buffer; ch_set_voltag() local 776 u_char *buffer; ch_ioctl() local [all...] |
| /third_party/cJSON/tests/ |
| H A D | print_value.c | 35 printbuffer buffer = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; in assert_print_value() local 37 buffer.buffer = printed; in assert_print_value() 38 buffer.length = sizeof(printed); in assert_print_value() 39 buffer.offset = 0; in assert_print_value() 40 buffer.noalloc = true; in assert_print_value() 41 buffer.hooks = global_hooks; in assert_print_value() 51 TEST_ASSERT_TRUE_MESSAGE(print_value(item, &buffer), "Failed to print value."); in assert_print_value() 52 TEST_ASSERT_EQUAL_STRING_MESSAGE(input, buffer.buffer, "Printe in assert_print_value() [all...] |
| /third_party/musl/porting/linux/user/src/internal/ |
| H A D | musl_log.c | 41 char buffer[PATH_MAX + 1];
in musl_log() local 42 int result = vsnprintf(buffer, PATH_MAX, fmt, ap);
in musl_log() 48 buffer[result] = '\n';
in musl_log() 49 buffer[result + 1] = '\0';
in musl_log() 51 g_dfxLogPtr(buffer, strlen(buffer));
in musl_log() 57 g_dfxLogPtr(buffer, strlen(buffer));
in musl_log() 72 g_dfxLogPtr(buffer, strlen(buffer));
in musl_log() [all...] |
| /third_party/ltp/testcases/kernel/fs/mongo/ |
| H A D | mongo_slinks.c | 28 char *buffer = NULL; in main() local 33 if ((buffer = malloc(size + 1)) == NULL) { in main() 64 // Increase size of buffer to readlink untile whole symlink body will be read. in main() 68 memset(buffer, 0, size + 1); in main() 69 num = readlink(new_path, buffer, size); in main() 72 free(buffer); in main() 76 if (buffer[num] != 0) { in main() 79 free(buffer); in main() 86 // Only part of symlink body was read. So we make a bigger buffer in main() 89 if ((buffer in main() [all...] |
| /third_party/musl/libc-test/src/functionalext/supplement/mman/ |
| H A D | mprotect.c | 31 void *buffer = memalign(align, 8 * align); in mprotect_0100() local 32 int ret = mprotect(buffer, getpagesize(), PROT_READ); in mprotect_0100() 44 void *buffer = memalign(align, 8 * align); in mprotect_0200() local 45 int ret = mprotect(buffer, getpagesize(), PROT_WRITE); in mprotect_0200() 57 void *buffer = memalign(align, 8 * align); in mprotect_0300() local 58 int ret = mprotect(buffer, getpagesize(), PROT_EXEC); in mprotect_0300() 70 void *buffer = memalign(align, 8 * align); in mprotect_0400() local 71 int ret = mprotect(buffer, getpagesize(), PROT_NONE); in mprotect_0400() 83 void *buffer = memalign(align, 8 * align); in mprotect_0500() local 84 int ret = mprotect(buffer, getpagesiz in mprotect_0500() [all...] |
| /third_party/skia/third_party/externals/oboe/apps/OboeTester/app/src/main/cpp/ |
| H A D | FullDuplexAnalyzer.cpp | 42 float buffer[2]; in onBothStreamsReady() local 45 buffer[0] = *outputFloat; in onBothStreamsReady() 47 buffer[1] = *inputFloat; in onBothStreamsReady() 49 mRecording->write(buffer, 1); in onBothStreamsReady() 52 buffer[0] = 0.0f; // gap in output in onBothStreamsReady() 54 buffer[1] = *inputFloat; in onBothStreamsReady() 56 mRecording->write(buffer, 1); in onBothStreamsReady() 58 buffer[1] = 0.0f; // gap in input in onBothStreamsReady() 60 buffer[0] = *outputFloat; in onBothStreamsReady() 62 mRecording->write(buffer, in onBothStreamsReady() [all...] |
| /device/qemu/hardware/display/ |
| H A D | display_layer.c | 163 static int32_t Flush(uint32_t devId, uint32_t layerId, LayerBuffer *buffer) in Flush() argument 174 if (buffer == NULL) { in Flush() 175 HDF_LOGE("%s: buffer is null", __func__); in Flush() 180 ret = memcpy_s(priv->fbAddr, priv->fbSize, buffer->data.virAddr, priv->fbSize); in Flush() 188 static int32_t GetLayerBuffer(uint32_t devId, uint32_t layerId, LayerBuffer *buffer) in GetLayerBuffer() argument 190 if (buffer == NULL) { in GetLayerBuffer() 191 HDF_LOGE("%s: buffer is null", __func__); in GetLayerBuffer() 207 buffer->fenceId = 0; in GetLayerBuffer() 208 buffer->width = priv->width; in GetLayerBuffer() 209 buffer in GetLayerBuffer() [all...] |
| /foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ops/ |
| H A D | pooling_builder.cpp | 104 void* buffer = tensor->GetBuffer(); in SetKernel() local 105 if (buffer == nullptr) { in SetKernel() 110 const int64_t* pKernelSize = reinterpret_cast<const int64_t*>(buffer); in SetKernel() 126 void* buffer = tensor->GetBuffer(); in SetStrides() local 127 if (buffer == nullptr) { in SetStrides() 132 const int64_t* pStrides = reinterpret_cast<const int64_t*>(buffer); in SetStrides() 143 void* buffer = tensor->GetBuffer(); in SetPadModeOrPaddings() local 144 if (buffer == nullptr) { in SetPadModeOrPaddings() 157 int8_t* pPadMode = static_cast<int8_t*>(buffer); in SetPadModeOrPaddings() 169 int64_t* pPad = static_cast<int64_t*>(buffer); in SetPadModeOrPaddings() 197 void* buffer = tensor->GetBuffer(); SetRoundMode() local 230 void* buffer = tensor->GetBuffer(); SetActivation() local 259 void* buffer = tensor->GetBuffer(); SetGlobal() local [all...] |
| /kernel/linux/linux-6.6/tools/include/nolibc/ |
| H A D | stdlib.h | 194 * buffer <buffer>, which must be long enough to store the number and the 196 * buffer is filled from the first byte, and the number of characters emitted 202 int utoh_r(unsigned long in, char *buffer) in utoh_r() argument 215 buffer[digits++] = '0' + dig; in utoh_r() 219 buffer[digits] = 0; in utoh_r() 234 * buffer <buffer>, which must be long enough to store the number and the 236 * 4294967295 in 32-bit). The buffer is filled from the first byte, and the 242 int utoa_r(unsigned long in, char *buffer) in utoa_r() argument 271 itoa_r(long in, char *buffer) itoa_r() argument 289 ltoa_r(long in, char *buffer) ltoa_r() argument 334 u64toh_r(uint64_t in, char *buffer) u64toh_r() argument 378 u64toa_r(uint64_t in, char *buffer) u64toa_r() argument 407 i64toa_r(int64_t in, char *buffer) i64toa_r() argument [all...] |
| /third_party/ffmpeg/libavformat/ |
| H A D | mxg.c | 34 uint8_t *buffer; member 66 mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0; in mxg_read_header() 102 unsigned int current_pos = mxg->buffer_ptr - mxg->buffer; in mxg_update_cache() 104 uint8_t *buffer; in mxg_update_cache() local 107 /* reallocate internal buffer */ in mxg_update_cache() 110 soi_pos = mxg->soi_ptr - mxg->buffer; in mxg_update_cache() 111 buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size, in mxg_update_cache() 114 if (!buffer) in mxg_update_cache() 116 mxg->buffer in mxg_update_cache() [all...] |
| /third_party/icu/tools/unicodetools/com/ibm/rbm/ |
| H A D | RBJavaExporter.java | 75 StringBuffer buffer = new StringBuffer(); in export() 76 buffer.append("/* File: " + file_name + "\n"); in export() 77 buffer.append(" * Date: " + (new Date()) + "\n"); in export() 78 buffer.append(" * Comment: This file was generated automatically by RBManager" + "\n"); in export() 79 buffer.append(" */\n\n"); in export() 81 buffer.append("package " + packageName + ";\n\n"); in export() 83 buffer.append("import java.util.ListResourceBundle;\n\n"); in export() 84 buffer.append((publicClass ? "public " : "protected ")); in export() 85 buffer.append("class " + base_enc + " extends ListResourceBundle {\n"); in export() 86 buffer in export() [all...] |
| /third_party/ltp/testcases/kernel/syscalls/nftw/ |
| H A D | lib64.c | 61 char *buffer; in get_long_name_buffer() local 87 if ((buffer = malloc(path_length + extra)) == NULL) { in get_long_name_buffer() 94 return buffer; in get_long_name_buffer() 98 execute_function(char *name, int (*callback) (const char *), char *buffer, in execute_function() argument 109 result = (*callback) (buffer); in execute_function() 135 char *ptr, *ptr_end, *buffer; in test_long_file_name() local 138 buffer = get_long_name_buffer(&name_length, 1); in test_long_file_name() 140 strcpy(buffer, tmp_path); in test_long_file_name() 141 ptr = buffer + strlen(buffer); in test_long_file_name() 157 char *ptr, *ptr_end, *buffer; test_long_component_name() local [all...] |
| H A D | lib.c | 61 char *buffer; in get_long_name_buffer() local 87 if ((buffer = malloc(path_length + extra)) == NULL) { in get_long_name_buffer() 94 return buffer; in get_long_name_buffer() 98 execute_function(char *name, int (*callback) (const char *), char *buffer, in execute_function() argument 109 result = (*callback) (buffer); in execute_function() 135 char *ptr, *ptr_end, *buffer; in test_long_file_name() local 138 buffer = get_long_name_buffer(&name_length, 1); in test_long_file_name() 140 strcpy(buffer, tmp_path); in test_long_file_name() 141 ptr = buffer + strlen(buffer); in test_long_file_name() 157 char *ptr, *ptr_end, *buffer; test_long_component_name() local [all...] |
| /kernel/linux/common_modules/tzdriver/core/ |
| H A D | tee_compat_check.c | 21 int32_t check_teeos_compat_level(const uint32_t *buffer, uint32_t size) in check_teeos_compat_level() argument 26 if (!buffer || size != COMPAT_LEVEL_BUF_LEN) { in check_teeos_compat_level() 31 if (buffer[0] != VER_CHECK_MAGIC_NUM) { in check_teeos_compat_level() 32 tloge("check ver magic num %u failed\n", buffer[0]); in check_teeos_compat_level() 35 if (buffer[1] != major) { in check_teeos_compat_level() 37 major, buffer[1]); in check_teeos_compat_level() 41 if (buffer[2] != minor) in check_teeos_compat_level() 43 minor, buffer[2]); in check_teeos_compat_level()
|
| /foundation/ability/dmsfwk_lite/moduletest/dtbschedmgr_lite/source/ |
| H A D | tlv_parse_test.cpp | 32 static void RunTest(const uint8_t *buffer, uint16_t bufferLen, in RunTest() argument 42 commuMessage.payload = buffer; in RunTest() 55 uint8_t buffer[] = { in HWTEST_F() local 73 RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr); in HWTEST_F() 85 uint8_t buffer[] = { in HWTEST_F() local 122 RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr); in HWTEST_F() 132 uint8_t buffer[] = { in HWTEST_F() local 144 RunTest(buffer, sizeo in HWTEST_F() 154 uint8_t buffer[] = { }; HWTEST_F() local 170 uint8_t buffer[] = { HWTEST_F() local 188 uint8_t buffer[] = { HWTEST_F() local 206 uint8_t buffer[] = { HWTEST_F() local 227 uint8_t buffer[] = { HWTEST_F() local 250 uint8_t buffer[] = { HWTEST_F() local 273 uint8_t buffer[] = { HWTEST_F() local 296 uint8_t buffer[] = { HWTEST_F() local [all...] |
| /third_party/skia/third_party/externals/dawn/src/tests/end2end/ |
| H A D | DeviceLostTests.cpp | 105 entry.buffer.type = wgpu::BufferBindingType::Uniform; in TEST_P() 141 entry.buffer = nullptr; in TEST_P() 246 // Test that buffer.MapAsync for writing fails after device is lost 251 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); in TEST_P() local 254 ASSERT_DEVICE_ERROR(buffer.MapAsync(wgpu::MapMode::Write, 0, 4, MapFailCallback, in TEST_P() 264 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); in TEST_P() local 266 buffer.MapAsync(wgpu::MapMode::Write, 0, 4, MapFailCallback, const_cast<int*>(&fakeUserData)); in TEST_P() 271 // Test that buffer.Unmap fails after device is lost 277 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); in TEST_P() local 280 ASSERT_DEVICE_ERROR(buffer in TEST_P() 300 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); TEST_P() local 314 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); TEST_P() local 327 wgpu::Buffer buffer = device.CreateBuffer(&bufferDescriptor); TEST_P() local 353 wgpu::Buffer buffer = device.CreateBuffer(&desc); TEST_P() local 367 wgpu::Buffer buffer = device.CreateBuffer(&desc); TEST_P() local 384 wgpu::Buffer buffer = device.CreateBuffer(&desc); TEST_P() local 486 wgpu::Buffer buffer = device.CreateBuffer(&bufferDesc); TEST_P() local 519 wgpu::Buffer buffer = device.CreateBuffer(&descriptor); TEST_P() local [all...] |
| /third_party/skia/third_party/externals/abseil-cpp/absl/strings/ |
| H A D | numbers.cc | 130 // their output to the beginning of the buffer. The caller is responsible 131 // for ensuring that the buffer has enough space to hold the output. 147 char* numbers_internal::FastIntToBuffer(uint32_t i, char* buffer) { in FastIntToBuffer() argument 158 PutTwoDigits(digits, buffer); in FastIntToBuffer() 159 buffer += 2; in FastIntToBuffer() 163 PutTwoDigits(digits, buffer); in FastIntToBuffer() 164 buffer += 2; in FastIntToBuffer() 168 PutTwoDigits(digits, buffer); in FastIntToBuffer() 169 buffer += 2; in FastIntToBuffer() 173 PutTwoDigits(digits, buffer); in FastIntToBuffer() 217 FastIntToBuffer(int32_t i, char* buffer) FastIntToBuffer() argument 229 FastIntToBuffer(uint64_t i, char* buffer) FastIntToBuffer() argument 270 FastIntToBuffer(int64_t i, char* buffer) FastIntToBuffer() argument 486 SixDigitsToBuffer(double d, char* const buffer) SixDigitsToBuffer() argument [all...] |