/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | RSUtils.java | 70 public static void genRandomDoubles(long seed, double min, double max, double array[], in genRandomDoubles() argument 78 for (int i = 0; i < array.length; i++) { in genRandomDoubles() 86 array[i] = rand; in genRandomDoubles() 90 for (int i = 0; i < array.length; i++) { in genRandomDoubles() 92 array[i] = min + rand * (max - min); in genRandomDoubles() 99 array[r.nextInt(array.length)] = d; in genRandomDoubles() 102 array[r.nextInt(array.length)] = min; in genRandomDoubles() 103 array[r.nextInt(array.length)] = max; in genRandomDoubles() 105 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles() 106 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles() [all …]
|
D | setelementat.rscript | 14 rs_allocation array; 37 rsSetElementAt(array, &source, i); 47 rsSetElementAt(array, &source, xtemp, y);
|
D | ScriptGroupTest.java | 367 int[] array = new int[ARRAY_SIZE * 4]; in testBuilder2PointWiseKernelToKernelDependency() local 370 array[i] = i; in testBuilder2PointWiseKernelToKernelDependency() 374 input.copyFrom(array); in testBuilder2PointWiseKernelToKernelDependency() 419 int[] array = new int[ARRAY_SIZE * 4]; in testBuilder2GatherScatterAcrossKernelsViaGlobals() local 422 array[i*4] = i * 7; in testBuilder2GatherScatterAcrossKernelsViaGlobals() 423 array[i*4 + 1] = i * 7; in testBuilder2GatherScatterAcrossKernelsViaGlobals() 424 array[i*4 + 2] = i * 7; in testBuilder2GatherScatterAcrossKernelsViaGlobals() 425 array[i*4 + 3] = i * 7; in testBuilder2GatherScatterAcrossKernelsViaGlobals() 429 input.copyFrom(array); in testBuilder2GatherScatterAcrossKernelsViaGlobals() 478 int[] array = new int[ARRAY_SIZE * 4]; in testBuilder2KernelOutputToGlobal() local [all …]
|
/cts/tests/tests/renderscriptlegacy/src/android/renderscriptlegacy/cts/ |
D | RSUtils.java | 48 public static void genRandomDoubles(long seed, double min, double max, double array[], in genRandomDoubles() argument 56 for (int i = 0; i < array.length; i++) { in genRandomDoubles() 64 array[i] = rand; in genRandomDoubles() 68 for (int i = 0; i < array.length; i++) { in genRandomDoubles() 70 array[i] = min + rand * (max - min); in genRandomDoubles() 77 array[r.nextInt(array.length)] = d; in genRandomDoubles() 80 array[r.nextInt(array.length)] = min; in genRandomDoubles() 81 array[r.nextInt(array.length)] = max; in genRandomDoubles() 83 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles() 84 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles() [all …]
|
/cts/tests/tests/rscpp/src/android/cts/rscpp/ |
D | RSUtils.java | 29 public static void genRandom(long seed, int factor, int offset, float array[]) { in genRandom() argument 31 for (int i = 0; i < array.length; i++) { in genRandom() 32 array[i] = r.nextFloat() * factor + offset; in genRandom() 36 public static void genRandom(long seed, int factor, int offset, float array[], in genRandom() argument 39 for (int i = 0; i < array.length / stride; i++) { in genRandom() 42 array[i * stride + j] = 0; in genRandom() 44 array[i * stride + j] = r.nextFloat() * factor + offset; in genRandom() 49 public static void genRandom(long seed, int max, int factor, int offset, int array[]) { in genRandom() argument 51 for (int i = 0; i < array.length; i++) { in genRandom() 52 array[i] = (r.nextInt(max) * factor + offset); in genRandom() [all …]
|
/cts/tests/tests/media/libaudiojni/ |
D | sl-utils.h | 64 jbyte *envGetArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy) { in envGetArrayElements() argument 65 return env->GetByteArrayElements(array, isCopy); in envGetArrayElements() 69 void envReleaseArrayElements(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode) { in envReleaseArrayElements() argument 70 env->ReleaseByteArrayElements(array, elems, mode); in envReleaseArrayElements() 74 jshort *envGetArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy) { in envGetArrayElements() argument 75 return env->GetShortArrayElements(array, isCopy); in envGetArrayElements() 79 void envReleaseArrayElements(JNIEnv *env, jshortArray array, jshort *elems, jint mode) { in envReleaseArrayElements() argument 80 env->ReleaseShortArrayElements(array, elems, mode); in envReleaseArrayElements() 84 jfloat *envGetArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy) { in envGetArrayElements() argument 85 return env->GetFloatArrayElements(array, isCopy); in envGetArrayElements() [all …]
|
/cts/tests/tests/jni/src/android/jni/cts/ |
D | JniInstanceTest.java | 115 short[] array = target.returnShortArray(); in test_returnShortArray() local 116 assertSame(short[].class, array.getClass()); in test_returnShortArray() 117 assertEquals(3, array.length); in test_returnShortArray() 118 assertEquals(10, array[0]); in test_returnShortArray() 119 assertEquals(20, array[1]); in test_returnShortArray() 120 assertEquals(30, array[2]); in test_returnShortArray() 127 String[] array = target.returnStringArray(); in test_returnStringArray() local 128 assertSame(String[].class, array.getClass()); in test_returnStringArray() 129 assertEquals(100, array.length); in test_returnStringArray() 130 assertEquals("blort", array[0]); in test_returnStringArray() [all …]
|
D | JniStaticTest.java | 152 short[] array = StaticNonce.returnShortArray(); in test_returnShortArray() local 153 assertSame(short[].class, array.getClass()); in test_returnShortArray() 154 assertEquals(3, array.length); in test_returnShortArray() 155 assertEquals(10, array[0]); in test_returnShortArray() 156 assertEquals(20, array[1]); in test_returnShortArray() 157 assertEquals(30, array[2]); in test_returnShortArray() 164 String[] array = StaticNonce.returnStringArray(); in test_returnStringArray() local 165 assertSame(String[].class, array.getClass()); in test_returnStringArray() 166 assertEquals(100, array.length); in test_returnStringArray() 167 assertEquals("blort", array[0]); in test_returnStringArray() [all …]
|
/cts/tests/sample/src/android/sample/cts/ |
D | SampleDeviceResultTest.java | 70 private int[] array; in testSort() 73 array = createArray(ARRAY_SIZE); in testSort() 77 Arrays.sort(array); in testSort() 78 assertTrue("Array not sorted", isSorted(array)); in testSort() 100 int[] array = new int[size]; in createArray() local 102 array[i] = random.nextInt(); in createArray() 104 return array; in createArray() 110 private static boolean isSorted(int[] array) { in isSorted() argument 111 int len = array.length; in isSorted() 113 if (array[i] > array[j]) { in isSorted()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | LayerDrawableTest.java | 99 Drawable[] array = new Drawable[]{mBitmapDrawable, mColorDrawable}; in testConstructor() local 100 LayerDrawable layerDrawable = new LayerDrawable(array); in testConstructor() 101 assertEquals(array.length, layerDrawable.getNumberOfLayers()); in testConstructor() 105 array = new Drawable[0]; in testConstructor() 106 layerDrawable = new LayerDrawable(array); in testConstructor() 117 Drawable[] array = new Drawable[0]; in testInflate() local 118 LayerDrawable layerDrawable = new LayerDrawable(array); in testInflate() 136 layerDrawable = new LayerDrawable(array); in testInflate() 172 Drawable[] array = new Drawable[] { mBitmapDrawable, mColorDrawable }; in testFindDrawableByLayerId() local 173 LayerDrawable layerDrawable = new LayerDrawable(array); in testFindDrawableByLayerId() [all …]
|
/cts/tests/tests/security/jni/ |
D | android_security_cts_cve_2021_0394.cpp | 25 char array[kStringLength]; in android_security_cts_cve_2021_0394_poc() local 26 memset(array, kDefaultValue, kStringLength - 1); in android_security_cts_cve_2021_0394_poc() 27 array[kStringLength - 1] = 0; in android_security_cts_cve_2021_0394_poc() 28 jstring s = env->NewStringUTF(array); in android_security_cts_cve_2021_0394_poc() 33 array[kStringLength - 2] = invalid; in android_security_cts_cve_2021_0394_poc() 34 s = env->NewStringUTF(array); in android_security_cts_cve_2021_0394_poc()
|
/cts/tests/tests/preference/src/android/preference/cts/ |
D | ListPreferenceTest.java | 42 R.array.entries_list_preference); in testGetEntries() 49 R.array.entryvalues_list_preference); in testGetEntryValues() 58 private synchronized String[] convertToStringArray(CharSequence[] array) { in convertToStringArray() argument 59 String[] strArray = new String[array.length]; in convertToStringArray() 60 for (int i = 0; i < array.length; i++) { in convertToStringArray() 61 strArray[i] = (String) array[i]; in convertToStringArray()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | DeviceInfoStore.java | 180 public void addArrayResult(String name, int[] array) throws IOException { in addArrayResult() argument 184 for (int value : checkArray(array)) { in addArrayResult() 194 public void addArrayResult(String name, long[] array) throws IOException { in addArrayResult() argument 198 for (long value : checkArray(array)) { in addArrayResult() 208 public void addArrayResult(String name, float[] array) throws IOException { in addArrayResult() argument 209 double[] doubleArray = new double[array.length]; in addArrayResult() 210 for (int i = 0; i < array.length; i++) { in addArrayResult() 211 doubleArray[i] = array[i]; in addArrayResult() 220 public void addArrayResult(String name, double[] array) throws IOException { in addArrayResult() argument 224 for (double value : checkArray(array)) { in addArrayResult() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | IvfWriter.java | 161 private static void lay16Bits(byte[] array, int index, int value){ in lay16Bits() argument 162 array[index] = (byte) (value); in lay16Bits() 163 array[index + 1] = (byte) (value >> 8); in lay16Bits() 175 private static void lay32Bits(byte[] array, int index, int value){ in lay32Bits() argument 177 array[index + i] = (byte) (value >> (i * 8)); in lay32Bits() 190 private static void lay64bits(byte[] array, int index, long value){ in lay64bits() argument 192 array[index + i] = (byte) (value >> (i * 8)); in lay64bits()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | ArrayTest.java | 67 checkStringArray(R.array.strings, new String[] {"zero", "1", "here"}); in testStrings() 68 checkTextArray(R.array.strings, new String[] {"zero", "1", "here"}); in testStrings() 69 checkStringArray(R.array.integers, new String[] {null, null, null}); in testStrings() 70 checkTextArray(R.array.integers, new String[] {null, null, null}); in testStrings() 75 checkIntArray(R.array.strings, new int[] {0, 0, 0}); in testIntegers() 76 checkIntArray(R.array.integers, new int[] {0, 1, 101}); in testIntegers()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeEventStream.java | 194 private static boolean areEnterExitPairedMessages(@NonNull ImeEventArray array, in areEnterExitPairedMessages() argument 196 return array.mArray[i] != null in areEnterExitPairedMessages() 197 && array.mArray[i].isEnterEvent() in areEnterExitPairedMessages() 198 && (i + 1) < array.mLength in areEnterExitPairedMessages() 199 && array.mArray[i + 1] != null in areEnterExitPairedMessages() 200 && array.mArray[i].getEventName().equals(array.mArray[i + 1].getEventName()) in areEnterExitPairedMessages() 201 && array.mArray[i].getEnterTimestamp() == array.mArray[i + 1].getEnterTimestamp(); in areEnterExitPairedMessages() 247 ImeEventArray(ImeEvent[] array, int length) { in ImeEventArray() argument 248 mArray = array; in ImeEventArray()
|
/cts/apps/CameraITS/tests/inprog/scene2/ |
D | test_dng_tags.py | 51 print "HAL reported gains:\n", numpy.array(gains) 52 print "HAL reported ccm:\n", numpy.array(ccm).reshape(3,3) 53 print "HAL reported cal:\n", numpy.array(cal).reshape(3,3) 69 cm_ref = numpy.array(its.objects.rational_to_float( 71 fm_ref = numpy.array(its.objects.rational_to_float( 73 asn_ref = numpy.array(its.objects.rational_to_float(
|
/cts/tests/tests/util/src/android/util/cts/ |
D | ArrayMapTest.java | 166 private static void compareMaps(HashMap map, ArrayMap array) { in compareMaps() argument 167 if (map.size() != array.size()) { in compareMaps() 168 fail("Bad size: expected " + map.size() + ", got " + array.size()); in compareMaps() 174 Object gotValue = array.get(entry.getKey()); in compareMaps() 181 for (int i=0; i<array.size(); i++) { in compareMaps() 182 Object gotValue = array.valueAt(i); in compareMaps() 183 Object key = array.keyAt(i); in compareMaps() 191 if (map.entrySet().hashCode() != array.entrySet().hashCode()) { in compareMaps() 194 + Integer.toHexString(array.entrySet().hashCode())); in compareMaps() 197 if (!map.entrySet().equals(array.entrySet())) { in compareMaps() [all …]
|
D | ArraySetTest.java | 140 private static <E> void compareSets(HashSet<E> set, ArraySet<E> array) { in compareSets() argument 141 assertEquals("Bad size", set.size(), array.size()); in compareSets() 145 assertTrue("ArraySet missing value: " + entry, array.contains(entry)); in compareSets() 149 for (E entry : array) { in compareSets() 155 for (int i = 0; i < array.size(); ++i) { in compareSets() 156 E entry = array.valueAt(i); in compareSets() 161 if (set.hashCode() != array.hashCode()) { in compareSets() 162 assertEquals("Set hash codes differ", set.hashCode(), array.hashCode()); in compareSets() 165 assertTrue("HashSet.equals(ArraySet) failed", set.equals(array)); in compareSets() 166 assertTrue("ArraySet.equals(HashSet) failed", array.equals(set)); in compareSets() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewGroup_LayoutParamsTest.java | 68 TypedArray array = mContext.getTheme().obtainStyledAttributes(R.style.Whatever, attrs); in testSetBaseAttributes() local 69 mockLayoutParams.setBaseAttributes(array, R.styleable.style1_type6, in testSetBaseAttributes() 72 assertEquals(array.getDimensionPixelSize(R.styleable.style1_type6, defValue), in testSetBaseAttributes() 74 assertEquals(array.getDimensionPixelSize(R.styleable.style1_type7, defValue), in testSetBaseAttributes() 76 array.recycle(); in testSetBaseAttributes()
|
D | View_BaseSavedStateTest.java | 81 BaseSavedState[] array = BaseSavedState.CREATOR.newArray(size); in testCreator() local 82 assertNotNull(array); in testCreator() 83 assertEquals(size, array.length); in testCreator() 84 for (BaseSavedState state : array) { in testCreator()
|
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/ |
D | CommonDatabaseUtils.java | 62 private static void fillArray(Cursor cursor, String[] array) { in fillArray() argument 63 for (int i = 0; i < array.length; i++) { in fillArray() 64 array[i] = cursor.getString(i); in fillArray()
|
/cts/tests/tests/openglperf/src/android/openglperf/cts/ |
D | Sphere.java | 152 private int max(int[] array) { in max() argument 153 int max = array[0]; in max() 154 for (int i = 1; i < array.length; i++) { in max() 155 if (array[i] > max) max = array[i]; in max()
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | CellBroadcastDataMigrationTest.java | 78 private static <T> void assertEmpty(String message, T[] array) { in assertEmpty() argument 79 if (array != null && array.length > 0) { in assertEmpty()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | Util.java | 136 public static int findClosest(double[] array, double value) { in findClosest() argument 137 double[] diffArray = new double[array.length]; in findClosest() 138 for (int i = 0; i < array.length; i++) { in findClosest() 139 diffArray[i] = Math.abs(value - array[i]); in findClosest() 142 for (int i = 1; i < array.length; i++) { in findClosest()
|