Home
last modified time | relevance | path

Searched refs:pool (Results 1 – 25 of 40) sorted by relevance

12

/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/
DBitmapPoolTest.java48 private Set<Bitmap> fillPoolAndGetPoolContents(final BitmapPool pool, final int width, in fillPoolAndGetPoolContents() argument
52 final Bitmap temp = pool.createOrReuseBitmap(width, height); in fillPoolAndGetPoolContents()
57 pool.reclaimBitmap(b); in fillPoolAndGetPoolContents()
59 assertTrue(pool.isFull(width, height)); in fillPoolAndGetPoolContents()
64 final BitmapPool pool = new BitmapPool(POOL_SIZE, NAME); in testCreateAndPutBackInPoolTest() local
65 final Bitmap bitmap = pool.createOrReuseBitmap(IMAGE_DIM, IMAGE_DIM); in testCreateAndPutBackInPoolTest()
67 assertFalse(pool.isFull(IMAGE_DIM, IMAGE_DIM)); in testCreateAndPutBackInPoolTest()
68 pool.reclaimBitmap(bitmap); in testCreateAndPutBackInPoolTest()
75 final BitmapPool pool = new BitmapPool(POOL_SIZE, NAME); in testCreateBeyondFullAndCheckReuseTest() local
77 fillPoolAndGetPoolContents(pool, IMAGE_DIM, IMAGE_DIM); in testCreateBeyondFullAndCheckReuseTest()
[all …]
/packages/apps/Camera2/src/com/android/camera/processing/memory/
DLruPool.java176 final Queue<TValue> pool; in add() local
180 pool = new LinkedList<>(); in add()
181 mValuePool.put(key, pool); in add()
183 pool = mValuePool.get(key); in add()
185 pool.add(value); in add()
233 Queue<TValue> pool = mValuePool.get(key); in unsafeTrimToSize() local
234 TValue value = pool.remove(); in unsafeTrimToSize()
236 if (pool.size() <= 0) { in unsafeTrimToSize()
DSimpleLruResourcePool.java94 public SynchronizedResource(SimpleLruResourcePool<TKey, TValue> pool, in SynchronizedResource() argument
96 mPool = pool; in SynchronizedResource()
/packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
DPeriodicProvisioner.java226 AttestationPoolStatus pool = binder.getPoolStatus(expiringBy, secLevel); in generateNumKeysNeeded() local
227 int unattestedKeys = pool.total - pool.attested; in generateNumKeysNeeded()
228 int keysInUse = pool.attested - pool.unassigned; in generateNumKeysNeeded()
236 if (pool.expiring > pool.unassigned && pool.attested == totalSignedKeys) { in generateNumKeysNeeded()
244 if (pool.total != 0) { in generateNumKeysNeeded()
DBootReceiver.java94 AttestationPoolStatus pool = binder.getPoolStatus(0, implInfos[i].secLevel); in calcNumPotentialKeysToDownload() local
95 if (pool != null) { in calcNumPotentialKeysToDownload()
96 totalKeysAssigned += pool.attested - pool.unassigned; in calcNumPotentialKeysToDownload()
/packages/modules/NeuralNetworks/driver/sample/
DCanonicalPreparedModel.cpp46 auto& pool = request.pools[i]; in createRunTimePoolInfos() local
47 if (const auto* maybeMemory = std::get_if<SharedMemory>(&pool)) { in createRunTimePoolInfos()
55 } else if (const auto* maybeToken = std::get_if<Request::MemoryDomainToken>(&pool)) { in createRunTimePoolInfos()
87 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
88 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
96 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
97 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
107 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
108 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
260 const auto& pool = request.pools[poolIndex]; in executeFenced() local
[all …]
DSampleDriver.cpp389 auto& pool = request.pools[i]; in createRunTimePoolInfos() local
390 switch (pool.getDiscriminator()) { in createRunTimePoolInfos()
393 RunTimePoolInfo::createFromMemory(uncheckedConvert(pool.hidlMemory())); in createRunTimePoolInfos()
402 auto bufferWrapper = driver.getHalBufferTracker()->get(pool.token()); in createRunTimePoolInfos()
426 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
427 if (pool.getDiscriminator() == V1_3::Request::MemoryPool::hidl_discriminator::token) { in updateDeviceMemories()
435 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
436 if (pool.getDiscriminator() == V1_3::Request::MemoryPool::hidl_discriminator::token) { in updateDeviceMemories()
446 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
447 if (pool.getDiscriminator() == V1_3::Request::MemoryPool::hidl_discriminator::token) { in updateDeviceMemories()
[all …]
/packages/apps/Gallery2/src/com/android/photos/data/
DGalleryBitmapPool.java128 SparseArrayBitmapPool pool = getPoolForDimensions(width, height); in get() local
129 if (pool == null) { in get()
132 return pool.get(width, height); in get()
144 SparseArrayBitmapPool pool = getPoolForDimensions(b.getWidth(), b.getHeight()); in put() local
145 if (pool == null) { in put()
149 return pool.put(b); in put()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DContextualCardManagerTest.java144 final ControllerRendererPool pool = mManager.getControllerRendererPool(); in constructor_hasSettingsCustomCards_shouldSetUpCustomControllers() local
146 final List<Integer> actual = pool.getControllers().stream() in constructor_hasSettingsCustomCards_shouldSetUpCustomControllers()
409 final ControllerRendererPool pool = spy(mManager.mControllerRendererPool); in onWindowFocusChanged_hasFocusAndNoConditional_startMonitoringConditionCard() local
410 doReturn(pool).when(manager).getControllerRendererPool(); in onWindowFocusChanged_hasFocusAndNoConditional_startMonitoringConditionCard()
412 pool.getController(mContext, in onWindowFocusChanged_hasFocusAndNoConditional_startMonitoringConditionCard()
415 doReturn(controller).when(pool).getController(mContext, in onWindowFocusChanged_hasFocusAndNoConditional_startMonitoringConditionCard()
428 final ControllerRendererPool pool = spy(mManager.mControllerRendererPool); in onWindowFocusChanged_hasFocusAndHasConditionals_startMonitoringConditionCard() local
429 doReturn(pool).when(manager).getControllerRendererPool(); in onWindowFocusChanged_hasFocusAndHasConditionals_startMonitoringConditionCard()
431 pool.getController(mContext, in onWindowFocusChanged_hasFocusAndHasConditionals_startMonitoringConditionCard()
434 doReturn(controller).when(pool).getController(mContext, in onWindowFocusChanged_hasFocusAndHasConditionals_startMonitoringConditionCard()
[all …]
/packages/modules/NeuralNetworks/common/
DUtilsTest.cpp135 V1_3::Request::MemoryPool pool; in TEST() local
136 pool.hidlMemory(allocateSharedMemory(2 * sizeof(float))); in TEST()
137 ASSERT_TRUE(pool.hidlMemory().valid()); in TEST()
171 .pools = {std::move(pool)}, in TEST()
177 V1_3::Request::MemoryPool pool; in TEST() local
178 pool.hidlMemory(allocateSharedMemory(sizeof(float) + sizeof(int32_t))); in TEST()
179 ASSERT_TRUE(pool.hidlMemory().valid()); in TEST()
215 .pools = {std::move(pool)}, in TEST()
DLegacyHalUtils.cpp790 [version](const hardware::hidl_memory& pool) { return validatePool(pool, version); }); in compliantWith() argument
1427 return std::all_of(request.pools.begin(), request.pools.end(), [](const auto& pool) { in compliantWithV1_0() argument
1428 if (pool.getDiscriminator() != V1_3::Request::MemoryPool::hidl_discriminator::hidlMemory) { in compliantWithV1_0()
1431 const auto& name = pool.hidlMemory().name(); in compliantWithV1_0()
1437 return std::all_of(request.pools.begin(), request.pools.end(), [](const auto& pool) { in compliantWithV1_2() argument
1438 if (pool.getDiscriminator() != V1_3::Request::MemoryPool::hidl_discriminator::hidlMemory) { in compliantWithV1_2()
1441 const auto& name = pool.hidlMemory().name(); in compliantWithV1_2()
1447 static hardware::hidl_memory convertToV1_0(const V1_3::Request::MemoryPool& pool) { in convertToV1_0() argument
1448 switch (pool.getDiscriminator()) { in convertToV1_0()
1450 return pool.hidlMemory(); in convertToV1_0()
[all …]
DValidateHal.cpp523 bool validatePool(const hardware::hidl_memory& pool, HalVersion ver) { in validatePool() argument
524 const auto& name = pool.name(); in validatePool()
531 if (pool.handle() == nullptr) { in validatePool()
538 bool validatePool(const V1_3::Request::MemoryPool& pool, HalVersion ver) { in validatePool() argument
539 switch (pool.getDiscriminator()) { in validatePool()
541 return validatePool(pool.hidlMemory(), ver); in validatePool()
543 return pool.token() > 0; in validatePool()
552 [ver](const auto& pool) { return validatePool(pool, ver); }); in validatePools() argument
DExecutionBurstServer.cpp278 for (size_t pool = 0; pool < numberOfPools; ++pool) { in deserialize() local
/packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/service/
DGenerateRkpKeyService.java79 AttestationPoolStatus pool =
93 if (pool.unassigned == 0 && pool.attested != 0) {
97 int existingUnsignedKeys = pool.total - pool.attested;
/packages/modules/NeuralNetworks/driver/sample_aidl/
DSampleDriver.cpp315 const auto& pool = request.pools[i]; in createRunTimePoolInfos() local
316 if (const auto* memory = std::get_if<SharedMemory>(&pool)) { in createRunTimePoolInfos()
324 } else if (const auto* token = std::get_if<Request::MemoryDomainToken>(&pool)) { in createRunTimePoolInfos()
353 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
354 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
363 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
364 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
374 const auto& pool = request.pools[poolIndex]; in updateDeviceMemories() local
375 if (std::holds_alternative<Request::MemoryDomainToken>(pool)) { in updateDeviceMemories()
569 const auto& pool = request.pools[poolIndex]; in executeFenced() local
[all …]
/packages/apps/RemoteProvisioner/tests/unittests/src/com/android/remoteprovisioner/unittest/
DServerToSystemTest.java70 AttestationPoolStatus pool = sBinder.getPoolStatus(time.toMillis(), TRUSTED_ENVIRONMENT); in assertPoolStatus() local
71 assertEquals(total, pool.total); in assertPoolStatus()
72 assertEquals(attested, pool.attested); in assertPoolStatus()
73 assertEquals(unassigned, pool.unassigned); in assertPoolStatus()
74 assertEquals(expiring, pool.expiring); in assertPoolStatus()
/packages/modules/NeuralNetworks/shim_and_sl/
DShimConverter.cpp374 for (const auto& pool : model.pools) { in convertFromHAL() local
375 std::unique_ptr<::android::nn::sl_wrapper::Memory> memory = convertFromHAL(nnapi, pool); in convertFromHAL()
415 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool) { in convertFromHAL() argument
417 switch (pool.getTag()) { in convertFromHAL()
419 const auto& ashmem = pool.get<Tag::ashmem>(); in convertFromHAL()
431 const auto& mappableFile = pool.get<Tag::mappableFile>(); in convertFromHAL()
445 const auto& hardwareBuffer = pool.get<Tag::hardwareBuffer>(); in convertFromHAL()
492 LOG(ERROR) << "Can't convert to SL Memory, unknown pool tag: " << pool.getTag(); in convertFromHAL()
DShimPreparedModel.cpp50 case RequestMemoryPool::pool: { in parseInputs()
51 const auto& memoryPool = requestPool.get<RequestMemoryPool::pool>(); in parseInputs()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DStringUtil.java54 final String pool = "0123456789"; in generateRandomNumberString() local
56 .ints(length, 0, pool.length()) in generateRandomNumberString()
57 .mapToObj(i -> Character.toString(pool.charAt(i))) in generateRandomNumberString()
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DAllAppsRecyclerView.java107 RecyclerView.RecycledViewPool pool = getRecycledViewPool(); in updatePoolSize() local
109 pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_EMPTY_SEARCH, 1); in updatePoolSize()
110 pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ALL_APPS_DIVIDER, 1); in updatePoolSize()
111 pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_SEARCH_MARKET, 1); in updatePoolSize()
112 pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ICON, approxRows in updatePoolSize()
/packages/modules/NeuralNetworks/common/include/
DValidateHal.h74 bool validatePool(const hardware::hidl_memory& pool, HalVersion ver = HalVersion::LATEST);
75 bool validatePool(const V1_3::Request::MemoryPool& pool, HalVersion ver = HalVersion::LATEST);
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DJobLimiter.java131 public JobLimiter(ThreadPool pool, int limit) { in JobLimiter() argument
132 mPool = Utils.checkNotNull(pool); in JobLimiter()
/packages/modules/Gki/
Ddownload_boot_prebuilt.py108 with futures.ThreadPoolExecutor(max_workers=10) as pool:
118 fs.append((ver, arch, pool.submit(update_prebuilt, args.build_id, boot_prebuilt, ver,
/packages/modules/NeuralNetworks/shim_and_sl/include/
DShimConverter.h56 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool);
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DWallpaperPreviewBitmapTransformation.java54 protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, in transform() argument

12