/aosp12/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/ |
H A D | UT_alloc_copyPadded.java | 89 random.nextBytes(inArray); in testAllocation_Byte3_1D() 121 random.nextBytes(inArray); in testAllocation_Byte3_2D() 147 int w = random.nextInt(32); in testAllocation_Byte3_3D() 148 int h = random.nextInt(32); in testAllocation_Byte3_3D() 149 int d = random.nextInt(32); in testAllocation_Byte3_3D() 154 random.nextBytes(inArray); in testAllocation_Byte3_3D() 249 int w = random.nextInt(32); in testAllocation_Short3_3D() 250 int h = random.nextInt(32); in testAllocation_Short3_3D() 251 int d = random.nextInt(32); in testAllocation_Short3_3D() 354 int w = random.nextInt(32); in testAllocation_Int3_3D() [all …]
|
H A D | UT_alloc_copy.java | 59 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte() 64 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte() 98 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short() 140 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int() 182 int width = random.nextInt(512); in allocation_copy1DRangeTo_Float() 224 int width = random.nextInt(512); in allocation_copy1DRangeTo_Long() 266 int width = random.nextInt(128); in allocation_copy2DRangeTo_Byte() 276 random.nextBytes(inArray); in allocation_copy2DRangeTo_Byte() 301 int width = random.nextInt(128); in allocation_copy2DRangeTo_Short() 339 int width = random.nextInt(128); in allocation_copy2DRangeTo_Int() [all …]
|
/aosp12/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/ |
H A D | UT_alloc_copyPadded.java | 90 random.nextBytes(inArray); in testAllocation_Byte3_1D() 122 random.nextBytes(inArray); in testAllocation_Byte3_2D() 148 int w = random.nextInt(32); in testAllocation_Byte3_3D() 149 int h = random.nextInt(32); in testAllocation_Byte3_3D() 150 int d = random.nextInt(32); in testAllocation_Byte3_3D() 155 random.nextBytes(inArray); in testAllocation_Byte3_3D() 250 int w = random.nextInt(32); in testAllocation_Short3_3D() 251 int h = random.nextInt(32); in testAllocation_Short3_3D() 252 int d = random.nextInt(32); in testAllocation_Short3_3D() 355 int w = random.nextInt(32); in testAllocation_Int3_3D() [all …]
|
H A D | UT_alloc_copy.java | 61 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte() 66 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte() 100 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short() 142 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int() 184 int width = random.nextInt(512); in allocation_copy1DRangeTo_Float() 226 int width = random.nextInt(512); in allocation_copy1DRangeTo_Long() 268 int width = random.nextInt(128); in allocation_copy2DRangeTo_Byte() 278 random.nextBytes(inArray); in allocation_copy2DRangeTo_Byte() 303 int width = random.nextInt(128); in allocation_copy2DRangeTo_Short() 341 int width = random.nextInt(128); in allocation_copy2DRangeTo_Int() [all …]
|
/aosp12/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/ |
H A D | UT_alloc_copyPadded.java | 92 random.nextBytes(inArray); in testAllocation_Byte3_1D() 124 random.nextBytes(inArray); in testAllocation_Byte3_2D() 150 int w = random.nextInt(32); in testAllocation_Byte3_3D() 151 int h = random.nextInt(32); in testAllocation_Byte3_3D() 152 int d = random.nextInt(32); in testAllocation_Byte3_3D() 157 random.nextBytes(inArray); in testAllocation_Byte3_3D() 252 int w = random.nextInt(32); in testAllocation_Short3_3D() 253 int h = random.nextInt(32); in testAllocation_Short3_3D() 254 int d = random.nextInt(32); in testAllocation_Short3_3D() 357 int w = random.nextInt(32); in testAllocation_Int3_3D() [all …]
|
H A D | UT_alloc_copy.java | 63 int width = random.nextInt(512); in allocation_copy1DRangeTo_Byte() 68 random.nextBytes(inArray); in allocation_copy1DRangeTo_Byte() 102 int width = random.nextInt(512); in allocation_copy1DRangeTo_Short() 144 int width = random.nextInt(512); in allocation_copy1DRangeTo_Int() 186 int width = random.nextInt(512); in allocation_copy1DRangeTo_Float() 228 int width = random.nextInt(512); in allocation_copy1DRangeTo_Long() 270 int width = random.nextInt(128); in allocation_copy2DRangeTo_Byte() 280 random.nextBytes(inArray); in allocation_copy2DRangeTo_Byte() 305 int width = random.nextInt(128); in allocation_copy2DRangeTo_Short() 343 int width = random.nextInt(128); in allocation_copy2DRangeTo_Int() [all …]
|
/aosp12/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
H A D | CodePointUtils.java | 72 @Nonnull final Random random) { in generateCodePointSet() argument 75 final int r = Math.abs(random.nextInt()); in generateCodePointSet() 98 public static String generateWord(@Nonnull final Random random, in generateWord() argument 104 final int count = 1 + (Math.abs(random.nextInt()) % 5) in generateWord() 105 + (Math.abs(random.nextInt()) % 5) in generateWord() 106 + (Math.abs(random.nextInt()) % 5) in generateWord() 107 + (Math.abs(random.nextInt()) % 5) in generateWord() 108 + (Math.abs(random.nextInt()) % 5) in generateWord() 109 + (Math.abs(random.nextInt()) % 5) in generateWord() 110 + (Math.abs(random.nextInt()) % 5) in generateWord() [all …]
|
/aosp12/frameworks/base/tests/UiBench/src/com/android/test/uibench/ |
H A D | TextUtils.java | 44 int base = random.nextInt(2) == 0 ? 'A' : 'a'; in randomWord() 45 result += (char)(random.nextInt(26) + base); in randomWord() 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 108 final Random random = new Random(0); in buildLongStringList() local 115 sb.append(randomWord(random, stringLength)); in buildLongStringList() 144 Random random = new Random(0); in buildParagraphListWithHitPercentage() local 151 if (random.nextInt(100) < hitPercentage) { in buildParagraphListWithHitPercentage() [all …]
|
/aosp12/frameworks/base/core/tests/coretests/src/android/database/ |
H A D | NewDatabasePerformanceTests.java | 181 Random random = new Random(42); in prepareForTest() local 209 Random random = new Random(42); in prepareForTest() local 238 Random random = new Random(42); in prepareForTest() local 274 Random random = new Random(42); in prepareForTest() local 309 Random random = new Random(42); in prepareForTest() local 343 Random random = new Random(42); in prepareForTest() local 378 Random random = new Random(42); in prepareForTest() local 414 Random random = new Random(42); in prepareForTest() local 453 Random random = new Random(42); in prepareForTest() local 499 Random random = new Random(42); in prepareForTest() local [all …]
|
/aosp12/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
H A D | LatinImeStressTests.java | 32 final Random random = new Random(seed); in testSwitchLanguagesAndInputLatinRandomCodePoints() local 35 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], in testSwitchLanguagesAndInputLatinRandomCodePoints() 37 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); in testSwitchLanguagesAndInputLatinRandomCodePoints() 39 final String word = CodePointUtils.generateWord(random, codePointSet); in testSwitchLanguagesAndInputLatinRandomCodePoints() 49 final Random random = new Random(seed); in testSwitchLanguagesAndInputRandomCodePoints() local 51 final int[] codePointSet = CodePointUtils.generateCodePointSet(codePointSetSize, random); in testSwitchLanguagesAndInputRandomCodePoints() 53 changeLanguageWithoutWait(locales[random.nextInt(locales.length)], in testSwitchLanguagesAndInputRandomCodePoints() 55 final int wordCount = random.nextInt(maxWordCountToTypeInEachIteration); in testSwitchLanguagesAndInputRandomCodePoints() 57 final String word = CodePointUtils.generateWord(random, codePointSet); in testSwitchLanguagesAndInputRandomCodePoints()
|
H A D | BinaryDictionaryTests.java | 263 final Random random = new Random(seed); in testRandomlyAddUnigramWord() local 267 probabilityMap.put(word, random.nextInt(0xFF)); in testRandomlyAddUnigramWord() 337 final Random random = new Random(seed); in testRandomlyAddBigramWords() local 477 final Random random = new Random(seed); in testAddBigramWordsAndFlashWithGC() local 540 final Random random = new Random(seed); in testRandomOperationsAndFlashWithGC() local 564 if (random.nextFloat() < addUnigramProb) { in testRandomOperationsAndFlashWithGC() 625 final Random random = new Random(seed); in testAddManyUnigramsAndFlushWithGC() local 668 final Random random = new Random(seed); in testUnigramAndBigramCount() local 715 final Random random = new Random(seed); in testGetWordProperties() local 735 final boolean isNotAWord = random.nextBoolean(); in testGetWordProperties() [all …]
|
/aosp12/packages/modules/NeuralNetworks/common/random/ |
H A D | guarded_philox_random.cc | 25 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()
|
H A D | guarded_philox_random.h | 51 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_);
|
/aosp12/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/ |
H A D | Utils.java | 29 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()
|
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/ |
H A D | LocationUtils.java | 36 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()
|
/aosp12/frameworks/base/startop/apps/test/src/ |
H A D | InitCheckOverheadBenchmarks.java | 35 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();
|
/aosp12/packages/modules/StatsD/lib/libkll/tests/ |
H A D | compactor_stack_test.cpp | 157 MTRandomGenerator random(10); in TEST_F() local 158 CompactorStack compactor_stack(10, 10, &random); in TEST_F() 193 MTRandomGenerator random(rd()); in TEST_P() local 194 CompactorStack compactor_stack(params.inv_eps, params.inv_delta, &random); in TEST_P() 196 int upbound = (random.UnbiasedUniform(3) + 1) * params.num_items + 1; in TEST_P() 227 MTRandomGenerator random = MTRandomGenerator(seed); in TEST_P() local 228 CompactorStack compactor_stack(params.inv_eps, params.inv_delta, &random); in TEST_P() 279 MTRandomGenerator random = MTRandomGenerator(seed); in TEST_P() local 280 CompactorStack compactor_stack(params.inv_eps, params.inv_delta, &random); in TEST_P() 292 MTRandomGenerator random = MTRandomGenerator(seed); in TEST_P() local [all …]
|
/aosp12/system/bt/gd/security/ |
H A D | pairing_handler_le_secure_connections.cc | 257 auto random = WaitPairingRandom(); in SecureConnectionsOutOfBand() local 259 return std::get<PairingFailure>(random); in SecureConnectionsOutOfBand() 268 auto random = WaitPairingRandom(); in SecureConnectionsOutOfBand() local 270 return std::get<PairingFailure>(random); in SecureConnectionsOutOfBand() 343 auto random = WaitPairingRandom(); in SecureConnectionsPasskeyEntry() local 345 return std::get<PairingFailure>(random); in SecureConnectionsPasskeyEntry() 372 auto random = WaitPairingRandom(); in SecureConnectionsPasskeyEntry() local 449 auto random = WaitPairingRandom(); in SecureConnectionsJustWorks() local 451 return std::get<PairingFailure>(random); in SecureConnectionsJustWorks() 473 auto random = WaitPairingRandom(); in SecureConnectionsJustWorks() local [all …]
|
/aosp12/packages/providers/MediaProvider/tests/src/com/android/providers/media/ |
H A D | TranscodeHelperTest.java | 104 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeForMediaProvider() local 107 int randomAppUid = random.nextInt( in testDoesNotTranscodeForMediaProvider() 116 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeForSystemProcesses() local 117 int randomSystemProcessUid = random.nextInt(Process.FIRST_APPLICATION_UID); in testDoesNotTranscodeForSystemProcesses() 125 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeIfAppAcceptsOriginalFormat() local 128 int randomAppUid = random.nextInt( in testDoesNotTranscodeIfAppAcceptsOriginalFormat() 138 Random random = new Random(System.currentTimeMillis()); in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported() local 144 int randomAppUid = random.nextInt( in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported() 154 Random random = new Random(System.currentTimeMillis()); in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported() local 160 int randomAppUid = random.nextInt( in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported()
|
/aosp12/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/ |
H A D | FusionDictionaryTest.java | 40 final Random random = new Random(seed); in prepare() local 42 generateWords(MAX_UNIGRAMS, random); in prepare() 48 private String generateWord(final Random random) { in generateWord() argument 50 int count = random.nextInt() % 30; in generateWord() 52 final long r = Math.abs(random.nextInt()); in generateWord() 60 if (builder.length() == 1) return generateWord(random); in generateWord() 64 private void generateWords(final int number, final Random random) { in generateWords() argument 66 sWords.add(generateWord(random)); in generateWords()
|
/aosp12/packages/modules/StatsD/lib/libkll/include/ |
H A D | kll.h | 74 KllQuantile(int64_t inv_eps, int64_t inv_delta, int k, RandomGenerator* random) in KllQuantile() argument 76 owned_random_(random != nullptr ? nullptr : std::make_unique<MTRandomGenerator>()), in KllQuantile() 78 random != nullptr ? random : owned_random_.get()) { in KllQuantile() 126 void set_random(RandomGenerator* random) { in set_random() argument 127 random_ = random; in set_random() 138 RandomGenerator* random() const { in random() function
|
/aosp12/packages/apps/Gallery2/src/com/android/photos/data/ |
H A D | AlbumSetLoader.java | 39 double random = Math.random(); in createRandomRow() local 40 int id = (int) (500 * random); in createRandomRow() 44 (long) (System.currentTimeMillis() * random), in createRandomRow() 48 (random < .3 ? 1 : 0), in createRandomRow()
|
/aosp12/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | GlyphCacheActivity.java | 56 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()
|
/aosp12/system/bt/gd/hci/ |
H A D | le_address_manager.cc | 317 std::array<uint8_t, 6> random = os::GenerateRandom<6>(); in generate_nrpa() local 318 random[5] &= ~BLE_ADDR_MASK; in generate_nrpa() 319 …if ((random[0] == 0x00 && random[1] == 0x00 && random[2] == 0x00 && random[3] == 0x00 && random[4]… in generate_nrpa() 320 random[5] == 0x00) || in generate_nrpa() 321 …(random[0] == 0xFF && random[1] == 0xFF && random[2] == 0xFF && random[3] == 0xFF && random[4] == … in generate_nrpa() 322 random[5] == 0x3F)) { in generate_nrpa() 323 random[0] = (uint8_t)(os::GenerateRandom() % 0xFE + 1); in generate_nrpa() 327 address.FromOctets(random.data()); in generate_nrpa()
|
/aosp12/bionic/benchmarks/ |
H A D | property_benchmark.cpp | 58 name_lens[i] = (random() % (PROP_NAME_MAX - 10)) + 10; in LocalPropertyTestState() 72 names[i][j] = prop_name_chars[random() % prop_name_len]; in LocalPropertyTestState() 77 value_lens[i] = (random() % (PROP_VALUE_MAX - 1)) + 1; in LocalPropertyTestState() 80 values[i][j] = prop_name_chars[random() % (sizeof(prop_name_chars) - 1)]; in LocalPropertyTestState() 135 pa.system_properties().Get(pa.names[random() % nprops], value); in BM_property_get() 147 pa.system_properties().Find(pa.names[random() % nprops]); in BM_property_find() 162 pinfo[i] = pa.system_properties().Find(pa.names[random() % nprops]); in BM_property_read() 183 pinfo[i] = pa.system_properties().Find(pa.names[random() % nprops]); in BM_property_serial()
|