Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 296) sorted by relevance

12345678910>>...12

/frameworks/rs/driver/linkloader/utils/
Dserialize.h36 inline void swap_byte_order(unsigned char (&array)[1]) { in swap_byte_order()
40 inline void swap_byte_order(unsigned char (&array)[2]) { in swap_byte_order()
41 std::swap(array[0], array[1]); in swap_byte_order()
44 inline void swap_byte_order(unsigned char (&array)[4]) { in swap_byte_order()
45 std::swap(array[0], array[3]); in swap_byte_order()
46 std::swap(array[1], array[2]); in swap_byte_order()
49 inline void swap_byte_order(unsigned char (&array)[8]) { in swap_byte_order()
50 std::swap(array[0], array[7]); in swap_byte_order()
51 std::swap(array[1], array[6]); in swap_byte_order()
52 std::swap(array[2], array[5]); in swap_byte_order()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DHexDump.java23 public static String dumpHexString(byte[] array) in dumpHexString() argument
25 return dumpHexString(array, 0, array.length); in dumpHexString()
28 public static String dumpHexString(byte[] array, int offset, int length) in dumpHexString() argument
61 byte b = array[i]; in dumpHexString()
99 public static String toHexString(byte[] array) in toHexString() argument
101 return toHexString(array, 0, array.length); in toHexString()
104 public static String toHexString(byte[] array, int offset, int length) in toHexString() argument
111 byte b = array[i]; in toHexString()
126 byte[] array = new byte[1]; in toByteArray()
127 array[0] = b; in toByteArray()
[all …]
DArrayUtils.java129 public static <T> boolean contains(T[] array, T value) { in contains() argument
130 return indexOf(array, value) != -1; in contains()
137 public static <T> int indexOf(T[] array, T value) { in indexOf() argument
138 for (int i = 0; i < array.length; i++) { in indexOf()
139 if (array[i] == null) { in indexOf()
142 if (value != null && array[i].equals(value)) return i; in indexOf()
151 public static <T> boolean containsAll(T[] array, T[] check) { in containsAll() argument
153 if (!contains(array, checkItem)) { in containsAll()
160 public static boolean contains(int[] array, int value) { in contains() argument
161 for (int element : array) { in contains()
[all …]
/frameworks/base/core/tests/coretests/src/android/util/
DLongSparseLongArrayTest.java33 final LongSparseLongArray array = new LongSparseLongArray(5); in testSimplePut() local
36 array.put(value, value); in testSimplePut()
40 assertEquals(value, array.get(value, -1)); in testSimplePut()
41 assertEquals(-1, array.get(-value, -1)); in testSimplePut()
46 final LongSparseLongArray array = new LongSparseLongArray(5); in testSimplePutBackwards() local
49 array.put(value, value); in testSimplePutBackwards()
53 assertEquals(value, array.get(value, -1)); in testSimplePutBackwards()
54 assertEquals(-1, array.get(-value, -1)); in testSimplePutBackwards()
59 final LongSparseLongArray array = new LongSparseLongArray(5); in testMiddleInsert() local
62 array.put(value, value); in testMiddleInsert()
[all …]
/frameworks/base/graphics/java/android/graphics/
DColorMatrixColorFilter.java40 public ColorMatrixColorFilter(float[] array) { in ColorMatrixColorFilter() argument
41 if (array.length < 20) { in ColorMatrixColorFilter()
44 native_instance = nativeColorMatrixFilter(array); in ColorMatrixColorFilter()
45 nativeColorFilter = nColorMatrixFilter(native_instance, array); in ColorMatrixColorFilter()
48 private static native int nativeColorMatrixFilter(float[] array); in nativeColorMatrixFilter() argument
49 private static native int nColorMatrixFilter(int nativeFilter, float[] array); in nColorMatrixFilter() argument
/frameworks/native/libs/utils/
DVectorImpl.cpp119 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) in insertArrayAt() argument
125 _do_copy(where, array, length); in insertArrayAt()
130 ssize_t VectorImpl::appendArray(const void* array, size_t length) in appendArray() argument
132 return insertArrayAt(array, size(), length); in appendArray()
172 void* array = const_cast<void*>(arrayImpl()); in sort() local
176 void* item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
177 void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); in sort()
182 array = editArrayImpl(); in sort()
183 if (!array) return NO_MEMORY; in sort()
186 item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
[all …]
/frameworks/av/media/libstagefright/codecs/amrwb/src/
Dlagconceal.cpp101 void insertion_sort(int16 array[], int16 n);
102 void insert(int16 array[], int16 num, int16 x);
333 void insertion_sort(int16 array[], int16 n) in insertion_sort() argument
339 insert(array, i, array[i]); in insertion_sort()
347 void insert(int16 array[], int16 n, int16 x) in insert() argument
354 if (x < array[i]) in insert()
356 array[i + 1] = array[i]; in insert()
363 array[i + 1] = x; in insert()
/frameworks/base/core/jni/
Dandroid_nio_utils.cpp29 void* android::nio_getPointer(JNIEnv *_env, jobject buffer, jarray *array) { in nio_getPointer() argument
30 assert(array); in nio_getPointer()
39 *array = NULL; in nio_getPointer()
43 *array = (jarray) _env->CallStaticObjectMethod(gNioJNI.nioAccessClass, in nio_getPointer()
47 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); in nio_getPointer()
53 void android::nio_releasePointer(JNIEnv *_env, jarray array, void *data, in nio_releasePointer() argument
55 _env->ReleasePrimitiveArrayCritical(array, data, in nio_releasePointer()
Dandroid_ddm_DdmHandleNativeHeap.cpp80 jbyteArray array = env->NewByteArray(sizeof(Header) + header.mapSize + header.allocSize); in DdmHandleNativeHeap_getLeakInfo() local
81 if (array != NULL) { in DdmHandleNativeHeap_getLeakInfo()
82 env->SetByteArrayRegion(array, 0, in DdmHandleNativeHeap_getLeakInfo()
84 env->SetByteArrayRegion(array, sizeof(header), in DdmHandleNativeHeap_getLeakInfo()
86 env->SetByteArrayRegion(array, sizeof(header) + maps.size(), in DdmHandleNativeHeap_getLeakInfo()
91 return array; in DdmHandleNativeHeap_getLeakInfo()
/frameworks/base/graphics/java/android/graphics/drawable/
DLayerDrawable.java342 final ChildDrawable[] array = mLayerState.mChildren; in draw() local
345 array[i].mDrawable.draw(canvas); in draw()
365 final ChildDrawable[] array = mLayerState.mChildren; in getPadding() local
368 reapplyPadding(i, array[i]); in getPadding()
380 final ChildDrawable[] array = mLayerState.mChildren; in setVisible() local
383 array[i].mDrawable.setVisible(visible, restart); in setVisible()
390 final ChildDrawable[] array = mLayerState.mChildren; in setDither() local
393 array[i].mDrawable.setDither(dither); in setDither()
399 final ChildDrawable[] array = mLayerState.mChildren; in setAlpha() local
402 array[i].mDrawable.setAlpha(alpha); in setAlpha()
[all …]
/frameworks/base/core/java/android/net/
DNetworkUtils.java180 byte[] array = address.getAddress(); in getNetworkPart()
182 if (prefixLength < 0 || prefixLength > array.length * 8) { in getNetworkPart()
190 if (offset < array.length) array[offset] = (byte)(array[offset] & mask); in getNetworkPart()
194 for (; offset < array.length; offset++) { in getNetworkPart()
195 array[offset] = 0; in getNetworkPart()
200 netPart = InetAddress.getByAddress(array); in getNetworkPart()
/frameworks/base/core/java/android/content/
DClipDescription.java145 ArrayList<String> array = null; in filterMimeTypes() local
148 if (array == null) { in filterMimeTypes()
149 array = new ArrayList<String>(); in filterMimeTypes()
151 array.add(mMimeTypes[i]); in filterMimeTypes()
154 if (array == null) { in filterMimeTypes()
157 String[] rawArray = new String[array.size()]; in filterMimeTypes()
158 array.toArray(rawArray); in filterMimeTypes()
/frameworks/base/media/jni/
Dandroid_mtp_MtpDatabase.cpp254 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, method_getObjectList, in getObjectList() local
256 if (!array) in getObjectList()
259 jint* handles = env->GetIntArrayElements(array, 0); in getObjectList()
260 jsize length = env->GetArrayLength(array); in getObjectList()
263 env->ReleaseIntArrayElements(array, handles, 0); in getObjectList()
264 env->DeleteLocalRef(array); in getObjectList()
283 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, in getSupportedPlaybackFormats() local
285 if (!array) in getSupportedPlaybackFormats()
288 jint* formats = env->GetIntArrayElements(array, 0); in getSupportedPlaybackFormats()
289 jsize length = env->GetArrayLength(array); in getSupportedPlaybackFormats()
[all …]
Dandroid_mtp_MtpDevice.cpp178 jintArray array = env->NewIntArray(length); in android_mtp_MtpDevice_get_storage_ids() local
180 env->SetIntArrayRegion(array, 0, length, (const jint *)storageIDs->array()); in android_mtp_MtpDevice_get_storage_ids()
183 return array; in android_mtp_MtpDevice_get_storage_ids()
232 jintArray array = env->NewIntArray(length); in android_mtp_MtpDevice_get_object_handles() local
234 env->SetIntArrayRegion(array, 0, length, (const jint *)handles->array()); in android_mtp_MtpDevice_get_object_handles()
237 return array; in android_mtp_MtpDevice_get_object_handles()
304 jbyteArray array; member
310 cbData->env->SetByteArrayRegion(cbData->array, offset, length, (jbyte *)data); in get_object_callback()
321 jbyteArray array = env->NewByteArray(objectSize); in android_mtp_MtpDevice_get_object() local
322 if (!array) { in android_mtp_MtpDevice_get_object()
[all …]
/frameworks/base/core/jni/android/graphics/
DColorFilter.cpp103 SkFixed array[20]; in CreateColorMatrixFilter() local
105 array[i] = SkFloatToScalar(src[i]); in CreateColorMatrixFilter()
107 return new SkColorMatrixFilter(array); in CreateColorMatrixFilter()
133 #define REG(env, name, array) \ argument
134 result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
135 SK_ARRAY_COUNT(array)); \
DGraphics.cpp52 AutoJavaFloatArray::AutoJavaFloatArray(JNIEnv* env, jfloatArray array, in AutoJavaFloatArray() argument
54 : fEnv(env), fArray(array), fPtr(NULL), fLen(0) { in AutoJavaFloatArray()
56 if (array) { in AutoJavaFloatArray()
57 fLen = env->GetArrayLength(array); in AutoJavaFloatArray()
61 fPtr = env->GetFloatArrayElements(array, NULL); in AutoJavaFloatArray()
72 AutoJavaIntArray::AutoJavaIntArray(JNIEnv* env, jintArray array, in AutoJavaIntArray() argument
74 : fEnv(env), fArray(array), fPtr(NULL), fLen(0) { in AutoJavaIntArray()
76 if (array) { in AutoJavaIntArray()
77 fLen = env->GetArrayLength(array); in AutoJavaIntArray()
81 fPtr = env->GetIntArrayElements(array, NULL); in AutoJavaIntArray()
[all …]
DDrawFilter.cpp62 #define REG(env, name, array) … argument
63 …result = android::AndroidRuntime::registerNativeMethods(env, name, array, SK_ARRAY_COUNT(array)); …
DXfermode.cpp62 #define REG(env, name, array) \ argument
63 result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
64 SK_ARRAY_COUNT(array)); \
/frameworks/base/core/java/com/android/internal/os/
DPowerProfile.java163 ArrayList<Double> array = new ArrayList<Double>(); in readPowerValuesFromXml() local
177 sPowerMap.put(arrayName, array.toArray(new Double[array.size()])); in readPowerValuesFromXml()
182 array.clear(); in readPowerValuesFromXml()
197 array.add(value); in readPowerValuesFromXml()
203 sPowerMap.put(arrayName, array.toArray(new Double[array.size()])); in readPowerValuesFromXml()
/frameworks/base/services/java/com/android/server/
DIntentResolverOld.java378 ArrayList<F> array = mTypeToFilter.get(name); in register_mime_types() local
379 if (array == null) { in register_mime_types()
381 array = new ArrayList<F>(); in register_mime_types()
382 mTypeToFilter.put(name, array); in register_mime_types()
384 array.add(filter); in register_mime_types()
387 array = mBaseTypeToFilter.get(baseName); in register_mime_types()
388 if (array == null) { in register_mime_types()
390 array = new ArrayList<F>(); in register_mime_types()
391 mBaseTypeToFilter.put(baseName, array); in register_mime_types()
393 array.add(filter); in register_mime_types()
[all …]
/frameworks/base/docs/html/guide/topics/resources/
Dmore-resources.jd21 <dd>XML resource that provides an array of integers.</dd>
24 for an array of drawables).</dd>
523 <p>An array of integers defined in XML.</p>
525 <p class="note"><strong>Note:</strong> An integer array is a simple resource that is referenced
527 such, you can combine integer array resources with other simple resources in the one XML file,
535 The filename is arbitrary. The {@code &lt;integer-array>} element's {@code name} will be used as the
539 <dd>Resource pointer to an array of integers.</dd>
543 In Java: <code>R.array.<em>integer_array_name</em></code><br/>
544 In XML: <code>@[<em>package</em>:]array.<em>integer_array_name</em></code>
551 &lt;<a href="#integer-array-resources-element">resources</a>>
[all …]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DNinePatch_Delegate.java90 byte[] array = baos.toByteArray(); in serialize()
91 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk)); in serialize()
92 return array; in serialize()
104 public static NinePatchChunk getChunk(byte[] array) { in getChunk() argument
105 SoftReference<NinePatchChunk> chunkRef = sChunkCache.get(array); in getChunk()
108 ByteArrayInputStream bais = new ByteArrayInputStream(array); in getChunk()
116 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk)); in getChunk()
/frameworks/native/opengl/tools/glgen/stubs/jsr239/
DGLCHeader.cpp116 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
130 *array = NULL;
134 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
136 if (*array == NULL) {
146 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
148 _env->ReleasePrimitiveArrayCritical(array, data,
178 jarray array = 0;
181 buf = getPointer(_env, buffer, &array, &remaining, &offset);
182 if (array) {
183 releasePointer(_env, array, buf, 0);
/frameworks/base/core/java/android/gesture/
DGestureUtils.java353 float[][] array = new float[2][2]; in computeCoVariance() local
354 array[0][0] = 0; in computeCoVariance()
355 array[0][1] = 0; in computeCoVariance()
356 array[1][0] = 0; in computeCoVariance()
357 array[1][1] = 0; in computeCoVariance()
363 array[0][0] += x * x; in computeCoVariance()
364 array[0][1] += x * y; in computeCoVariance()
365 array[1][0] = array[0][1]; in computeCoVariance()
366 array[1][1] += y * y; in computeCoVariance()
368 array[0][0] /= (count / 2); in computeCoVariance()
[all …]
/frameworks/native/include/utils/
DVector.h94 inline const TYPE* array() const;
130 ssize_t insertArrayAt(const TYPE* array, size_t index, size_t length);
133 ssize_t appendArray(const TYPE* array, size_t length);
190 inline const_iterator begin() const { return array(); } in begin()
191 inline const_iterator end() const { return array() + size(); } in end()
197 ssize_t index = removeItemsAt(pos-array()); in erase()
268 const TYPE* Vector<TYPE>::array() const {
283 return *(array() + index);
293 return *(array() + size() - 1);
317 ssize_t Vector<TYPE>::insertArrayAt(const TYPE* array, size_t index, size_t length) {
[all …]

12345678910>>...12