| /external/guava/android/guava-tests/test/com/google/common/cache/ |
| D | LocalLoadingCacheTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 17 package com.google.common.cache; 19 import static com.google.common.cache.CacheBuilder.EMPTY_STATS; 20 import static com.google.common.cache.LocalCacheTest.SMALL_MAX_SIZE; 21 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 24 import com.google.common.cache.LocalCache.LocalLoadingCache; 25 import com.google.common.cache.LocalCache.Segment; 30 import java.util.Map; 60 LocalLoadingCache<Object, Object> cache = makeCache(createCacheBuilder(), loader); in testComputingFunction() local 61 assertSame(loader, cache.localCache.defaultLoader); in testComputingFunction() [all …]
|
| D | CacheTesting.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 28 import com.google.common.cache.LocalCache.LocalLoadingCache; 29 import com.google.common.cache.LocalCache.Segment; 30 import com.google.common.cache.LocalCache.ValueReference; 41 import java.util.Map; 42 import java.util.Map.Entry; 50 * A collection of utilities for {@link Cache} testing. 58 * Poke into the Cache internals to simulate garbage collection of the value associated with the 64 static <K, V> void simulateValueReclamation(Cache<K, V> cache, K key) { in simulateValueReclamation() argument [all …]
|
| D | CacheBuilderTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 17 package com.google.common.cache; 19 import static com.google.common.cache.TestingCacheLoaders.constantLoader; 20 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 21 import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener; 22 import static com.google.common.cache.TestingRemovalListeners.nullRemovalListener; 23 import static com.google.common.cache.TestingRemovalListeners.queuingRemovalListener; 24 import static com.google.common.cache.TestingWeighers.constantWeigher; 34 import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener; 35 import com.google.common.cache.TestingRemovalListeners.QueuingRemovalListener; [all …]
|
| D | PopulatedCachesTest.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 17 import static com.google.common.cache.CacheTesting.checkEmpty; 18 import static com.google.common.cache.CacheTesting.checkValidState; 19 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 26 import com.google.common.cache.CacheBuilderFactory.DurationSpec; 27 import com.google.common.cache.LocalCache.Strength; 37 import java.util.Map; 38 import java.util.Map.Entry; 43 * {@link LoadingCache} tests that deal with caches that actually contain some key-value mappings. [all …]
|
| /external/guava/guava-tests/test/com/google/common/cache/ |
| D | LocalLoadingCacheTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 17 package com.google.common.cache; 19 import static com.google.common.cache.CacheBuilder.EMPTY_STATS; 20 import static com.google.common.cache.LocalCacheTest.SMALL_MAX_SIZE; 21 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 24 import com.google.common.cache.LocalCache.LocalLoadingCache; 25 import com.google.common.cache.LocalCache.Segment; 30 import java.util.Map; 60 LocalLoadingCache<Object, Object> cache = makeCache(createCacheBuilder(), loader); in testComputingFunction() local 61 assertSame(loader, cache.localCache.defaultLoader); in testComputingFunction() [all …]
|
| D | CacheTesting.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 28 import com.google.common.cache.LocalCache.LocalLoadingCache; 29 import com.google.common.cache.LocalCache.Segment; 30 import com.google.common.cache.LocalCache.ValueReference; 41 import java.util.Map; 42 import java.util.Map.Entry; 50 * A collection of utilities for {@link Cache} testing. 58 * Poke into the Cache internals to simulate garbage collection of the value associated with the 64 static <K, V> void simulateValueReclamation(Cache<K, V> cache, K key) { in simulateValueReclamation() argument [all …]
|
| D | CacheBuilderTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 17 package com.google.common.cache; 19 import static com.google.common.cache.TestingCacheLoaders.constantLoader; 20 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 21 import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener; 22 import static com.google.common.cache.TestingRemovalListeners.nullRemovalListener; 23 import static com.google.common.cache.TestingRemovalListeners.queuingRemovalListener; 24 import static com.google.common.cache.TestingWeighers.constantWeigher; 34 import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener; 35 import com.google.common.cache.TestingRemovalListeners.QueuingRemovalListener; [all …]
|
| D | PopulatedCachesTest.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 17 import static com.google.common.cache.CacheTesting.checkEmpty; 18 import static com.google.common.cache.CacheTesting.checkValidState; 19 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 26 import com.google.common.cache.CacheBuilderFactory.DurationSpec; 27 import com.google.common.cache.LocalCache.Strength; 37 import java.util.Map; 38 import java.util.Map.Entry; 43 * {@link LoadingCache} tests that deal with caches that actually contain some key-value mappings. [all …]
|
| /external/mesa3d/src/broadcom/vulkan/ |
| D | v3dv_bo.c | 29 #include "drm-uapi/v3d_drm.h" 32 /* Default max size of the bo cache, in MB. 36 * from testing those applications, the main consumer of the bo cache are 41 /* Discarded to use a V3D_DEBUG for this, as it would mean adding a run-time 49 struct v3dv_bo_cache *cache = &device->bo_cache; in bo_dump_stats() local 51 fprintf(stderr, " BOs allocated: %d\n", device->bo_count); in bo_dump_stats() 52 fprintf(stderr, " BOs size: %dkb\n", device->bo_size / 1024); in bo_dump_stats() 53 fprintf(stderr, " BOs cached: %d\n", cache->cache_count); in bo_dump_stats() 54 fprintf(stderr, " BOs cached size: %dkb\n", cache->cache_size / 1024); in bo_dump_stats() 56 if (!list_is_empty(&cache->time_list)) { in bo_dump_stats() [all …]
|
| /external/mesa3d/src/gallium/drivers/v3d/ |
| D | v3d_bufmgr.c | 2 * Copyright © 2014-2017 Broadcom 41 v3d_bo_cache_free_all(struct v3d_bo_cache *cache); 46 struct v3d_bo_cache *cache = &screen->bo_cache; in v3d_bo_dump_stats() local 50 list_for_each_entry(struct v3d_bo, bo, &cache->time_list, time_list) { in v3d_bo_dump_stats() 52 cache_size += bo->size; in v3d_bo_dump_stats() 55 fprintf(stderr, " BOs allocated: %d\n", screen->bo_count); in v3d_bo_dump_stats() 56 fprintf(stderr, " BOs size: %dkb\n", screen->bo_size / 1024); in v3d_bo_dump_stats() 60 if (!list_is_empty(&cache->time_list)) { in v3d_bo_dump_stats() 61 struct v3d_bo *first = list_first_entry(&cache->time_list, in v3d_bo_dump_stats() 64 struct v3d_bo *last = list_last_entry(&cache->time_list, in v3d_bo_dump_stats() [all …]
|
| /external/rust/crates/config/src/ |
| D | source.rs | 7 use crate::map::Map; 13 fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>; in clone_into_box() 16 /// a Map. 17 fn collect(&self) -> Result<Map<String, Value>>; in collect() 19 /// Collects all configuration properties to a provided cache. 20 fn collect_to(&self, cache: &mut Value) -> Result<()> { in collect_to() 23 .for_each(|(key, val)| set_value(cache, key, val)); in collect_to() 29 fn set_value(cache: &mut Value, key: &str, value: &Value) { in set_value() 32 Ok(expr) => expr.set(cache, value.clone()), in set_value() 35 _ => path::Expression::Identifier(key.to_string()).set(cache, value.clone()), in set_value() [all …]
|
| /external/google-smali/dexlib2/src/main/java/com/android/tools/smali/dexlib2/analysis/util/ |
| D | LruCache.java | 35 import java.util.Map; 40 * A cache that holds strong references to a limited number of values. Each time 42 * added to a full cache, the value at the end of that queue is evicted and may 48 * <p>If a cache miss should be computed on demand for the corresponding keys, 50 * assume a value will always be returned, even when there's a cache miss. 52 * <p>By default, the cache size is measured in the number of entries. Override 53 * {@link #sizeOf} to size the cache in different units. For example, this cache 63 * <p>This class is thread-safe. Perform multiple cache operations atomically by 64 * synchronizing on the cache: <pre> {@code 65 * synchronized (cache) { [all …]
|
| /external/mesa3d/src/gallium/drivers/vc4/ |
| D | vc4_bufmgr.c | 2 * Copyright © 2014-2015 Broadcom 42 vc4_bo_cache_free_all(struct vc4_bo_cache *cache); 47 sprintf(buf, "vc4_bo<%s,%u,%u>", ptr->name ? ptr->name : "?", in vc4_bo_debug_describe() 48 ptr->handle, ptr->size); in vc4_bo_debug_describe() 55 * whole-system allocation information), or if VC4_DEBUG=surf is set in vc4_bo_label() 68 .handle = bo->handle, in vc4_bo_label() 72 vc4_ioctl(screen->fd, DRM_IOCTL_VC4_LABEL_BO, &label); in vc4_bo_label() 80 struct vc4_bo_cache *cache = &screen->bo_cache; in vc4_bo_dump_stats() local 82 fprintf(stderr, " BOs allocated: %d\n", screen->bo_count); in vc4_bo_dump_stats() 83 fprintf(stderr, " BOs size: %dkb\n", screen->bo_size / 1024); in vc4_bo_dump_stats() [all …]
|
| /external/guava/guava/src/com/google/common/cache/ |
| D | Cache.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 24 import java.util.Map; 31 * A semi-persistent mapping from keys to values. Cache entries are manually added using {@link 32 * #get(Object, Callable)} or {@link #put(Object, Object)}, and are stored in the cache until either 35 * <p>Implementations of this interface are expected to be thread-safe, and can be safely accessed 38 * @param <K> the type of the cache's keys, which are not permitted to be null 39 * @param <V> the type of the cache's values, which are not permitted to be null 46 public interface Cache<K, V> { interface 49 * Returns the value associated with {@code key} in this cache, or {@code null} if there is no [all …]
|
| /external/guava/android/guava/src/com/google/common/cache/ |
| D | Cache.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 15 package com.google.common.cache; 24 import java.util.Map; 31 * A semi-persistent mapping from keys to values. Cache entries are manually added using {@link 32 * #get(Object, Callable)} or {@link #put(Object, Object)}, and are stored in the cache until either 35 * <p>Implementations of this interface are expected to be thread-safe, and can be safely accessed 38 * @param <K> the type of the cache's keys, which are not permitted to be null 39 * @param <V> the type of the cache's values, which are not permitted to be null 46 public interface Cache<K, V> { interface 49 * Returns the value associated with {@code key} in this cache, or {@code null} if there is no [all …]
|
| /external/clang/test/Modules/ |
| D | modular_maps.cpp | 1 // RUN: rm -rf %t 3 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/module… 4 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/module… 7 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea.m… 8 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec.m… 11 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea-c… 12 …-x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec-c… 16 #include "b.h" // expected-error {{private header}}
|
| D | stress1.cpp | 1 // RUN: rm -rf %t 4 // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ 5 // RUN: -I Inputs/stress1 \ 6 // RUN: -fno-implicit-modules \ 7 // RUN: -fmodules-cache-path=%t \ 8 // RUN: -fmodule-map-file-home-is-cwd \ 9 // RUN: -emit-module -fmodule-name=m00 -o %t/m00.pcm \ 12 // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ 13 // RUN: -I Inputs/stress1 \ 14 // RUN: -fno-implicit-modules \ [all …]
|
| D | no-implicit-builds.cpp | 1 // RUN: rm -rf %t 3 // RUN: %clang -x c++ -std=c++11 -fmodules -fno-implicit-modules /dev/null -### \ 4 // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-MODULE-CACHE %s 5 // CHECK-NO-MODULE-CACHE-NOT: -fmodules-cache-path 8 // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ 9 // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ 10 // RUN: -fno-implicit-modules %s -verify 12 // Same thing if we're running -cc1 and no module cache path has been provided. 13 // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps \ 14 // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ [all …]
|
| /external/apache-velocity-engine/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ |
| D | ResourceCacheImpl.java | 12 * http://www.apache.org/licenses/LICENSE-2.0 30 import java.util.Map; 31 import java.util.Map.Entry; 35 * Default implementation of the resource cache for the default 36 * ResourceManager. The cache uses a <i>least recently used</i> (LRU) 38 * <code>resource.manager.cache.size</code> property (identified by the 42 * a greedy, unbounded cache (the behavior from pre-v1.5). 52 * A simple LRU Map based on {@link LinkedHashSet}. 54 * @param <K> The key type of the map. 55 * @param <V> The value type of the map. [all …]
|
| /external/rust/crates/lru-cache/src/ |
| D | lib.rs | 2 // file at the top-level directory of this distribution and at 3 // http://rust-lang.org/COPYRIGHT. 5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 11 //! A cache that holds a limited number of key-value pairs. When the 12 //! capacity of the cache is exceeded, the least-recently-used 13 //! (where "used" means a look-up or putting the pair into the cache) 21 //! let mut cache = LruCache::new(2); 23 //! cache.insert(1, 10); [all …]
|
| /external/tensorflow/tensorflow/core/platform/cloud/ |
| D | ram_file_block_cache.h | 7 http://www.apache.org/licenses/LICENSE-2.0 21 #include <map> 37 /// \brief An LRU block cache of file contents, keyed by {filename, offset}. 39 /// This class should be shared by read-only random access files on a remote 43 /// The callback executed when a block is not found in the cache, and needs to 45 /// cache is constructed. The returned Status should be OK as long as the 61 pruning_thread_.reset(env_->StartThread(ThreadOptions(), "TF_prune_FBC", in block_size_() 64 VLOG(1) << "GCS file block cache is " in block_size_() 83 /// but the read returned a partial block, and the LRU cache contained a 95 // cache. Returns true if the signature doesn't change or the file doesn't [all …]
|
| /external/tensorflow/tensorflow/c/experimental/filesystem/plugins/gcs/ |
| D | ram_file_block_cache.h | 7 http://www.apache.org/licenses/LICENSE-2.0 22 #include <map> 36 /// \brief An LRU block cache of file contents, keyed by {filename, offset}. 38 /// This class should be shared by read-only random access files on a remote 42 /// The callback executed when a block is not found in the cache, and needs to 44 /// cache is constructed. It returns total bytes read ( -1 in case of errors 69 TF_VLog(1, "GCS file block cache is %s.\n", 83 /// returns total bytes read ( -1 in case of errors ). This method will set 90 /// but the read returned a partial block, and the LRU cache contained a 106 // cache. Returns true if the signature doesn't change or the file doesn't [all …]
|
| /external/clang/test/VFS/ |
| D | real-path-found-first.m | 2 // use its VFS-mapped path. If we accidentally use the real path in header 8 // RUN: rm -rf %t %t-cache %t.pch 9 // RUN: mkdir -p %t/SomeFramework.framework/Modules 10 // RUN: cp %S/Inputs/some_frame_module.map %t/SomeFramework.framework/Modules/module.modulemap 11 // RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml 14 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-cache -F %t \ 15 // RUN: -ivfsoverlay %t.yaml -fsyntax-only %s -verify -Wauto-import \ 16 // RUN: -Werror=non-modular-include-in-framework-module 20 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-cache -F %t \ 21 // RUN: -ivfsoverlay %t.yaml -fsyntax-only %s -verify -Wauto-import \ [all …]
|
| /external/crosvm/disk/src/qcow/ |
| D | vec_cache.rs | 2 // Use of this source code is governed by a BSD-style license that can be 16 fn dirty(&self) -> bool; in dirty() 20 /// Represents a vector that implements the `Cacheable` trait so it can be held in a cache. 28 pub fn new(count: usize) -> VecCache<T> { in new() 36 pub fn from_vec(vec: Vec<T>) -> VecCache<T> { in from_vec() 43 pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output> in get() 51 pub fn get_values(&self) -> &[T] { in get_values() 55 /// Mark this cache element as clean. 61 pub fn len(&self) -> usize { in len() 67 fn dirty(&self) -> bool { in dirty() [all …]
|
| /external/libphonenumber/libphonenumber/src/com/google/i18n/phonenumbers/internal/ |
| D | RegexCache.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 20 import java.util.Map; 24 * LRU Cache for compiled regular expressions used by the libphonenumbers libary. 29 private LRUCache<String, Pattern> cache; field in RegexCache 32 cache = new LRUCache<String, Pattern>(size); in RegexCache() 36 Pattern pattern = cache.get(regex); in getPatternForRegex() 39 cache.put(regex, pattern); in getPatternForRegex() 46 return cache.containsKey(regex); in containsRegex() 50 // LinkedHashMap offers a straightforward implementation of LRU cache. 51 private LinkedHashMap<K, V> map; field in RegexCache.LRUCache [all …]
|