Home
last modified time | relevance | path

Searched refs:random (Results 1 – 25 of 100) sorted by relevance

1234

/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/
DUT_alloc_copyPadded.java83 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_1D() local
84 int width = random.nextInt(512); in testAllocation_Byte3_1D()
89 random.nextBytes(inArray); in testAllocation_Byte3_1D()
114 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_2D() local
115 int width = random.nextInt(128); in testAllocation_Byte3_2D()
116 int height = random.nextInt(128); in testAllocation_Byte3_2D()
121 random.nextBytes(inArray); in testAllocation_Byte3_2D()
146 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_3D() local
147 int w = random.nextInt(32); in testAllocation_Byte3_3D()
148 int h = random.nextInt(32); in testAllocation_Byte3_3D()
[all …]
DUT_alloc_copy.java58 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Byte() local
59 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte()
64 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte()
69 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Byte()
97 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Short() local
98 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short()
105 inArray[i] = (short)random.nextInt(); in allocation_copy1DRangeTo_Short()
111 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Short()
139 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Int() local
140 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int()
[all …]
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/
DUT_alloc_copyPadded.java86 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_1D() local
87 int width = random.nextInt(512); in testAllocation_Byte3_1D()
92 random.nextBytes(inArray); in testAllocation_Byte3_1D()
117 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_2D() local
118 int width = random.nextInt(128); in testAllocation_Byte3_2D()
119 int height = random.nextInt(128); in testAllocation_Byte3_2D()
124 random.nextBytes(inArray); in testAllocation_Byte3_2D()
149 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_3D() local
150 int w = random.nextInt(32); in testAllocation_Byte3_3D()
151 int h = random.nextInt(32); in testAllocation_Byte3_3D()
[all …]
DUT_alloc_copy.java62 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Byte() local
63 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte()
68 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte()
73 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Byte()
101 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Short() local
102 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short()
109 inArray[i] = (short)random.nextInt(); in allocation_copy1DRangeTo_Short()
115 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Short()
143 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Int() local
144 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int()
[all …]
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/
DUT_alloc_copyPadded.java84 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_1D() local
85 int width = random.nextInt(512); in testAllocation_Byte3_1D()
90 random.nextBytes(inArray); in testAllocation_Byte3_1D()
115 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_2D() local
116 int width = random.nextInt(128); in testAllocation_Byte3_2D()
117 int height = random.nextInt(128); in testAllocation_Byte3_2D()
122 random.nextBytes(inArray); in testAllocation_Byte3_2D()
147 Random random = new Random(0x172d8ab9); in testAllocation_Byte3_3D() local
148 int w = random.nextInt(32); in testAllocation_Byte3_3D()
149 int h = random.nextInt(32); in testAllocation_Byte3_3D()
[all …]
DUT_alloc_copy.java60 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Byte() local
61 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte()
66 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte()
71 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Byte()
99 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Short() local
100 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short()
107 inArray[i] = (short)random.nextInt(); in allocation_copy1DRangeTo_Short()
113 int offset = random.nextInt(arr_len); in allocation_copy1DRangeTo_Short()
141 Random random = new Random(0x172d8ab9); in allocation_copy1DRangeTo_Int() local
142 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int()
[all …]
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DTextUtils.java40 private static String randomWord(Random random, int length) { in randomWord() argument
44 int base = random.nextInt(2) == 0 ? 'A' : 'a'; in randomWord()
45 result += (char)(random.nextInt(26) + base); in randomWord()
53 private static String randomWordFromStringSet(Random random, int length, String[] stringSet) { in randomWordFromStringSet() argument
57 sb.append(stringSet[random.nextInt(setLength)]); in randomWordFromStringSet()
80 Random random = new Random(0); in buildSimpleStringList() local
82 strings[i] = randomWord(random, stringLength); in buildSimpleStringList()
89 final Random random = new Random(0); in buildStringListFromUnicodeSet() local
92 strings[i] = randomWordFromStringSet(random, stringLength, stringSet); in buildStringListFromUnicodeSet()
108 final Random random = new Random(0); in buildLongStringList() local
[all …]
/frameworks/base/core/tests/coretests/src/android/database/
DNewDatabasePerformanceTests.java181 Random random = new Random(42); in prepareForTest() local
184 int r = random.nextInt(100000); in prepareForTest()
209 Random random = new Random(42); in prepareForTest() local
212 int r = random.nextInt(100000); in prepareForTest()
238 Random random = new Random(42); in prepareForTest() local
244 int r = random.nextInt(100000); in prepareForTest()
274 Random random = new Random(42); in prepareForTest() local
280 int r = random.nextInt(100000); in prepareForTest()
309 Random random = new Random(42); in prepareForTest() local
315 int r = random.nextInt(100000); in prepareForTest()
[all …]
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/
DUtils.java29 public static String getRandomWord(Random random, int length) { in getRandomWord() argument
32 char base = random.nextBoolean() ? 'A' : 'a'; in getRandomWord()
33 char nextChar = (char)(random.nextInt(26) + base); in getRandomWord()
40 Random random = new Random(0); in buildStringList() local
43 result[i] = getRandomWord(random, RANDOM_WORD_LENGTH); in buildStringList()
71 Random random = new Random(0); in buildParagraphListWithHitPercentage() local
78 if (random.nextInt(100) < hitPercentage) { in buildParagraphListWithHitPercentage()
80 result.append(CACHE_HIT_STRINGS[random.nextInt(CACHE_HIT_STRINGS.length)]); in buildParagraphListWithHitPercentage()
84 length += random.nextInt(PARAGRAPH_MISS_MAX_LENGTH - PARAGRAPH_MISS_MIN_LENGTH); in buildParagraphListWithHitPercentage()
86 result.append(getRandomWord(random, length)); in buildParagraphListWithHitPercentage()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/
DLocationUtils.java36 public static Location createLocation(String provider, Random random) { in createLocation() argument
38 MIN_LATITUDE + random.nextDouble() * (MAX_LATITUDE - MIN_LATITUDE), in createLocation()
39 MIN_LONGITUDE + random.nextDouble() * (MAX_LONGITUDE - MIN_LONGITUDE), in createLocation()
40 MIN_ACCURACY + random.nextFloat() * (MAX_ACCURACY - MIN_ACCURACY)); in createLocation()
43 public static LocationResult createLocationResult(String provider, Random random) { in createLocationResult() argument
44 return LocationResult.wrap(createLocation(provider, random)); in createLocationResult()
47 public static LocationResult createLocationResult(String provider, Random random, in createLocationResult() argument
51 locations[i] = createLocation(provider, random); in createLocationResult()
/frameworks/base/startop/apps/test/src/
DInitCheckOverheadBenchmarks.java35 Random random = new Random();
36 mStep = random.nextInt();
37 mStep2 = random.nextInt();
38 mStartingValue = random.nextInt();
46 Random random = new Random();
47 mStep = random.nextInt();
48 mStep2 = random.nextInt();
49 mStartingValue = random.nextInt();
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DGlyphCacheActivity.java56 textview.setTextSize(6 + (int) (Math.random() * 5) * 10); in createTextView()
57 textview.setTextColor(0xff << 24 | (int) (Math.random() * 255) << 16 | in createTextView()
58 (int) (Math.random() * 255) << 8 | (int) (Math.random() * 255) << 16); in createTextView()
61 int numChars = 5 + (int) (Math.random() * 10); in createTextView()
71 sb.append(mCharacterSet.charAt((int)(Math.random() * mCharacterSet.length()))); in createString()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DTextViewOnMeasurePerfTest.java81 final Random random = new Random(0);
84 FAMILIES[random.nextInt(FAMILIES.length)],
85 STYLES[random.nextInt(STYLES.length)],
86 24 + random.nextInt(32), // text size. minimum 24
87 COLORS[random.nextInt(COLORS.length)],
88 COLORS[random.nextInt(COLORS.length)]);
89 int spanLength = 1 + random.nextInt(9); // Up to 9 span length.
/frameworks/base/core/tests/coretests/src/android/content/pm/
DVerifierDeviceIdentityTest.java157 MockRandom random = new MockRandom(); in testVerifierDeviceIdentity_Generate_MinValue() local
158 random.setNextLong(Long.MIN_VALUE); in testVerifierDeviceIdentity_Generate_MinValue()
159 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random); in testVerifierDeviceIdentity_Generate_MinValue()
168 MockRandom random = new MockRandom(); in testVerifierDeviceIdentity_Generate_Random() local
169 random.setNextLong(TEST_1); in testVerifierDeviceIdentity_Generate_Random()
170 VerifierDeviceIdentity id2 = VerifierDeviceIdentity.generate(random); in testVerifierDeviceIdentity_Generate_Random()
/frameworks/base/core/java/android/privacy/internal/rappor/
DRapporEncoder.java67 final Random random; in RapporEncoder() local
70 random = sSecureRandom; in RapporEncoder()
73 random = new Random(getInsecureSeed(config.mEncoderId)); in RapporEncoder()
76 mEncoder = new Encoder(random, null, null, in RapporEncoder()
/frameworks/base/apct-tests/perftests/core/src/android/text/
DNonEditableTextGenerator.java25 public NonEditableTextGenerator(Random random) { in NonEditableTextGenerator() argument
26 mRandom = random; in NonEditableTextGenerator()
105 public RandomCharSequenceGenerator(Random random) { in RandomCharSequenceGenerator() argument
106 mRandom = random; in RandomCharSequenceGenerator()
DVariableFontPerfTest.java103 final Random random = new Random(0); in testDraw_SetDifferentVariationEachDraw() local
107 int weight = random.nextInt(1000); in testDraw_SetDifferentVariationEachDraw()
123 final Random random = new Random(0); in testSetFontVariationSettings() local
126 int weight = random.nextInt(1000); in testSetFontVariationSettings()
/frameworks/base/keystore/java/android/security/keystore2/
DAndroidKeyStoreCipherSpiBase.java122 protected final void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
137 mCipher.init(opmode, key, spec, random); in engineInit()
142 mCipher.init(opmode, key, spec, random); in engineInit()
148 mCipher.init(opmode, key, spec, random); in engineInit()
154 mCipher.init(opmode, key, spec, random); in engineInit()
156 mCipher.init(opmode, key, random); in engineInit()
168 init(opmode, key, random); in engineInit()
185 SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
193 mCipher.init(opmode, key, params, random); in engineInit()
202 init(opmode, key, random); in engineInit()
[all …]
DAndroidKeyStoreKeyGeneratorSpi.java61 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
63 super.engineInit(params, random); in engineInit()
154 protected void engineInit(SecureRandom random) { in engineInit() argument
160 protected void engineInit(int keySize, SecureRandom random) { in engineInit() argument
166 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
181 mRng = random; in engineInit()
/frameworks/compile/mclinker/lib/Support/Windows/
DSystem.inc39 /// random - generate a random number.
44 /// srandom - set the initial seed value for future calls to random().
/frameworks/compile/mclinker/lib/Support/Unix/
DSystem.inc69 /// random - generate a random number.
71 return ::random();
74 /// srandom - set the initial seed value for future calls to random().
/frameworks/base/core/tests/coretests/src/android/app/usage/
DEventListTest.java68 final Random random = new Random(128); in testInsertsSortedRandom() local
71 listUnderTest.insert(getUsageEvent(random.nextLong())); in testInsertsSortedRandom()
78 final Random random = new Random(256); in testInsertsSortedWithDuplicates() local
81 final long randomTimeStamp = random.nextLong(); in testInsertsSortedWithDuplicates()
/frameworks/base/core/tests/coretests/src/android/graphics/
DTypefaceTest.java159 final Random random = new Random(); in testMultithreadCacheStressTest()
161 final Typeface base = baseTypefaces[random.nextInt(baseTypefaces.length)]; in testMultithreadCacheStressTest()
162 if (random.nextBoolean()) { in testMultithreadCacheStressTest()
163 final int style = random.nextInt(3); in testMultithreadCacheStressTest()
167 final int weight = 100 * (random.nextInt(10) + 1); // [100, 1000] in testMultithreadCacheStressTest()
168 final boolean italic = random.nextBoolean(); in testMultithreadCacheStressTest()
/frameworks/av/services/camera/libcameraservice/tests/
DDistortionMapperComp.py19 np.random.seed(1234)
23 rawCoords = np.floor(np.random.rand(1000,2) * activeArray)
/frameworks/base/core/java/com/android/internal/ml/clustering/
DKMeans.java44 public KMeans(Random random) { in KMeans() argument
45 this(random, 30 /* maxIterations */, 0.005f /* convergenceEpsilon */); in KMeans()
47 public KMeans(Random random, int maxIterations, float convergenceEpsilon) { in KMeans() argument
48 mRandomState = random; in KMeans()

1234