Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 91) sorted by relevance

1234

/packages/modules/NeuralNetworks/common/random/
Dphilox_random.h135 PhiloxRandom(ResultType counter, Key key) : counter_(counter), key_(key) {} in PhiloxRandom() argument
159 ResultType counter = counter_; in operator() local
164 counter = ComputeSingleRound(counter, key); in operator()
166 counter = ComputeSingleRound(counter, key); in operator()
168 counter = ComputeSingleRound(counter, key); in operator()
170 counter = ComputeSingleRound(counter, key); in operator()
172 counter = ComputeSingleRound(counter, key); in operator()
174 counter = ComputeSingleRound(counter, key); in operator()
176 counter = ComputeSingleRound(counter, key); in operator()
178 counter = ComputeSingleRound(counter, key); in operator()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DIntCounterTest.java45 IntCounter counter = new IntCounter(); in testEmpty() local
46 assertKeyCountsEqual(new Int32Count[0], counter.toProto()); in testEmpty()
54 IntCounter counter = new IntCounter(); in testAddToCounter() local
57 counter.increment(k); in testAddToCounter()
71 assertKeyCountsEqual(expected, counter.toProto()); in testAddToCounter()
79 IntCounter counter = new IntCounter(-5, 100); in testAddToClampedCounter() local
82 counter.increment(k); in testAddToClampedCounter()
91 assertKeyCountsEqual(expected, counter.toProto()); in testAddToClampedCounter()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/util/
DThreadPool.java230 private boolean acquireResource(ResourceCounter counter) { in acquireResource() argument
237 mWaitOnResource = counter; in acquireResource()
240 synchronized (counter) { in acquireResource()
241 if (counter.value > 0) { in acquireResource()
242 counter.value--; in acquireResource()
246 counter.wait(); in acquireResource()
261 private void releaseResource(ResourceCounter counter) { in releaseResource() argument
262 synchronized (counter) { in releaseResource()
263 counter.value++; in releaseResource()
264 counter.notifyAll(); in releaseResource()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DHelpersTest.java605 long counter = 0; in prepareData() local
613 cursor.addRow(new Object[]{++counter, uid, destination, file.getPath()}); in prepareData()
615 idsToOrphan.add(counter); in prepareData()
617 validEntries.put(counter, "com.example" + uid); in prepareData()
623 cursor.addRow(new Object[]{++counter, uid, destination, file1.getPath()}); in prepareData()
625 idsToOrphan.add(counter); in prepareData()
627 validEntries.put(counter, "com.example" + uid); in prepareData()
631 cursor.addRow(new Object[]{++counter, uid, destination, file2.getPath()}); in prepareData()
633 idsToRemove.add(counter); in prepareData()
635 validEntries.put(counter, "com.example" + uid); in prepareData()
[all …]
/packages/services/Car/service/src/com/android/car/stats/
DVmsClientLogger.java89 AtomicLong counter; in logConnectionState() local
91 counter = mConnectionStateCounters.computeIfAbsent(connectionState, in logConnectionState()
94 counter.incrementAndGet(); in logConnectionState()
98 AtomicLong counter; in getConnectionStateCount() local
100 counter = mConnectionStateCounters.get(connectionState); in getConnectionStateCount()
102 return counter == null ? 0L : counter.get(); in getConnectionStateCount()
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Drepeating_alarm_unittest.cc52 int counter = 0; in VerifyMultipleDelayedTasks() local
57 common::Unretained(&counter), in VerifyMultipleDelayedTasks()
70 int* counter, in verify_delayed_tasks() argument
76 *counter = *counter + 1; in verify_delayed_tasks()
77 if (*counter == scheduled_tasks) { in verify_delayed_tasks()
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/common/bluetooth/fastpair/
DAesCtrMultipleBlockEncryption.java127 byte[] counter = createIv(nonce); in doAesCtr()
139 counter[0] = (byte) (i & 0xFF); in doAesCtr()
140 byte[] aesOfCounter = doAesSingleBlock(secret, counter); in doAesCtr()
152 private static byte[] doAesSingleBlock(byte[] secret, byte[] counter) in doAesSingleBlock() argument
154 return AesEcbSingleBlockEncryption.encrypt(secret, counter); in doAesSingleBlock()
/packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/
DE2ePerformanceTest.java208 CountDownLatch counter = new CountDownLatch(EXPECTED_INVOCATIONS); in stressTestHvacProperties() local
211 new Thread(() -> invokeSetAndGetForHvacFloat(mgr, cfg, cfg.getAreaIds()[0], counter)), in stressTestHvacProperties()
212 new Thread(() -> invokeSetAndGetForHvacFloat(mgr, cfg, cfg.getAreaIds()[1], counter)))); in stressTestHvacProperties()
218 counter.await(EXPECTED_DURATION_MS, TimeUnit.MILLISECONDS); in stressTestHvacProperties()
219 long missingInvocations = counter.getCount(); in stressTestHvacProperties()
229 CarPropertyConfig<Float> cfg, int areaId, CountDownLatch counter) { in invokeSetAndGetForHvacFloat() argument
234 while (counter.getCount() > 0) { in invokeSetAndGetForHvacFloat()
244 counter.countDown(); in invokeSetAndGetForHvacFloat()
/packages/modules/Bluetooth/system/stack/a2dp/
Da2dp_vendor_opus_encoder.cc51 float counter; member
311 a2dp_opus_encoder_cb.opus_feeding_state.counter = 0.0f; in a2dp_vendor_opus_feeding_flush()
328 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_vendor_opus_send_frames() local
358 a2dp_opus_encoder_cb.opus_feeding_state.counter += in a2dp_opus_get_num_frame_iteration()
363 a2dp_opus_encoder_cb.opus_feeding_state.counter / pcm_bytes_per_frame; in a2dp_opus_get_num_frame_iteration()
364 a2dp_opus_encoder_cb.opus_feeding_state.counter -= in a2dp_opus_get_num_frame_iteration()
427 a2dp_opus_encoder_cb.opus_feeding_state.counter += in a2dp_opus_encode_frames()
Da2dp_vendor_ldac_encoder.cc67 float counter; member
356 a2dp_ldac_encoder_cb.ldac_feeding_state.counter = 0.0f; in a2dp_vendor_ldac_feeding_flush()
376 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_vendor_ldac_send_frames() local
418 a2dp_ldac_encoder_cb.ldac_feeding_state.counter += in a2dp_ldac_get_num_frame_iteration()
423 a2dp_ldac_encoder_cb.ldac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_ldac_get_num_frame_iteration()
424 a2dp_ldac_encoder_cb.ldac_feeding_state.counter -= in a2dp_ldac_get_num_frame_iteration()
508 a2dp_ldac_encoder_cb.ldac_feeding_state.counter += in a2dp_ldac_encode_frames()
Da2dp_aac_encoder.cc58 float counter; member
474 a2dp_aac_encoder_cb.aac_feeding_state.counter = 0.0f; in a2dp_aac_feeding_flush()
494 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_aac_send_frames() local
523 a2dp_aac_encoder_cb.aac_feeding_state.counter += in a2dp_aac_get_num_frame_iteration()
527 result = a2dp_aac_encoder_cb.aac_feeding_state.counter / pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
528 a2dp_aac_encoder_cb.aac_feeding_state.counter -= result * pcm_bytes_per_frame; in a2dp_aac_get_num_frame_iteration()
627 a2dp_aac_encoder_cb.aac_feeding_state.counter += in a2dp_aac_encode_frames()
Da2dp_sbc_encoder.cc74 float counter; member
363 a2dp_sbc_encoder_cb.feeding_state.counter = 0.0f; in a2dp_sbc_feeding_flush()
384 for (uint8_t counter = 0; counter < nb_iterations; counter++) { in a2dp_sbc_send_frames() local
413 a2dp_sbc_encoder_cb.feeding_state.counter += in a2dp_sbc_get_num_frame_iteration()
419 a2dp_sbc_encoder_cb.feeding_state.counter / (float)pcm_bytes_per_frame; in a2dp_sbc_get_num_frame_iteration()
455 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
477 a2dp_sbc_encoder_cb.feeding_state.counter = in a2dp_sbc_get_num_frame_iteration()
482 a2dp_sbc_encoder_cb.feeding_state.counter -= in a2dp_sbc_get_num_frame_iteration()
531 a2dp_sbc_encoder_cb.feeding_state.counter += in a2dp_sbc_encode_frames()
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/enterprise/apps/
DApplicationFeatureProviderImpl.java59 final CurrentUserAndManagedProfilePolicyInstalledAppCounter counter = in calculateNumberOfPolicyInstalledApps() local
62 counter.execute(); in calculateNumberOfPolicyInstalledApps()
64 counter.executeInForeground(); in calculateNumberOfPolicyInstalledApps()
78 final CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter counter = in calculateNumberOfAppsWithAdminGrantedPermissions() local
82 counter.execute(); in calculateNumberOfAppsWithAdminGrantedPermissions()
84 counter.executeInForeground(); in calculateNumberOfAppsWithAdminGrantedPermissions()
/packages/modules/StatsD/statsd/src/metrics/
DCountMetricProducer.cpp239 for (const auto& counter : mPastBuckets) { in onDumpReportLocked() local
240 const MetricDimensionKey& dimensionKey = counter.first; in onDumpReportLocked()
264 for (const auto& bucket : counter.second) { in onDumpReportLocked()
411 for (const auto& counter : *mCurrentSlicedCounter) { in flushCurrentBucketLocked()
412 if (countPassesThreshold(counter.second)) { in flushCurrentBucketLocked()
413 info.mCount = counter.second; in flushCurrentBucketLocked()
414 auto& bucketList = mPastBuckets[counter.first]; in flushCurrentBucketLocked()
417 counter.first.toString().c_str(), (long long)counter.second); in flushCurrentBucketLocked()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/bluetoothKeystore/
DBluetoothKeystoreService.java547 int counter = 0; in readHashFile() local
548 while (!successful && counter < TRY_MAX) { in readHashFile()
566 infoLog("Fail to open file, try again. counter: " + counter); in readHashFile()
568 counter++; in readHashFile()
571 if (counter > 3) { in readHashFile()
663 int counter = 0; in tryCompute() local
670 while (targetData == null && counter < TRY_MAX) { in tryCompute()
676 counter++; in tryCompute()
781 int counter = 0; in getKeyStore() local
783 while ((counter <= TRY_MAX) && (keyStore == null)) { in getKeyStore()
[all …]
/packages/apps/Contacts/src/com/android/contacts/vcard/
DNfcImportVCardActivity.java105 VCardEntryCounter counter = null; in createImportRequest() local
113 counter = new VCardEntryCounter(); in createImportRequest()
115 parser.addInterpreter(counter); in createImportRequest()
123 counter = new VCardEntryCounter(); in createImportRequest()
125 parser.addInterpreter(counter); in createImportRequest()
155 detector.getEstimatedCharset(), vcardVersion, counter.getCount()); in createImportRequest()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/
DCachedSupplierTest.java33 final AtomicInteger counter = new AtomicInteger(); in testSimple() local
37 return counter.incrementAndGet(); in testSimple()
48 assertEquals(1, counter.get()); in testSimple()
/packages/apps/Settings/src/com/android/settings/applications/
DApplicationFeatureProviderImpl.java73 final CurrentUserAndManagedProfilePolicyInstalledAppCounter counter = in calculateNumberOfPolicyInstalledApps() local
76 counter.execute(); in calculateNumberOfPolicyInstalledApps()
78 counter.executeInForeground(); in calculateNumberOfPolicyInstalledApps()
92 final CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter counter = in calculateNumberOfAppsWithAdminGrantedPermissions() local
96 counter.execute(); in calculateNumberOfAppsWithAdminGrantedPermissions()
98 counter.executeInForeground(); in calculateNumberOfAppsWithAdminGrantedPermissions()
/packages/apps/Car/Settings/src/com/android/car/settingslib/applications/
DApplicationFeatureProviderImpl.java77 final CurrentUserAndManagedProfilePolicyInstalledAppCounter counter = in calculateNumberOfPolicyInstalledApps() local
80 counter.execute(); in calculateNumberOfPolicyInstalledApps()
82 counter.executeInForeground(); in calculateNumberOfPolicyInstalledApps()
96 final CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter counter = in calculateNumberOfAppsWithAdminGrantedPermissions() local
100 counter.execute(); in calculateNumberOfAppsWithAdminGrantedPermissions()
102 counter.executeInForeground(); in calculateNumberOfAppsWithAdminGrantedPermissions()
/packages/modules/Connectivity/bpf_progs/
Doffload.c78 #define COUNT_AND_RETURN(counter, ret) do { \ in DEFINE_BPF_MAP_GRW() argument
79 uint32_t code = BPF_TETHER_ERR_ ## counter; \ in DEFINE_BPF_MAP_GRW()
85 #define TC_DROP(counter) COUNT_AND_RETURN(counter, TC_ACT_SHOT) argument
86 #define TC_PUNT(counter) COUNT_AND_RETURN(counter, TC_ACT_PIPE) argument
88 #define XDP_DROP(counter) COUNT_AND_RETURN(counter, XDP_DROP) argument
89 #define XDP_PUNT(counter) COUNT_AND_RETURN(counter, XDP_PASS) argument
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DPickerDbFacade.java361 int counter = 0; in executeInternal() local
369 counter++; in executeInternal()
386 counter++; in executeInternal()
389 return counter; in executeInternal()
448 int counter = 0; in executeInternal() local
461 counter++; in executeInternal()
467 return counter; in executeInternal()
526 int counter = qb.delete(database, /* selection */ null, /* selectionArgs */ null); in executeInternal() local
536 return counter; in executeInternal()
1131 int counter = 0; in executeInternal() local
[all …]
/packages/modules/ExtServices/java/src/android/ext/services/notification/
DEntityTypeCounter.java64 EntityTypeCounter counter = new EntityTypeCounter(); in fromTextLinks() local
70 counter.increment(entityType); in fromTextLinks()
72 return counter; in fromTextLinks()
/packages/modules/Bluetooth/system/stack/gatt/
Dgatt_cl.cc174 if (!p_clcb->counter) { in gatt_act_read()
326 p_rsp_value->len != p_clcb->counter || in gatt_check_write_long_terminate()
374 p_clcb->counter = to_send; in gatt_send_prepare_write()
903 p_clcb->counter = len - 2; in gatt_process_read_by_type_rsp()
905 if (p_clcb->counter == (payload_size - 4)) { in gatt_process_read_by_type_rsp()
909 if (p_clcb->counter <= GATT_MAX_ATTR_LEN) { in gatt_process_read_by_type_rsp()
910 memcpy(p_clcb->p_attr_buf, p, p_clcb->counter); in gatt_process_read_by_type_rsp()
911 gatt_act_read(p_clcb, p_clcb->counter); in gatt_process_read_by_type_rsp()
995 uint16_t offset = p_clcb->counter; in gatt_process_read_rsp()
1002 p_clcb->counter = len; in gatt_process_read_rsp()
[all …]
/packages/modules/Bluetooth/system/osi/test/
Dsemaphore_test.cc18 int counter; member
28 ++helper->counter; in sleep_then_increment_counter()
85 EXPECT_EQ(sequence_helper.counter, 1) in TEST_F()
/packages/services/Car/service/src/com/android/car/bluetooth/
DBluetoothConnectionRetryManager.java191 RetryTokenAndCounter counter = mBondedYetToConnect.get(device.getAddress()) in handleProfileConnectionStateChange() local
193 if ((counter.getCount() < MAX_RETRY_ATTEMPTS) in handleProfileConnectionStateChange()
199 int countForLogs = counter.increment(); in handleProfileConnectionStateChange()
207 }, /* token */ counter, sRetryFirstConnectTimeoutMs); in handleProfileConnectionStateChange()
210 /* token */ counter)); in handleProfileConnectionStateChange()

1234