Home
last modified time | relevance | path

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

12345678

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRSUtils.java70 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 …]
Dsetelementat.rs14 rs_allocation array;
37 rsSetElementAt(array, &source, i);
47 rsSetElementAt(array, &source, xtemp, y);
DScriptGroupTest.java367 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/
DRSUtils.java48 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/
DRSUtils.java29 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/
Dsl-utils.h64 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/
DJniInstanceTest.java115 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 …]
DJniStaticTest.java148 short[] array = StaticNonce.returnShortArray(); in test_returnShortArray() local
149 assertSame(short[].class, array.getClass()); in test_returnShortArray()
150 assertEquals(3, array.length); in test_returnShortArray()
151 assertEquals(10, array[0]); in test_returnShortArray()
152 assertEquals(20, array[1]); in test_returnShortArray()
153 assertEquals(30, array[2]); in test_returnShortArray()
160 String[] array = StaticNonce.returnStringArray(); in test_returnStringArray() local
161 assertSame(String[].class, array.getClass()); in test_returnStringArray()
162 assertEquals(100, array.length); in test_returnStringArray()
163 assertEquals("blort", array[0]); in test_returnStringArray()
[all …]
/cts/apps/CameraITS/pymodules/its/
Ddng.py55 W = numpy.array([
62 HH = numpy.array([
73 H_D65 = numpy.array([
77 H_A = numpy.array([
89 G = numpy.array([[gains[0],0,0], [0,gains[1],0], [0,0,gains[3]]])
92 S = numpy.array([ccm[0:3], ccm[3:6], ccm[6:9]])
98 CC = numpy.array([cal[0:3],cal[3:6],cal[6:9]])
144 XYZCAL_A = numpy.array([1.098675, 1.0, 0.355916])
145 XYZCAL_D65 = numpy.array([0.950456, 1.0, 1.089058])
152 CC = numpy.array([cal[0:3],cal[3:6],cal[6:9]])
/cts/tests/sample/src/android/sample/cts/
DSampleDeviceResultTest.java70 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/
DLayerDrawableTest.java98 Drawable[] array = new Drawable[]{mBitmapDrawable, mColorDrawable}; in testConstructor() local
99 LayerDrawable layerDrawable = new LayerDrawable(array); in testConstructor()
100 assertEquals(array.length, layerDrawable.getNumberOfLayers()); in testConstructor()
104 array = new Drawable[0]; in testConstructor()
105 layerDrawable = new LayerDrawable(array); in testConstructor()
116 Drawable[] array = new Drawable[0]; in testInflate() local
117 LayerDrawable layerDrawable = new LayerDrawable(array); in testInflate()
135 layerDrawable = new LayerDrawable(array); in testInflate()
171 Drawable[] array = new Drawable[] { mBitmapDrawable, mColorDrawable }; in testFindDrawableByLayerId() local
172 LayerDrawable layerDrawable = new LayerDrawable(array); in testFindDrawableByLayerId()
[all …]
/cts/tests/tests/preference2/src/android/preference2/cts/
DListPreferenceTest.java44 R.array.entries_list_preference); in testGetEntries()
51 R.array.entryvalues_list_preference); in testGetEntryValues()
60 private synchronized String[] convertToStringArray(CharSequence[] array){ in convertToStringArray() argument
61 String[] strArray = new String[array.length]; in convertToStringArray()
62 for(int i = 0; i < array.length; i++){ in convertToStringArray()
63 strArray[i] = (String) array[i]; in convertToStringArray()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DDeviceInfoStore.java180 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/
DIvfWriter.java161 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/
DArrayTest.java67 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/
DImeEventStream.java193 private static boolean areEnterExitPairedMessages(@NonNull ImeEventArray array, in areEnterExitPairedMessages() argument
195 return array.mArray[i] != null in areEnterExitPairedMessages()
196 && array.mArray[i].isEnterEvent() in areEnterExitPairedMessages()
197 && (i + 1) < array.mLength in areEnterExitPairedMessages()
198 && array.mArray[i + 1] != null in areEnterExitPairedMessages()
199 && array.mArray[i].getEventName().equals(array.mArray[i + 1].getEventName()) in areEnterExitPairedMessages()
200 && array.mArray[i].getEnterTimestamp() == array.mArray[i + 1].getEnterTimestamp(); in areEnterExitPairedMessages()
246 ImeEventArray(ImeEvent[] array, int length) { in ImeEventArray() argument
247 mArray = array; in ImeEventArray()
/cts/apps/CameraITS/tests/inprog/scene2/
Dtest_dng_tags.py51 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/
DArrayMapTest.java165 private static void compareMaps(HashMap map, ArrayMap array) { in compareMaps() argument
166 if (map.size() != array.size()) { in compareMaps()
167 fail("Bad size: expected " + map.size() + ", got " + array.size()); in compareMaps()
173 Object gotValue = array.get(entry.getKey()); in compareMaps()
180 for (int i=0; i<array.size(); i++) { in compareMaps()
181 Object gotValue = array.valueAt(i); in compareMaps()
182 Object key = array.keyAt(i); in compareMaps()
190 if (map.entrySet().hashCode() != array.entrySet().hashCode()) { in compareMaps()
193 + Integer.toHexString(array.entrySet().hashCode())); in compareMaps()
196 if (!map.entrySet().equals(array.entrySet())) { in compareMaps()
[all …]
DArraySetTest.java139 private static <E> void compareSets(HashSet<E> set, ArraySet<E> array) { in compareSets() argument
140 assertEquals("Bad size", set.size(), array.size()); in compareSets()
144 assertTrue("ArraySet missing value: " + entry, array.contains(entry)); in compareSets()
148 for (E entry : array) { in compareSets()
154 for (int i = 0; i < array.size(); ++i) { in compareSets()
155 E entry = array.valueAt(i); in compareSets()
160 if (set.hashCode() != array.hashCode()) { in compareSets()
161 assertEquals("Set hash codes differ", set.hashCode(), array.hashCode()); in compareSets()
164 assertTrue("HashSet.equals(ArraySet) failed", set.equals(array)); in compareSets()
165 assertTrue("ArraySet.equals(HashSet) failed", array.equals(set)); in compareSets()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DViewGroup_LayoutParamsTest.java67 TypedArray array = mContext.getTheme().obtainStyledAttributes(R.style.Whatever, attrs); in testSetBaseAttributes() local
68 mockLayoutParams.setBaseAttributes(array, R.styleable.style1_type6, in testSetBaseAttributes()
71 assertEquals(array.getDimensionPixelSize(R.styleable.style1_type6, defValue), in testSetBaseAttributes()
73 assertEquals(array.getDimensionPixelSize(R.styleable.style1_type7, defValue), in testSetBaseAttributes()
75 array.recycle(); in testSetBaseAttributes()
/cts/apps/CameraITS/tests/scene0/
Dtest_gyro_bias.py51 times = numpy.array([(e["time"] - gyro_events[0]["time"])/1000000000.0
53 xs = numpy.array([e["x"] for e in gyro_events])
54 ys = numpy.array([e["y"] for e in gyro_events])
55 zs = numpy.array([e["z"] for e in gyro_events])
/cts/tests/tests/rscpp/librscpptest/
Dsetelementat.rs13 rs_allocation array;
36 rsSetElementAt(array, &source, i);
46 rsSetElementAt(array, &source, xtemp, y);
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DCommonDatabaseUtils.java62 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/apps/CameraITS/tests/scene4/
Dtest_multi_camera_alignment.py32 ROTATE_REF_MATRIX = np.array([0, 0, 0, 1])
33 TRANS_REF_MATRIX = np.array([0, 0, 0])
48 return np.array([[1-2*y**2-2*z**2, 2*x*y-2*z*w, 2*x*z+2*y*w],
147 k[i] = np.array([[ical[0], ical[4], ical[2]],
152 rotation[i] = np.array(props_physical[i]['android.lens.poseRotation'])
155 trans[i] = np.array(
167 distort = np.array(props_physical[i]['android.lens.distortion'])
169 cv2_distort = np.array([distort[0], distort[1],
186 np.array([circle[i][0],
/cts/tests/tests/openglperf/src/android/openglperf/cts/
DSphere.java152 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()

12345678