Home
last modified time | relevance | path

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

1234567891011

/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/
Ditoa.h39 inline char* u32toa(uint32_t value, char* buffer) { in u32toa() argument
47 *buffer++ = cDigitsLut[d1]; in u32toa()
49 *buffer++ = cDigitsLut[d1 + 1]; in u32toa()
51 *buffer++ = cDigitsLut[d2]; in u32toa()
52 *buffer++ = cDigitsLut[d2 + 1]; in u32toa()
66 *buffer++ = cDigitsLut[d1]; in u32toa()
68 *buffer++ = cDigitsLut[d1 + 1]; in u32toa()
70 *buffer++ = cDigitsLut[d2]; in u32toa()
71 *buffer++ = cDigitsLut[d2 + 1]; in u32toa()
73 *buffer++ = cDigitsLut[d3]; in u32toa()
[all …]
Ddtoa.h34 inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, ui… in GrisuRound() argument
38 buffer[len - 1]--; in GrisuRound()
59 inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* … in DigitGen() argument
83 buffer[(*len)++] = static_cast<char>('0' + static_cast<char>(d)); in DigitGen()
88 … GrisuRound(buffer, *len, delta, tmp, static_cast<uint64_t>(kPow10[kappa]) << -one.e, wp_w.f); in DigitGen()
99 buffer[(*len)++] = static_cast<char>('0' + d); in DigitGen()
104 GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast<int>(kappa)]); in DigitGen()
110 inline void Grisu2(double value, char* buffer, int* length, int* K) { in Grisu2() argument
121 DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K); in Grisu2()
124 inline char* WriteExponent(int K, char* buffer) { in WriteExponent() argument
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dbyte_array_utils.h36 static AK_FORCE_INLINE void writeUintAndAdvancePosition(uint8_t *const buffer, in writeUintAndAdvancePosition() argument
42 ByteArrayUtils::writeUint8AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
45 ByteArrayUtils::writeUint16AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
48 ByteArrayUtils::writeUint24AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
51 ByteArrayUtils::writeUint32AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
63 static AK_FORCE_INLINE uint32_t readUint32(const uint8_t *const buffer, const int pos) { in readUint32() argument
64 return (buffer[pos] << 24) ^ (buffer[pos + 1] << 16) in readUint32()
65 ^ (buffer[pos + 2] << 8) ^ buffer[pos + 3]; in readUint32()
68 static AK_FORCE_INLINE uint32_t readUint24(const uint8_t *const buffer, const int pos) { in readUint24() argument
69 return (buffer[pos] << 16) ^ (buffer[pos + 1] << 8) ^ buffer[pos + 2]; in readUint24()
[all …]
Ddict_file_writing_utils.cpp83 const char *const suffix, const BufferWithExtendableBuffer *const buffer) { in flushBufferToFileWithSuffix() argument
87 return flushBufferToFile(filePath, buffer); in flushBufferToFileWithSuffix()
91 const BufferWithExtendableBuffer *const buffer) { in writeBufferToFileTail() argument
94 ByteArrayUtils::writeUintAndAdvancePosition(bufferSize, buffer->getTailPosition(), in writeBufferToFileTail()
99 return writeBufferToFile(file, buffer); in writeBufferToFileTail()
103 const BufferWithExtendableBuffer *const buffer) { in flushBufferToFile() argument
116 if (!writeBufferToFile(file, buffer)) { in flushBufferToFile()
120 buffer->getTailPosition()); in flushBufferToFile()
130 const BufferWithExtendableBuffer *const buffer) { in writeBufferToFile() argument
131 const int originalBufSize = buffer->getOriginalBufferSize(); in writeBufferToFile()
[all …]
/packages/apps/TV/usbtuner/src/com/android/usbtuner/util/
DStatusTextUtils.java42 StringBuffer buffer = new StringBuffer(); in getStatusWarningInHTML() local
54 buffer.append(String.format("<font color=%s>", audioPositionColor)); in getStatusWarningInHTML()
55 buffer.append( in getStatusWarningInHTML()
58 buffer.append("</font>\n"); in getStatusWarningInHTML()
59 buffer.append("<font color=" + COLOR_GRAY + ">"); in getStatusWarningInHTML()
60 buffer.append( in getStatusWarningInHTML()
63 buffer.append( in getStatusWarningInHTML()
66 buffer.append("</font>\n"); in getStatusWarningInHTML()
68 appendStatusLine(buffer, "KbytesInQueue", bytesInQueue / 1000, 1, 10); in getStatusWarningInHTML()
69 buffer.append("<br/>"); in getStatusWarningInHTML()
[all …]
DByteArrayBuffer.java39 private byte[] buffer; field in ByteArrayBuffer
47 this.buffer = new byte[capacity]; in ByteArrayBuffer()
51 byte newbuffer[] = new byte[Math.max(this.buffer.length << 1, newlen)]; in expand()
52 System.arraycopy(this.buffer, 0, newbuffer, 0, this.len); in expand()
53 this.buffer = newbuffer; in expand()
68 if (newlen > this.buffer.length) { in append()
71 System.arraycopy(b, off, this.buffer, this.len, len); in append()
77 if (newlen > this.buffer.length) { in append()
80 this.buffer[this.len] = (byte) b; in append()
97 if (newlen > this.buffer.length) { in append()
[all …]
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/
Dbyte_array_utils_test.cpp28 const uint8_t buffer[] = { 0x20u, 0x21u, 0x00u, 0x01u, 0x00u }; in TEST() local
31 EXPECT_EQ(0x6f, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
33 EXPECT_EQ(0x6b, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
36 EXPECT_EQ(0x100, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
40 const uint8_t buffer[] = { 0x1u, 0x8Au, 0x0u, 0xAAu }; in TEST() local
42 EXPECT_EQ(0x01u, ByteArrayUtils::readUint8(buffer, 0)); in TEST()
43 EXPECT_EQ(0x8Au, ByteArrayUtils::readUint8(buffer, 1)); in TEST()
44 EXPECT_EQ(0x0u, ByteArrayUtils::readUint8(buffer, 2)); in TEST()
45 EXPECT_EQ(0xAAu, ByteArrayUtils::readUint8(buffer, 3)); in TEST()
47 EXPECT_EQ(0x018Au, ByteArrayUtils::readUint16(buffer, 0)); in TEST()
[all …]
Dformat_utils_test.cpp34 std::vector<uint8_t> buffer; in getBuffer() local
35 buffer.push_back(magicNumber >> 24); in getBuffer()
36 buffer.push_back(magicNumber >> 16); in getBuffer()
37 buffer.push_back(magicNumber >> 8); in getBuffer()
38 buffer.push_back(magicNumber); in getBuffer()
40 buffer.push_back(version >> 8); in getBuffer()
41 buffer.push_back(version); in getBuffer()
43 buffer.push_back(flags >> 8); in getBuffer()
44 buffer.push_back(flags); in getBuffer()
46 buffer.push_back(headerSize >> 24); in getBuffer()
[all …]
Dbuffer_with_extendable_buffer_test.cpp27 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZE); in TEST() local
31 EXPECT_TRUE(buffer.writeUint(data_1, 1 /* size */, pos)); in TEST()
32 EXPECT_EQ(data_1, buffer.readUint(1, pos)); in TEST()
36 EXPECT_TRUE(buffer.writeUint(data_2, 2 /* size */, pos)); in TEST()
37 EXPECT_EQ(data_2, buffer.readUint(2, pos)); in TEST()
41 EXPECT_TRUE(buffer.writeUint(data_3, 3 /* size */, pos)); in TEST()
42 EXPECT_EQ(data_3, buffer.readUint(3, pos)); in TEST()
46 EXPECT_TRUE(buffer.writeUint(data_4, 4 /* size */, pos)); in TEST()
47 EXPECT_EQ(data_4, buffer.readUint(4, pos)); in TEST()
51 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZE); in TEST() local
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Dwritertest.cpp26 StringBuffer buffer; in TEST() local
27 Writer<StringBuffer> writer(buffer); in TEST()
28 buffer.ShrinkToFit(); in TEST()
31 …d\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3]}", buffer.GetString()); in TEST()
32 EXPECT_EQ(77u, buffer.GetSize()); in TEST()
40 StringBuffer buffer; \
41 Writer<StringBuffer> writer(buffer); \
44 EXPECT_STREQ(json, buffer.GetString()); \
89 StringBuffer buffer; in TEST() local
90 Writer<StringBuffer> writer(buffer); in TEST()
[all …]
Dstringbuffertest.cpp22 StringBuffer buffer; in TEST() local
23 EXPECT_EQ(0u, buffer.GetSize()); in TEST()
24 EXPECT_STREQ("", buffer.GetString()); in TEST()
28 StringBuffer buffer; in TEST() local
29 buffer.Put('A'); in TEST()
31 EXPECT_EQ(1u, buffer.GetSize()); in TEST()
32 EXPECT_STREQ("A", buffer.GetString()); in TEST()
36 StringBuffer buffer; in TEST() local
37 buffer.Put('A'); in TEST()
38 buffer.Put('B'); in TEST()
[all …]
Dprettywritertest.cpp43 StringBuffer buffer; in TEST() local
44 PrettyWriter<StringBuffer> writer(buffer); in TEST()
48 EXPECT_STREQ(kPrettyJson, buffer.GetString()); in TEST()
52 StringBuffer buffer; in TEST() local
53 PrettyWriter<StringBuffer> writer(buffer); in TEST()
75 buffer.GetString()); in TEST()
79 StringBuffer buffer; in TEST() local
80 PrettyWriter<StringBuffer> writer(buffer); in TEST()
84 EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString()); in TEST()
89 StringBuffer buffer; in TEST() local
[all …]
Dencodedstreamtest.cpp51 char buffer[1024]; in Open() local
53 sprintf(buffer, paths[i], filename); in Open()
54 FILE *fp = fopen(buffer, "rb"); in Open()
72 char* buffer = (char*)malloc(*outLength + 1); in ReadFile() local
73 size_t readLength = fread(buffer, 1, *outLength, fp); in ReadFile()
74 buffer[readLength] = '\0'; in ReadFile()
76 return buffer; in ReadFile()
83 char buffer[16]; in TestEncodedInputStream() local
86 FileReadStream fs(fp, buffer, sizeof(buffer)); in TestEncodedInputStream()
123 char buffer[16]; in TestAutoUTFInputStream() local
[all …]
Ditoatest.cpp92 static void u32toa_naive(uint32_t value, char* buffer) { in u32toa_naive() argument
101 *buffer++ = *--p; in u32toa_naive()
104 *buffer = '\0'; in u32toa_naive()
107 static void i32toa_naive(int32_t value, char* buffer) { in i32toa_naive() argument
110 *buffer++ = '-'; in i32toa_naive()
113 u32toa_naive(u, buffer); in i32toa_naive()
116 static void u64toa_naive(uint64_t value, char* buffer) { in u64toa_naive() argument
125 *buffer++ = *--p; in u64toa_naive()
128 *buffer = '\0'; in u64toa_naive()
131 static void i64toa_naive(int64_t value, char* buffer) { in i64toa_naive() argument
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/decoder/
DUnboundedFifoByteBuffer.java57 protected byte[] buffer; field in UnboundedFifoByteBuffer
84 buffer = new byte[initialSize + 1]; in UnboundedFifoByteBuffer()
98 size = buffer.length - head + tail; in size()
123 if (size() + 1 >= buffer.length) { in add()
124 byte[] tmp = new byte[((buffer.length - 1) * 2) + 1]; in add()
128 tmp[j] = buffer[i]; in add()
129 buffer[i] = 0; in add()
133 if (i == buffer.length) { in add()
138 buffer = tmp; in add()
143 buffer[tail] = b; in add()
[all …]
/packages/services/Telephony/src/org/apache/james/mime4j/decoder/
DUnboundedFifoByteBuffer.java57 protected byte[] buffer; field in UnboundedFifoByteBuffer
84 buffer = new byte[initialSize + 1]; in UnboundedFifoByteBuffer()
98 size = buffer.length - head + tail; in size()
123 if (size() + 1 >= buffer.length) { in add()
124 byte[] tmp = new byte[((buffer.length - 1) * 2) + 1]; in add()
128 tmp[j] = buffer[i]; in add()
129 buffer[i] = 0; in add()
133 if (i == buffer.length) { in add()
138 buffer = tmp; in add()
143 buffer[tail] = b; in add()
[all …]
/packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/
DMpegTsSampleSourceExtractor.java218 abstract void mayParseClosedCaption(ByteBuffer buffer, long presentationTimeUs); in mayParseClosedCaption() argument
220 protected void parseClosedCaption(ByteBuffer buffer, int offset, long presentationTimeUs) { in parseClosedCaption() argument
223 if (pos + 2 >= buffer.position()) { in parseClosedCaption()
226 boolean processCcDataFlag = (buffer.get(pos) & 64) != 0; in parseClosedCaption()
227 int ccCount = buffer.get(pos) & 0x1f; in parseClosedCaption()
229 if (!processCcDataFlag || pos + 3 * ccCount >= buffer.position() || ccCount == 0) { in parseClosedCaption()
233 mCea708CcBuffer.put(buffer.get(pos + i)); in parseClosedCaption()
241 public void mayParseClosedCaption(ByteBuffer buffer, long presentationTimeUs) { in mayParseClosedCaption() argument
243 while (pos + 9 < buffer.position()) { in mayParseClosedCaption()
245 if (buffer.get(pos) == 0 in mayParseClosedCaption()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/perftest/
Dmisctest.cpp376 char buffer[10]; in WriteUint() local
377 char *p = buffer; in WriteUint()
386 } while (p != buffer); in WriteUint()
400 char buffer[20]; in WriteUint64() local
401 char *p = buffer; in WriteUint64()
410 } while (p != buffer); in WriteUint64()
420 char buffer[10]; in WriteUint() local
421 char* p = buffer; in WriteUint()
427 char* d = os_->Push(p - buffer); in WriteUint()
431 } while (p != buffer); in WriteUint()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/
Dpatricia_trie_reading_utils.cpp48 const uint8_t *const buffer, int *const pos) { in getPtNodeArraySizeAndAdvancePosition() argument
49 const uint8_t firstByte = ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getPtNodeArraySizeAndAdvancePosition()
54 buffer, pos); in getPtNodeArraySizeAndAdvancePosition()
59 const uint8_t *const buffer, int *const pos) { in getFlagsAndAdvancePosition() argument
60 return ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getFlagsAndAdvancePosition()
63 /* static */ int PtReadingUtils::getCodePointAndAdvancePosition(const uint8_t *const buffer, in getCodePointAndAdvancePosition() argument
65 return ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCodePointAndAdvancePosition()
69 /* static */ int PtReadingUtils::getCharsAndAdvancePosition(const uint8_t *const buffer, in getCharsAndAdvancePosition() argument
74 length = ByteArrayUtils::readStringAndAdvancePosition(buffer, maxLength, codePointTable, in getCharsAndAdvancePosition()
77 const int codePoint = getCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCharsAndAdvancePosition()
[all …]
Ddynamic_pt_writing_utils.cpp39 BufferWithExtendableBuffer *const buffer, const int rootPos) { in writeEmptyDictionary() argument
41 if (!writePtNodeArraySizeAndAdvancePosition(buffer, 0 /* arraySize */, &writingPos)) { in writeEmptyDictionary()
44 return writeForwardLinkPositionAndAdvancePosition(buffer, NOT_A_DICT_POS /* forwardLinkPos */, in writeEmptyDictionary()
49 BufferWithExtendableBuffer *const buffer, const int forwardLinkPos, in writeForwardLinkPositionAndAdvancePosition() argument
51 return writeDictOffset(buffer, forwardLinkPos, (*forwardLinkFieldPos), forwardLinkFieldPos); in writeForwardLinkPositionAndAdvancePosition()
55 BufferWithExtendableBuffer *const buffer, const size_t arraySize, in writePtNodeArraySizeAndAdvancePosition() argument
66 return buffer->writeUintAndAdvancePosition(data, LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE, in writePtNodeArraySizeAndAdvancePosition()
77 BufferWithExtendableBuffer *const buffer, in writeFlagsAndAdvancePosition() argument
79 return buffer->writeUintAndAdvancePosition(nodeFlags, NODE_FLAG_FIELD_SIZE, nodeFlagsFieldPos); in writeFlagsAndAdvancePosition()
84 BufferWithExtendableBuffer *const buffer, const int parentPos, const int basePos, in writeParentPosOffsetAndAdvancePosition() argument
[all …]
Ddynamic_pt_writing_utils.h33 static bool writeEmptyDictionary(BufferWithExtendableBuffer *const buffer, const int rootPos);
36 BufferWithExtendableBuffer *const buffer, const int forwardLinkPos,
39 static bool writePtNodeArraySizeAndAdvancePosition(BufferWithExtendableBuffer *const buffer,
42 static bool writeFlags(BufferWithExtendableBuffer *const buffer, in writeFlags() argument
46 return writeFlagsAndAdvancePosition(buffer, nodeFlags, &writingPos); in writeFlags()
49 static bool writeFlagsAndAdvancePosition(BufferWithExtendableBuffer *const buffer,
53 static bool writeParentPosOffsetAndAdvancePosition(BufferWithExtendableBuffer *const buffer,
56 static bool writeCodePointsAndAdvancePosition(BufferWithExtendableBuffer *const buffer,
59 static bool writeChildrenPositionAndAdvancePosition(BufferWithExtendableBuffer *const buffer,
75 static bool writeDictOffset(BufferWithExtendableBuffer *const buffer, const int targetPos,
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dwriter.h205 char buffer[11]; in WriteInt() local
206 const char* end = internal::i32toa(i, buffer); in WriteInt()
207 for (const char* p = buffer; p != end; ++p) in WriteInt()
213 char buffer[10]; in WriteUint() local
214 const char* end = internal::u32toa(u, buffer); in WriteUint()
215 for (const char* p = buffer; p != end; ++p) in WriteUint()
221 char buffer[21]; in WriteInt64() local
222 const char* end = internal::i64toa(i64, buffer); in WriteInt64()
223 for (const char* p = buffer; p != end; ++p) in WriteInt64()
229 char buffer[20]; in WriteUint64() local
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DImageCacheService.java58 public boolean getImageData(Path path, long timeModified, int type, BytesBuffer buffer) { in getImageData() argument
64 request.buffer = buffer.data; in getImageData()
68 if (isSameKey(key, request.buffer)) { in getImageData()
69 buffer.data = request.buffer; in getImageData()
70 buffer.offset = key.length; in getImageData()
71 buffer.length = request.length - buffer.offset; in getImageData()
83 ByteBuffer buffer = ByteBuffer.allocate(key.length + value.length); in putImageData() local
84 buffer.put(key); in putImageData()
85 buffer.put(value); in putImageData()
88 mCache.insert(cacheKey, buffer.array()); in putImageData()
[all …]
/packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/
DphNxpExtns_MifareStd.c48 STATIC NFCSTATUS phLibNfc_GetKeyNumberMFC(uint8_t *buffer,uint8_t *bKey);
114 if( NdefMap->pTransceiveInfo->sSendData.buffer != NULL ) in phNxpExtns_MfcModuleDeInit()
116 free(NdefMap->pTransceiveInfo->sSendData.buffer); in phNxpExtns_MfcModuleDeInit()
117 NdefMap->pTransceiveInfo->sSendData.buffer = NULL; in phNxpExtns_MfcModuleDeInit()
119 if( NdefMap->pTransceiveInfo->sRecvData.buffer != NULL ) in phNxpExtns_MfcModuleDeInit()
121 free(NdefMap->pTransceiveInfo->sRecvData.buffer); in phNxpExtns_MfcModuleDeInit()
122 NdefMap->pTransceiveInfo->sRecvData.buffer = NULL; in phNxpExtns_MfcModuleDeInit()
148 if ( NdefInfo.psUpperNdefMsg->buffer != NULL ) in phNxpExtns_MfcModuleDeInit()
150 free(NdefInfo.psUpperNdefMsg->buffer); in phNxpExtns_MfcModuleDeInit()
151 NdefInfo.psUpperNdefMsg->buffer = NULL; in phNxpExtns_MfcModuleDeInit()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/bigram/
Dbigram_list_read_write_utils.cpp42 const ReadOnlyByteArrayView buffer, BigramFlags *const outBigramFlags, in getBigramEntryPropertiesAndAdvancePosition() argument
44 if (static_cast<int>(buffer.size()) <= *bigramEntryPos) { in getBigramEntryPropertiesAndAdvancePosition()
46 "bigramEntryPos: %d.", buffer.size(), *bigramEntryPos); in getBigramEntryPropertiesAndAdvancePosition()
49 const BigramFlags bigramFlags = ByteArrayUtils::readUint8AndAdvancePosition(buffer.data(), in getBigramEntryPropertiesAndAdvancePosition()
54 const int targetPos = getBigramAddressAndAdvancePosition(buffer, bigramFlags, bigramEntryPos); in getBigramEntryPropertiesAndAdvancePosition()
61 /* static */ bool BigramListReadWriteUtils::skipExistingBigrams(const ReadOnlyByteArrayView buffer, in skipExistingBigrams() argument
65 if (!getBigramEntryPropertiesAndAdvancePosition(buffer, &flags, 0 /* outTargetPtNodePos */, in skipExistingBigrams()
74 const ReadOnlyByteArrayView buffer, const BigramFlags flags, int *const pos) { in getBigramAddressAndAdvancePosition() argument
79 offset = ByteArrayUtils::readUint8AndAdvancePosition(buffer.data(), pos); in getBigramAddressAndAdvancePosition()
82 offset = ByteArrayUtils::readUint16AndAdvancePosition(buffer.data(), pos); in getBigramAddressAndAdvancePosition()
[all …]

1234567891011