Home
last modified time | relevance | path

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

12345

/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/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/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/ml/nn/common/random/
Dguarded_philox_random.cc25 seed = random::New64(); in Init()
26 seed2 = random::New64(); in Init()
29 generator_ = random::PhiloxRandom(seed, seed2); in Init()
33 void GuardedPhiloxRandom::Init(random::PhiloxRandom::ResultType counter, in Init()
34 random::PhiloxRandom::Key key) { in Init()
37 generator_ = random::PhiloxRandom(counter, key); in Init()
41 random::PhiloxRandom GuardedPhiloxRandom::ReserveSamples128(int64 samples) { in ReserveSamples128()
Dexact_uniform_int.h24 namespace random {
27 UintType ExactUniformInt(const UintType n, const RandomBits& random) { in ExactUniformInt() argument
29 static_assert(std::is_same<UintType, decltype(random())>::value, in ExactUniformInt()
34 return random() * n; in ExactUniformInt()
37 return random() & (n - 1); in ExactUniformInt()
55 rnd = random(); // rnd uniform over [0, 2^{bits}) in ExactUniformInt()
Dguarded_philox_random.h51 void Init(random::PhiloxRandom::ResultType counter, random::PhiloxRandom::Key key);
56 random::PhiloxRandom ReserveSamples128(int64 samples);
59 random::PhiloxRandom ReserveSamples32(int64 samples) { in ReserveSamples32()
64 random::PhiloxRandom ReserveRandomOutputs(int64 output_count, int multiplier) { in ReserveRandomOutputs()
71 random::PhiloxRandom generator_; // GUARDED_BY(mu_);
/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/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/core/tests/coretests/src/android/graphics/
DTypefaceTest.java137 final Random random = new Random(); in testMultithreadCacheStressTest()
139 final Typeface base = baseTypefaces[random.nextInt(baseTypefaces.length)]; in testMultithreadCacheStressTest()
140 if (random.nextBoolean()) { in testMultithreadCacheStressTest()
141 final int style = random.nextInt(3); in testMultithreadCacheStressTest()
145 final int weight = 100 * (random.nextInt(10) + 1); // [100, 1000] in testMultithreadCacheStressTest()
146 final boolean italic = random.nextBoolean(); in testMultithreadCacheStressTest()
/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()
/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/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/ml/nn/runtime/test/specs/V1_2/
Dsub_v1_2.mod.py17 import random
19 random.seed(0)
47 random.shuffle(input1_values)
/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/keystore/java/android/security/keystore/
DAndroidKeyStoreKeyGeneratorSpi.java51 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
53 super.engineInit(params, random); in engineInit()
144 protected void engineInit(SecureRandom random) { in engineInit() argument
150 protected void engineInit(int keySize, SecureRandom random) { in engineInit() argument
156 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
171 mRng = random; in engineInit()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DCryptoTestUtils.java41 Random random = new Random(); in generateRandomBytes() local
42 random.nextBytes(bytes); in generateRandomBytes()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DMatrixTest.java117 public Matrix generatePermutationMatrix(int size, Random random) { in generatePermutationMatrix() argument
123 Collections.shuffle(j, random); in generatePermutationMatrix()
187 Random random = new Random(); in testCopy() local
190 m1.mem[i] = random.nextDouble(); in testCopy()

12345