Home
last modified time | relevance | path

Searched +full:map +full:- +full:cache (Results 1 – 25 of 1138) sorted by relevance

12345678910>>...46

/external/guava/android/guava-tests/test/com/google/common/cache/
DLocalLoadingCacheTest.java8 * 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 …]
DCacheTesting.java7 * 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 …]
DCacheBuilderTest.java8 * 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 …]
DPopulatedCachesTest.java7 * 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/
DLocalLoadingCacheTest.java8 * 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 …]
DCacheTesting.java7 * 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 …]
DCacheBuilderTest.java8 * 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 …]
DPopulatedCachesTest.java7 * 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/
Dv3dv_bo.c29 #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/
Dv3d_bufmgr.c2 * 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/
Dsource.rs7 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/
DLruCache.java35 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/
Dvc4_bufmgr.c2 * 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/
DCache.java7 * 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/
DCache.java7 * 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/
Dmodular_maps.cpp1 // 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}}
Dstress1.cpp1 // 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 …]
Dno-implicit-builds.cpp1 // 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/
DResourceCacheImpl.java12 * 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/
Dlib.rs2 // 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/
Dram_file_block_cache.h7 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/
Dram_file_block_cache.h7 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/
Dreal-path-found-first.m2 // 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/
Dvec_cache.rs2 // 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/
DRegexCache.java8 * 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 …]

12345678910>>...46