Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 702) sorted by relevance

12345678910>>...29

/frameworks/base/apct-tests/perftests/core/src/android/libcore/
DSystemArrayCopyPerfTest.java51 final int len = arrayLength; in timeSystemCharArrayCopy() local
52 char[] src = new char[len]; in timeSystemCharArrayCopy()
53 char[] dst = new char[len]; in timeSystemCharArrayCopy()
56 System.arraycopy(src, 0, dst, 0, len); in timeSystemCharArrayCopy()
63 final int len = arrayLength; in timeSystemByteArrayCopy() local
64 byte[] src = new byte[len]; in timeSystemByteArrayCopy()
65 byte[] dst = new byte[len]; in timeSystemByteArrayCopy()
68 System.arraycopy(src, 0, dst, 0, len); in timeSystemByteArrayCopy()
75 final int len = arrayLength; in timeSystemShortArrayCopy() local
76 short[] src = new short[len]; in timeSystemShortArrayCopy()
[all …]
/frameworks/rs/toolkit/
DBlend.cpp117 uint32_t len = (x2 - x1) >> 3; in blend() local
118 rsdIntrinsicBlendSrcOver_K(out, in, len); in blend()
119 x1 += len << 3; in blend()
120 out += len << 3; in blend()
121 in += len << 3; in blend()
136 uint32_t len = (x2 - x1) >> 3; in blend() local
137 rsdIntrinsicBlendDstOver_K(out, in, len); in blend()
138 x1 += len << 3; in blend()
139 out += len << 3; in blend()
140 in += len << 3; in blend()
[all …]
/frameworks/rs/cpu_ref/
DrsCpuIntrinsicBlend.cpp157 uint32_t len = (x2 - x1) >> 3; in kernel() local
158 rsdIntrinsicBlendSrcOver_K(out, in, len); in kernel()
159 x1 += len << 3; in kernel()
160 out += len << 3; in kernel()
161 in += len << 3; in kernel()
176 uint32_t len = (x2 - x1) >> 3; in kernel() local
177 rsdIntrinsicBlendDstOver_K(out, in, len); in kernel()
178 x1 += len << 3; in kernel()
179 out += len << 3; in kernel()
180 in += len << 3; in kernel()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DLineBreakBufferedWriter.java119 public void write(char[] buf, int off, int len) { in write() argument
120 while (bufferIndex + len > bufferSize) { in write()
142 len -= nextNewLine + 1; in write()
155 len -= rest; in write()
160 if (len > 0) { in write()
162 appendToBuffer(buf, off, len); in write()
163 for (int i = len - 1; i >= 0; i--) { in write()
165 lastNewline = bufferIndex - len + i; in write()
173 public void write(String s, int off, int len) { in write() argument
174 while (bufferIndex + len > bufferSize) { in write()
[all …]
DArtFastDataOutput.java91 int len = CharsetUtils.toModifiedUtf8Bytes(s, mBufferPtr, mBufferPos + 2, mBufferCap); in writeUTF() local
92 if (Math.abs(len) > MAX_UNSIGNED_SHORT) { in writeUTF()
93 throw new IOException("Modified UTF-8 length too large: " + len); in writeUTF()
96 if (len >= 0) { in writeUTF()
99 writeShort(len); in writeUTF()
100 mBufferPos += len; in writeUTF()
104 len = -len; in writeUTF()
105 final byte[] tmp = (byte[]) sRuntime.newNonMovableArray(byte.class, len + 1); in writeUTF()
107 writeShort(len); in writeUTF()
108 write(tmp, 0, len); in writeUTF()
DArtFastDataInput.java91 final int len = readUnsignedShort(); in readUTF() local
92 if (mBufferCap > len) { in readUTF()
93 if (mBufferLim - mBufferPos < len) fill(len); in readUTF()
94 final String res = CharsetUtils.fromModifiedUtf8Bytes(mBufferPtr, mBufferPos, len); in readUTF()
95 mBufferPos += len; in readUTF()
98 final byte[] tmp = (byte[]) sRuntime.newNonMovableArray(byte.class, len + 1); in readUTF()
99 readFully(tmp, 0, len); in readUTF()
100 return CharsetUtils.fromModifiedUtf8Bytes(sRuntime.addressOf(tmp), 0, len); in readUTF()
/frameworks/base/libs/androidfw/
DPathUtils.cpp88 size_t len = strlen(name); in setPathName() local
89 char* buf = s.lockBuffer(len); in setPathName()
91 memcpy(buf, name, len); in setPathName()
94 if (len > 0 && buf[len - 1] == OS_PATH_SEPARATOR) len--; in setPathName()
95 buf[len] = '\0'; in setPathName()
97 s.unlockBuffer(len); in setPathName()
108 size_t len = str.length(); in appendPath() local
109 if (len == 0) { in appendPath()
118 char* buf = str.lockBuffer(len+1+newlen); in appendPath()
121 if (buf[len-1] != OS_PATH_SEPARATOR) in appendPath()
[all …]
DZipUtils.cpp43 bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override { in ReadAtOffset() argument
55 size_t read = fread(buf, 1, len, mFp); in ReadAtOffset()
56 if (read != len) { in ReadAtOffset()
74 bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override { in ReadAtOffset() argument
75 return android::base::ReadFullyAtOffset(mFd, buf, len, offset); in ReadAtOffset()
89 bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override { in ReadAtOffset() argument
90 if (mInputSize < len || offset > mInputSize - len) { in ReadAtOffset()
95 if (!pos.verify(len)) { in ReadAtOffset()
99 memcpy(buf, pos.unsafe_ptr(), len); in ReadAtOffset()
202 int len; in examineGzip() local
[all …]
/frameworks/base/core/java/android/util/
DBase64.java91 public abstract boolean process(byte[] input, int offset, int len, boolean finish); in process() argument
98 public abstract int maxOutputSize(int len); in maxOutputSize() argument
158 public static byte[] decode(byte[] input, int offset, int len, int flags) { in decode() argument
161 Decoder decoder = new Decoder(flags, new byte[len*3/4]); in decode()
163 if (!decoder.process(input, offset, len, true)) { in decode()
256 public int maxOutputSize(int len) { in maxOutputSize() argument
257 return len * 3/4 + 10; in maxOutputSize()
266 public boolean process(byte[] input, int offset, int len, boolean finish) { in process() argument
270 len += offset; in process()
283 while (p < len) { in process()
[all …]
/frameworks/av/media/module/foundation/
DAStringUtils.cpp23 int AStringUtils::Compare(const char *a, const char *b, size_t len, bool ignoreCase) { in Compare() argument
25 return ignoreCase ? strncasecmp(a, b, len) : strncmp(a, b, len); in Compare()
50 size_t len = globIx - start; in MatchesGlob() local
55 if (ix + len > strLen) { in MatchesGlob()
58 const char *tail = str + strLen - len; in MatchesGlob()
59 return !Compare(tail, pattern, len, ignoreCase); in MatchesGlob()
62 while (ix + len <= strLen && Compare(str + ix, pattern, len, ignoreCase)) { in MatchesGlob()
65 if (ix + len > strLen) { in MatchesGlob()
68 ix += len; in MatchesGlob()
/frameworks/libs/modules-utils/java/com/android/modules/utils/
DFastDataInput.java138 public void readFully(byte[] b, int off, int len) throws IOException { in readFully() argument
141 if (mBufferCap >= len) { in readFully()
142 if (mBufferLim - mBufferPos < len) fill(len); in readFully()
143 System.arraycopy(mBuffer, mBufferPos, b, off, len); in readFully()
144 mBufferPos += len; in readFully()
150 len -= remain; in readFully()
152 while (len > 0) { in readFully()
153 int c = mIn.read(b, off, len); in readFully()
158 len -= c; in readFully()
168 final int len = readUnsignedShort(); in readUTF() local
[all …]
DFastDataOutput.java139 public void write(byte[] b, int off, int len) throws IOException { in write() argument
140 if (mBufferCap < len) { in write()
142 mOut.write(b, off, len); in write()
144 if (mBufferCap - mBufferPos < len) drain(); in write()
145 System.arraycopy(b, off, mBuffer, mBufferPos, len); in write()
146 mBufferPos += len; in write()
152 final int len = (int) ModifiedUtf8.countBytes(s, false); in writeUTF() local
153 if (len > MAX_UNSIGNED_SHORT) { in writeUTF()
154 throw new IOException("Modified UTF-8 length too large: " + len); in writeUTF()
159 if (mBufferCap >= 2 + len) { in writeUTF()
[all …]
/frameworks/base/tools/aapt2/format/binary/
DXmlFlattener_test.cpp94 EXPECT_THAT(tree.getElementNamespace(&len), IsNull()); in TEST_F()
95 EXPECT_THAT(tree.getElementName(&len), StrEq(u"View")); in TEST_F()
98 EXPECT_THAT(tree.getAttributeNamespace(0, &len), IsNull()); in TEST_F()
99 EXPECT_THAT(tree.getAttributeName(0, &len), StrEq(u"attr")); in TEST_F()
105 EXPECT_THAT(tree.getElementNamespace(&len), IsNull()); in TEST_F()
106 EXPECT_THAT(tree.getElementName(&len), StrEq(u"Layout")); in TEST_F()
109 EXPECT_THAT(tree.getAttributeNamespace(0, &len), StrEq(u"http://com.test")); in TEST_F()
110 EXPECT_THAT(tree.getAttributeName(0, &len), StrEq(u"hello")); in TEST_F()
115 EXPECT_THAT(tree.getElementNamespace(&len), IsNull()); in TEST_F()
116 EXPECT_THAT(tree.getElementName(&len), StrEq(u"Layout")); in TEST_F()
[all …]
/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/operations/paint/
DPaintBundle.java283 int len = array[ret++]; in callPrintGradient() local
285 if (len > 0) { in callPrintGradient()
286 colors = new int[len]; in callPrintGradient()
291 len = array[ret++]; in callPrintGradient()
293 if (len > 0) { in callPrintGradient()
294 stops = new String[len]; in callPrintGradient()
315 int len = array[ret++]; in callPrintGradient() local
317 if (len > 0) { in callPrintGradient()
318 colors = new int[len]; in callPrintGradient()
324 len = array[ret++]; in callPrintGradient()
[all …]
/frameworks/rs/cpp/
DrsCppUtils.cpp38 const char * rsuCopyString(const char *name, size_t len) { in rsuCopyString() argument
39 char *n = new char[len+1]; in rsuCopyString()
40 memcpy(n, name, len); in rsuCopyString()
41 n[len] = 0; in rsuCopyString()
107 int len; in property_get() local
108 len = __system_property_get(key, value); in property_get()
109 if (len > 0) { in property_get()
110 return len; in property_get()
114 len = strlen(default_value); in property_get()
115 memcpy(value, default_value, len + 1); in property_get()
[all …]
/frameworks/rs/
DrsCppUtils.cpp38 const char * rsuCopyString(const char *name, size_t len) { in rsuCopyString() argument
39 char *n = new char[len+1]; in rsuCopyString()
40 memcpy(n, name, len); in rsuCopyString()
41 n[len] = 0; in rsuCopyString()
107 int len; in property_get() local
108 len = __system_property_get(key, value); in property_get()
109 if (len > 0) { in property_get()
110 return len; in property_get()
114 len = strlen(default_value); in property_get()
115 memcpy(value, default_value, len + 1); in property_get()
[all …]
DrsStream.cpp47 uint32_t len = loadU32(); in loadString() local
48 const char *s = rsuCopyString((const char *)&mData[mPos], len); in loadString()
49 mPos += len; in loadString()
54 OStream::OStream(uint64_t len, bool use64) { in OStream() argument
55 mData = (uint8_t*)malloc(len); in OStream()
56 mLength = len; in OStream()
93 void OStream::addString(const char *s, size_t len) { in addString() argument
94 addU32(len); in addString()
95 if (mPos + len*sizeof(char) >= mLength) { in addString()
99 memcpy(stringData, s, len); in addString()
[all …]
/frameworks/compile/libbcc/lib/
DProperties.h29 int len; in property_get() local
30 len = __system_property_get(key, value); in property_get()
31 if (len > 0) { in property_get()
32 return len; in property_get()
36 len = strlen(default_value); in property_get()
37 memcpy(value, default_value, len + 1); in property_get()
39 return len; in property_get()
/frameworks/av/media/mtp/tests/MtpFuzzer/
DMtpMockHandle.h37 int read(void *data, size_t len) { in read() argument
44 ALOGD("%s: sz %zu, pkt %zu+%zu/%zu\n", __func__, len, mPacketNumber, mPacketOffset, in read()
48 if (pkt.size() - mPacketOffset > len) { in read()
49 memcpy(data, pkt.data() + mPacketOffset, len); in read()
51 mPacketOffset += len; in read()
52 readAmt = len; in read()
65 int write(const void *data, size_t len) { in write() argument
66 ALOGD("MockHandle %s: len=%zu\n", __func__, len); in write()
68 return len; in write()
/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/operations/utilities/easing/
DStepCurve.java28 public StepCurve(float[] params, int offset, int len) { in StepCurve() argument
29 mCurveFit = genSpline(params, offset, len); in StepCurve()
34 int len = arrayLen - 1; in genSpline() local
35 double gap = 1.0 / len; in genSpline()
40 points[i + len][0] = v; in genSpline()
41 time[i + len] = i * gap; in genSpline()
43 points[i + len * 2][0] = v + 1; in genSpline()
44 time[i + len * 2] = i * gap + 1; in genSpline()
/frameworks/base/core/tests/fuzzers/FuzzService/
Drandom_parcel_jni.cpp27 size_t len = static_cast<size_t>(env->GetArrayLength(fuzzData)); in Java_randomparcel_FuzzBinder_fuzzServiceInternal() local
28 uint8_t data[len]; in Java_randomparcel_FuzzBinder_fuzzServiceInternal()
29 env->GetByteArrayRegion(fuzzData, 0, len, reinterpret_cast<jbyte*>(data)); in Java_randomparcel_FuzzBinder_fuzzServiceInternal()
31 FuzzedDataProvider provider(data, len); in Java_randomparcel_FuzzBinder_fuzzServiceInternal()
42 size_t len = static_cast<size_t>(env->GetArrayLength(fuzzData)); in Java_randomparcel_FuzzBinder_fillParcelInternal() local
43 uint8_t data[len]; in Java_randomparcel_FuzzBinder_fillParcelInternal()
44 env->GetByteArrayRegion(fuzzData, 0, len, reinterpret_cast<jbyte*>(data)); in Java_randomparcel_FuzzBinder_fillParcelInternal()
46 FuzzedDataProvider provider(data, len); in Java_randomparcel_FuzzBinder_fillParcelInternal()
/frameworks/rs/tests/java_api/SSHealingBrush/src/rs/example/android/com/healingbrush/
DDrawView.java41 int len; field in DrawView
97 Region ret = new Region(Arrays.copyOf(path, len), img); in getRegion()
106 len = 2; in downPoint()
119 if (len + size * 2 >= path.length) { in movePoint()
120 path = Arrays.copyOf(path, 2 * (len + size * 2)); in movePoint()
124 path[len] = imgMoveList[i]; in movePoint()
125 path[len + 1] = imgMoveList[i + 1]; in movePoint()
126 len += 2; in movePoint()
131 if (len + 2 >= path.length) { in upPoint()
132 path = Arrays.copyOf(path, 2 * (len + 2)); in upPoint()
[all …]
/frameworks/rs/tests/java_api/HealingBrush/src/rs/example/android/com/healingbrush/
DDrawView.java41 int len; field in DrawView
107 ret = new Region(Arrays.copyOf(path, len), img); in getRegion()
116 len = 2; in downPoint()
130 if (len + size * 2 >= path.length) { in movePoint()
131 path = Arrays.copyOf(path, 2 * (len + size * 2)); in movePoint()
135 path[len] = imgMoveList[i]; in movePoint()
136 path[len + 1] = imgMoveList[i + 1]; in movePoint()
137 len += 2; in movePoint()
142 if (len + 2 >= path.length) { in upPoint()
143 path = Arrays.copyOf(path, 2 * (len + 2)); in upPoint()
[all …]
/frameworks/wilhelm/tools/mphtogen/
Dmphtogen.c31 unsigned len = 0; in convert() local
33 if (len > 0) { in convert()
35 ++len; in convert()
37 if (len > 78) { in convert()
39 len = 0; in convert()
42 len += 3; in convert()
44 if (len > 0) { in convert()
/frameworks/ex/common/tools/
Dmake-iana-tld-pattern.py36 self.lineLength = len(TAB)
40 self.lineLength += len(other)
48 self.lineLength = len(TAB)
62 if (len(self.words) == 0) and (len(self.letters) == 0):
78 if len(self.words) != 0:
94 if len(self.words) > 0 and len(self.letters) > 0:
97 if len(self.letters) == 1:
99 elif len(self.letters) > 0:
107 if len(self.words) != 0:
117 length = len(line)
[all …]

12345678910>>...29