/frameworks/base/apct-tests/perftests/core/src/android/opengl/perftests/ |
D | MatrixPerfTest.java | 36 public float[] array = new float[48]; field in MatrixPerfTest 46 array[i] = rng.nextFloat(); in testMultiplyMM() 51 Matrix.multiplyMM(array, 32, array, 16, array, 0); in testMultiplyMM() 59 array[i] = rng.nextFloat(); in testMultiplyMMLeftOverlapResult() 64 Matrix.multiplyMM(array, 16, array, 16, array, 0); in testMultiplyMMLeftOverlapResult() 72 array[i] = rng.nextFloat(); in testMultiplyMMRightOverlapResult() 77 Matrix.multiplyMM(array, 0, array, 16, array, 0); in testMultiplyMMRightOverlapResult() 85 array[i] = rng.nextFloat(); in testMultiplyMMAllOverlap() 90 Matrix.multiplyMM(array, 0, array, 0, array, 0); in testMultiplyMMAllOverlap() 98 array[i] = rng.nextFloat(); in testMultiplyMMOutputBigArray() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | GrowingArrayUtils.java | 45 public static <T> T[] append(T[] array, int currentSize, T element) { in append() argument 46 assert currentSize <= array.length; in append() 48 if (currentSize + 1 > array.length) { in append() 51 (Class<T>) array.getClass().getComponentType(), growSize(currentSize)); in append() 52 System.arraycopy(array, 0, newArray, 0, currentSize); in append() 53 array = newArray; in append() 55 array[currentSize] = element; in append() 56 return array; in append() 63 public static int[] append(int[] array, int currentSize, int element) { in append() argument 64 assert currentSize <= array.length; in append() [all …]
|
D | QuickSelect.java | 50 private static int selectImpl(@NonNull int[] array, int left, int right, int k) { in selectImpl() argument 55 final int pivotIndex = partition(array, left, right, (left + right) >> 1); in selectImpl() 66 private static int selectImpl(@NonNull long[] array, int left, int right, int k) { in selectImpl() argument 71 final int pivotIndex = partition(array, left, right, (left + right) >> 1); in selectImpl() 82 private static <T> int selectImpl(@NonNull T[] array, int left, int right, int k, in selectImpl() argument 88 final int pivotIndex = partition(array, left, right, (left + right) >> 1, comparator); in selectImpl() 114 private static int partition(@NonNull int[] array, int left, int right, int pivotIndex) { in partition() argument 115 final int pivotValue = array[pivotIndex]; in partition() 116 swap(array, right, pivotIndex); in partition() 119 if (array[i] < pivotValue) { in partition() [all …]
|
D | HexDump.java | 29 public static String dumpHexString(@Nullable byte[] array) { in dumpHexString() argument 30 if (array == null) return "(null)"; in dumpHexString() 31 return dumpHexString(array, 0, array.length); in dumpHexString() 34 public static String dumpHexString(@Nullable byte[] array, int offset, int length) in dumpHexString() argument 36 if (array == null) return "(null)"; in dumpHexString() 68 byte b = array[i]; in dumpHexString() 107 public static String toHexString(byte[] array) in toHexString() argument 109 return toHexString(array, 0, array.length, true); in toHexString() 113 public static String toHexString(byte[] array, boolean upperCase) in toHexString() argument 115 return toHexString(array, 0, array.length, upperCase); in toHexString() [all …]
|
D | ArrayUtils.java | 189 public static boolean isEmpty(@Nullable Collection<?> array) { in isEmpty() argument 190 return array == null || array.isEmpty(); in isEmpty() 204 public static <T> boolean isEmpty(@Nullable T[] array) { in isEmpty() argument 205 return array == null || array.length == 0; in isEmpty() 211 public static boolean isEmpty(@Nullable int[] array) { in isEmpty() argument 212 return array == null || array.length == 0; in isEmpty() 218 public static boolean isEmpty(@Nullable long[] array) { in isEmpty() argument 219 return array == null || array.length == 0; in isEmpty() 225 public static boolean isEmpty(@Nullable byte[] array) { in isEmpty() argument 226 return array == null || array.length == 0; in isEmpty() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/ |
D | SubtitleArrayMapping.kt | 24 subtitleIdsMap["internet"] = R.array.tile_states_internet 25 subtitleIdsMap["wifi"] = R.array.tile_states_wifi 26 subtitleIdsMap["cell"] = R.array.tile_states_cell 27 subtitleIdsMap["battery"] = R.array.tile_states_battery 28 subtitleIdsMap["dnd"] = R.array.tile_states_dnd 29 subtitleIdsMap["flashlight"] = R.array.tile_states_flashlight 30 subtitleIdsMap["rotation"] = R.array.tile_states_rotation 31 subtitleIdsMap["bt"] = R.array.tile_states_bt 32 subtitleIdsMap["airplane"] = R.array.tile_states_airplane 33 subtitleIdsMap["location"] = R.array.tile_states_location [all …]
|
/frameworks/base/telephony/common/com/android/internal/telephony/util/ |
D | ArrayUtils.java | 40 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element) { in appendElement() argument 41 return appendElement(kind, array, element, false); in appendElement() 55 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element, in appendElement() argument 59 if (array != null) { in appendElement() 60 if (!allowDuplicates && contains(array, element)) return array; in appendElement() 61 end = array.length; in appendElement() 63 System.arraycopy(array, 0, result, 0, end); in appendElement() 133 public static boolean contains(@Nullable char[] array, char value) { in contains() argument 134 if (array == null) return false; in contains() 135 for (char element : array) { in contains() [all …]
|
/frameworks/base/core/tests/utiltests/src/android/util/ |
D | MemoryIntArrayTest.java | 56 MemoryIntArray array = null; in testSize() local 58 array = new MemoryIntArray(3); in testSize() 59 assertEquals("size must be three", 3, array.size()); in testSize() 61 IoUtils.closeQuietly(array); in testSize() 67 MemoryIntArray array = null; in testGetSet() local 69 array = new MemoryIntArray(3); in testGetSet() 71 array.set(0, 1); in testGetSet() 72 array.set(1, 2); in testGetSet() 73 array.set(2, 3); in testGetSet() 75 assertEquals("First element should be 1", 1, array.get(0)); in testGetSet() [all …]
|
/frameworks/libs/binary_translation/base/ |
D | arena_zeroed_array_test.cc | 28 ArenaZeroedArray<int> array(3, &arena); in TEST() local 30 ASSERT_EQ(array[0], 0); in TEST() 31 ASSERT_EQ(array[1], 0); in TEST() 32 ASSERT_EQ(array[2], 0); in TEST() 34 array[0] = 10; in TEST() 36 ASSERT_EQ(array.at(0), 10); in TEST() 37 ASSERT_EQ(array.at(1), 0); in TEST() 38 ASSERT_EQ(array.at(2), 0); in TEST() 40 array.at(1) = 11; in TEST() 42 ASSERT_EQ(array[0], 10); in TEST() [all …]
|
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/utils/ |
D | WatcherTest.java | 196 WatchedArrayMap<Integer, Leaf> array = new WatchedArrayMap<>(); in testWatchedArrayMap() local 197 array.put(INDEX_A, leafA); in testWatchedArrayMap() 198 array.put(INDEX_B, leafB); in testWatchedArrayMap() 199 tester = new WatchableTester(array, name); in testWatchedArrayMap() 209 array.remove(INDEX_B); in testWatchedArrayMap() 213 array.put(INDEX_B, leafB); in testWatchedArrayMap() 214 array.put(INDEX_C, leafB); in testWatchedArrayMap() 218 array.remove(INDEX_C); in testWatchedArrayMap() 222 array.remove(INDEX_B); in testWatchedArrayMap() 226 array.clear(); in testWatchedArrayMap() [all …]
|
/frameworks/base/services/permission/java/com/android/server/permission/access/immutable/ |
D | IntReferenceMap.kt | 27 internal val array: SparseArray<MutableReference<I, M>> constant in com.android.server.permission.access.immutable.IntReferenceMap 30 get() = array.size() 32 fun isEmpty(): Boolean = array.size() == 0 in isEmpty() 34 operator fun contains(key: Int): Boolean = array.contains(key) in isEmpty() 36 @Suppress("ReplaceGetOrSet") operator fun get(key: Int): I? = array.get(key)?.get() in isEmpty() 38 fun indexOfKey(key: Int): Int = array.indexOfKey(key) in isEmpty() 40 fun keyAt(index: Int): Int = array.keyAt(index) in isEmpty() 42 fun valueAt(index: Int): I = array.valueAt(index).get() in isEmpty() 46 override fun toString(): String = array.toString() in isEmpty() 55 array: SparseArray<MutableReference<I, M>> = SparseArray() in isEmpty() [all …]
|
D | IntSet.kt | 22 sealed class IntSet(internal val array: SparseBooleanArray) : Immutable<MutableIntSet> { constant in com.android.server.permission.access.immutable.IntSet 24 get() = array.size() 26 fun isEmpty(): Boolean = array.size() == 0 in isEmpty() 28 operator fun contains(element: Int): Boolean = array.contains(element) in isEmpty() 30 fun indexOf(element: Int): Int = array.indexOfKey(element) in isEmpty() 32 fun elementAt(index: Int): Int = array.keyAt(index) in isEmpty() 36 override fun toString(): String = array.toString() in isEmpty() 40 class MutableIntSet(array: SparseBooleanArray = SparseBooleanArray()) : IntSet(array) { in isEmpty() 41 constructor(intSet: IntSet) : this(intSet.array.clone()) in isEmpty() 44 if (array.contains(element)) { in isEmpty() [all …]
|
D | IntMap.kt | 22 sealed class IntMap<T>(internal val array: SparseArray<T>) : Immutable<MutableIntMap<T>> { constant in com.android.server.permission.access.immutable.IntMap 24 get() = array.size() 26 fun isEmpty(): Boolean = array.size() == 0 in isEmpty() 28 operator fun contains(key: Int): Boolean = array.contains(key) in isEmpty() 30 operator fun get(key: Int): T? = array.get(key) in isEmpty() 32 fun indexOfKey(key: Int): Int = array.indexOfKey(key) in isEmpty() 34 fun keyAt(index: Int): Int = array.keyAt(index) in isEmpty() 36 fun valueAt(index: Int): T = array.valueAt(index) in isEmpty() 40 override fun toString(): String = array.toString() in isEmpty() 44 class MutableIntMap<T>(array: SparseArray<T> = SparseArray()) : IntMap<T>(array) { in isEmpty() [all …]
|
/frameworks/base/core/java/android/os/ |
D | HwBlob.java | 112 public native final void copyToBoolArray(long offset, boolean[] array, int size); in copyToBoolArray() argument 123 public native final void copyToInt8Array(long offset, byte[] array, int size); in copyToInt8Array() argument 134 public native final void copyToInt16Array(long offset, short[] array, int size); in copyToInt16Array() argument 145 public native final void copyToInt32Array(long offset, int[] array, int size); in copyToInt32Array() argument 156 public native final void copyToInt64Array(long offset, long[] array, int size); in copyToInt64Array() argument 167 public native final void copyToFloatArray(long offset, float[] array, int size); in copyToFloatArray() argument 178 public native final void copyToDoubleArray(long offset, double[] array, int size); in copyToDoubleArray() argument 345 public static Boolean[] wrapArray(@NonNull boolean[] array) { in wrapArray() argument 346 final int n = array.length; in wrapArray() 349 wrappedArray[i] = array[i]; in wrapArray() [all …]
|
D | HwParcel.java | 210 boolean[] array = new boolean[n]; in writeBoolVector() 212 array[i] = val.get(i); in writeBoolVector() 215 writeBoolVector(array); in writeBoolVector() 224 byte[] array = new byte[n]; in writeInt8Vector() 226 array[i] = val.get(i); in writeInt8Vector() 229 writeInt8Vector(array); in writeInt8Vector() 238 short[] array = new short[n]; in writeInt16Vector() local 240 array[i] = val.get(i); in writeInt16Vector() 243 writeInt16Vector(array); in writeInt16Vector() 252 int[] array = new int[n]; in writeInt32Vector() local [all …]
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | ByteArrayHelpers.java | 40 public static byte[] toByteArray(byte[] array) { in toByteArray() argument 41 return array; in toByteArray() 50 public static byte[] toByteArray(short[] array) { in toByteArray() argument 51 return toByteArray(array, Short.SIZE); in toByteArray() 60 public static byte[] toByteArray(char[] array) { in toByteArray() argument 61 return toByteArray(array, Character.SIZE); in toByteArray() 69 public static byte[] toByteArray(int[] array) { in toByteArray() argument 70 return toByteArray(array, Integer.SIZE); in toByteArray() 78 public static byte[] toByteArray(long[] array) { in toByteArray() argument 79 return toByteArray(array, Long.SIZE); in toByteArray() [all …]
|
/frameworks/base/core/tests/fuzzers/ParcelFuzzer/ |
D | ReadUtils.java | 155 byte[] array; 159 array = new byte[Math.min(MAX_LEN, parcel.readInt())]; 162 array = new byte[provider.consumeInt(MIN_LEN, MAX_LEN)]; 164 parcel.readByteArray(array); 167 char[] array; 171 array = new char[Math.min(MAX_LEN, parcel.readInt())]; 174 array = new char[provider.consumeInt(MIN_LEN, MAX_LEN)]; 176 parcel.readCharArray(array); 179 int[] array; 183 array = new int[Math.min(MAX_LEN, parcel.readInt())]; [all …]
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | ArrayUtils.java | 29 public static String[] nullToEmpty(String[] array) { in nullToEmpty() argument 30 return (array != null) ? array : EmptyArray.STRING; in nullToEmpty() 33 public static String[] cloneIfNotEmpty(String[] array) { in cloneIfNotEmpty() argument 34 return ((array != null) && (array.length > 0)) ? array.clone() : array; in cloneIfNotEmpty() 41 public static int[] cloneIfNotEmpty(int[] array) { in cloneIfNotEmpty() argument 42 return ((array != null) && (array.length > 0)) ? array.clone() : array; in cloneIfNotEmpty() 45 public static byte[] cloneIfNotEmpty(byte[] array) { in cloneIfNotEmpty() argument 46 return ((array != null) && (array.length > 0)) ? array.clone() : array; in cloneIfNotEmpty() 127 public static void forEach(int[] array, Consumer<Integer> consumer) { in forEach() argument 128 for (int i : array) { in forEach()
|
/frameworks/base/services/core/java/com/android/server/biometrics/ |
D | HardwareAuthTokenUtils.java | 32 final byte[] array = new byte[69]; in toByteArray() 35 array[0] = 0; in toByteArray() 38 writeLong(hat.challenge, array, 1 /* offset */); in toByteArray() 41 writeLong(hat.userId, array, 9 /* offset */); in toByteArray() 44 writeLong(hat.authenticatorId, array, 17 /* offset */); in toByteArray() 47 writeInt(flipIfNativelyLittle(hat.authenticatorType), array, 25 /* offset */); in toByteArray() local 50 writeLong(flipIfNativelyLittle(hat.timestamp.milliSeconds), array, 29 /* offset */); in toByteArray() local 53 System.arraycopy(hat.mac, 0 /* srcPos */, array, 37 /* destPos */, hat.mac.length); in toByteArray() 55 return array; in toByteArray() 58 public static HardwareAuthToken toHardwareAuthToken(byte[] array) { in toHardwareAuthToken() argument [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
D | DumpUtilsTest.java | 195 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_empty() local 197 DumpUtils.dumpSparseArray(mPrintWriter, /* prefix= */ "...", array, "whatever"); in testDumpSparseArray_empty() 206 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_oneElement() local 207 array.put(1, "uno"); in testDumpSparseArray_oneElement() 209 DumpUtils.dumpSparseArray(mPrintWriter, /* prefix= */ ".", array, "number"); in testDumpSparseArray_oneElement() 213 assertWithMessage("dump of %s", array).that(output).isEqualTo("" in testDumpSparseArray_oneElement() 220 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_oneNullElement() local 221 array.put(1, null); in testDumpSparseArray_oneNullElement() 223 DumpUtils.dumpSparseArray(mPrintWriter, /* prefix= */ ".", array, "NULL"); in testDumpSparseArray_oneNullElement() 227 assertWithMessage("dump of %s", array).that(output).isEqualTo("" in testDumpSparseArray_oneNullElement() [all …]
|
/frameworks/native/opengl/tools/glgen/stubs/gles11/ |
D | common.cpp | 47 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) in getPointer() argument 57 *array = nullptr; in getPointer() 62 *array = jniGetNioBufferBaseArray(_env, buffer); in getPointer() 69 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) { in Get() argument 70 return _env->GetByteArrayElements(array, is_copy); in Get() 75 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) { in Get() argument 76 return _env->GetBooleanArrayElements(array, is_copy); in Get() 81 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) { in Get() argument 82 return _env->GetCharArrayElements(array, is_copy); in Get() 87 static void* Get(JNIEnv* _env, jshortArray array, jboolean* is_copy) { in Get() argument [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | LongSparseLongArrayTest.java | 42 final LongSparseLongArray array = new LongSparseLongArray(5); in testSimplePut() local 45 array.put(value, value); in testSimplePut() 49 assertEquals(value, array.get(value, -1)); in testSimplePut() 50 assertEquals(-1, array.get(-value, -1)); in testSimplePut() 56 final LongSparseLongArray array = new LongSparseLongArray(5); in testSimplePutBackwards() local 59 array.put(value, value); in testSimplePutBackwards() 63 assertEquals(value, array.get(value, -1)); in testSimplePutBackwards() 64 assertEquals(-1, array.get(-value, -1)); in testSimplePutBackwards() 70 final LongSparseLongArray array = new LongSparseLongArray(5); in testMiddleInsert() local 73 array.put(value, value); in testMiddleInsert() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/utils/ |
D | HashCodeHelpers.java | 37 public static int hashCode(int... array) { in hashCode() argument 38 if (array == null) { in hashCode() 50 for (int x : array) { in hashCode() 67 public static int hashCode(float... array) { in hashCode() argument 68 if (array == null) { in hashCode() 73 for (float f : array) { in hashCode() 90 public static <T> int hashCodeGeneric(T... array) { in hashCodeGeneric() argument 91 if (array == null) { in hashCodeGeneric() 96 for (T o : array) { in hashCodeGeneric()
|
/frameworks/base/core/java/android/util/ |
D | ArraySet.java | 188 final Object[] array = sTwiceBaseCache; in allocArrays() local 190 mArray = array; in allocArrays() 191 sTwiceBaseCache = (Object[]) array[0]; in allocArrays() 192 mHashes = (int[]) array[1]; in allocArrays() 194 array[0] = array[1] = null; in allocArrays() 206 Slog.wtf(TAG, "Found corrupt ArraySet cache: [0]=" + array[0] in allocArrays() 207 + " [1]=" + array[1]); in allocArrays() 215 final Object[] array = sBaseCache; in allocArrays() local 217 mArray = array; in allocArrays() 218 sBaseCache = (Object[]) array[0]; in allocArrays() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/operations/paint/ |
D | PaintBundle.java | 276 int callPrintGradient(int cmd, int[] array, int i, StringBuilder p) { in callPrintGradient() argument 283 int len = array[ret++]; in callPrintGradient() 288 colors[j] = array[ret++]; in callPrintGradient() 291 len = array[ret++]; in callPrintGradient() 296 stops[j] = asFloatStr(array[ret++]); in callPrintGradient() 303 p.append("[" + asFloatStr(array[ret++])); in callPrintGradient() 304 p.append(", " + asFloatStr(array[ret++]) + "],\n"); in callPrintGradient() 306 p.append("[" + asFloatStr(array[ret++])); in callPrintGradient() 307 p.append(", " + asFloatStr(array[ret++]) + "],\n"); in callPrintGradient() 308 int tileMode = array[ret++]; in callPrintGradient() [all …]
|