Home
last modified time | relevance | path

Searched full:cache (Results 1 – 25 of 6537) sorted by relevance

12345678910>>...262

/external/libnl/lib/
Dcache.c2 * lib/cache.c Caching Module
14 * @defgroup cache Cache
17 * Cache Management | | Type Specific Cache Operations
26 * 2) destroy old cache +----------- pp_cb ---------|---+
48 * #include <netlink/cache.h>
54 #include <netlink/cache.h>
65 * Return the number of items in the cache
66 * @arg cache cache handle
68 int nl_cache_nitems(struct nl_cache *cache) in nl_cache_nitems() argument
70 return cache->c_nitems; in nl_cache_nitems()
[all …]
Dcache_mngt.c2 * lib/cache_mngt.c Cache Management
24 * #include <netlink/cache.h>
30 #include <netlink/cache.h>
37 * @name Cache Operations Sets
54 * @arg ops Cache operations
63 * @arg ops Cache operations
71 * Lookup cache operations by name
72 * @arg name name of the cache type
77 * @return The cache operations or NULL if not found.
91 * Lookup cache operations by name
[all …]
/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderGwtTest.java17 package com.google.common.cache;
57 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() in testLoader() local
69 cache.put(0, 10); in testLoader()
71 assertEquals(Integer.valueOf(10), cache.get(0, loader)); in testLoader()
72 assertEquals(Integer.valueOf(1), cache.get(20, loader)); in testLoader()
73 assertEquals(Integer.valueOf(2), cache.get(34, loader)); in testLoader()
75 cache.invalidate(0); in testLoader()
76 assertEquals(Integer.valueOf(3), cache.get(0, loader)); in testLoader()
78 cache.put(0, 10); in testLoader()
79 cache.invalidateAll(); in testLoader()
[all …]
DCacheEvictionTest.java15 package com.google.common.cache;
17 import static com.google.common.cache.TestingCacheLoaders.identityLoader;
18 import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener;
19 import static com.google.common.cache.TestingWeighers.constantWeigher;
20 import static com.google.common.cache.TestingWeighers.intKeyWeigher;
24 import com.google.common.cache.CacheTesting.Receiver;
25 import com.google.common.cache.LocalCache.ReferenceEntry;
26 import com.google.common.cache.TestingCacheLoaders.IdentityLoader;
27 import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener;
35 * Tests relating to cache eviction: what does and doesn't count toward maximumSize, what happens
[all …]
DEmptyCachesTest.java15 package com.google.common.cache;
17 import static com.google.common.cache.CacheTesting.checkEmpty;
18 import static com.google.common.cache.TestingCacheLoaders.identityLoader;
24 import com.google.common.cache.CacheBuilderFactory.DurationSpec;
25 import com.google.common.cache.LocalCache.Strength;
47 for (LoadingCache<Object, Object> cache : caches()) { in testEmpty()
48 checkEmpty(cache); in testEmpty()
53 for (LoadingCache<Object, Object> cache : caches()) { in testInvalidate_empty()
54 cache.getUnchecked("a"); in testInvalidate_empty()
55 cache.getUnchecked("b"); in testInvalidate_empty()
[all …]
DCacheManualTest.java15 package com.google.common.cache;
30 Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build(); in testGetIfPresent() local
31 CacheStats stats = cache.stats(); in testGetIfPresent()
40 assertNull(cache.getIfPresent(one)); in testGetIfPresent()
41 stats = cache.stats(); in testGetIfPresent()
46 assertNull(cache.asMap().get(one)); in testGetIfPresent()
47 assertFalse(cache.asMap().containsKey(one)); in testGetIfPresent()
48 assertFalse(cache.asMap().containsValue(two)); in testGetIfPresent()
50 assertNull(cache.getIfPresent(two)); in testGetIfPresent()
51 stats = cache.stats(); in testGetIfPresent()
[all …]
DPopulatedCachesTest.java15 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;
25 import com.google.common.cache.CacheBuilderFactory.DurationSpec;
26 import com.google.common.cache.LocalCache.Strength;
57 for (LoadingCache<Object, Object> cache : caches()) { in testSize_populated()
59 List<Entry<Object, Object>> warmed = warmUp(cache); in testSize_populated()
60 assertEquals(WARMUP_SIZE, cache.size()); in testSize_populated()
61 assertMapSize(cache.asMap(), WARMUP_SIZE); in testSize_populated()
[all …]
DCacheTesting.java15 package com.google.common.cache;
27 import com.google.common.cache.LocalCache.LocalLoadingCache;
28 import com.google.common.cache.LocalCache.ReferenceEntry;
29 import com.google.common.cache.LocalCache.Segment;
30 import com.google.common.cache.LocalCache.ValueReference;
52 * A collection of utilities for {@link Cache} testing.
59 * Poke into the Cache internals to simulate garbage collection of the value associated with the
65 static <K, V> void simulateValueReclamation(Cache<K, V> cache, K key) { in simulateValueReclamation() argument
66 ReferenceEntry<K, V> entry = getReferenceEntry(cache, key); in simulateValueReclamation()
79 * Poke into the Cache internals to simulate garbage collection of the given key. This assumes
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/ThinLTO/X86/
Dcache.ll1 ; Verify first that *without* hash, we don't use the cache.
4 ; RUN: opt -module-summary %p/Inputs/cache.ll -o %t2.bc
7 ; RUN: rm -Rf %t.cache && mkdir %t.cache
8 …: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache
9 ; RUN: ls %t.cache/llvmcache.timestamp
10 ; RUN: ls %t.cache | count 1
13 ; RUN: rm -Rf %t.cache
14 ; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache \
18 ; RUN: ls %t.cache | count 0
24 ; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.bc
[all …]
/external/squashfs-tools/squashfs-tools/
Dcaches-queues-lists.c148 /* Called with the cache mutex held */
265 /* define cache hash tables */
268 /* Called with the cache mutex held */
269 INSERT_HASH_TABLE(cache, struct cache, CALCULATE_CACHE_HASH, index, hash)
271 /* Called with the cache mutex held */
272 REMOVE_HASH_TABLE(cache, struct cache, CALCULATE_CACHE_HASH, index, hash);
274 /* define cache free list */
276 /* Called with the cache mutex held */
279 /* Called with the cache mutex held */ in INSERT_LIST()
283 struct cache *cache_init(int buffer_size, int max_buffers, int noshrink_lookup, in INSERT_LIST()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_cache.c30 * Improved cache implementation.
76 /** Max entries in the cache */
82 /** Number of entries in the cache */
91 ensure_sanity(const struct util_cache *cache);
96 * Create a new cache with 'size' entries. Also provide functions for
105 struct util_cache *cache; in util_cache_create() local
107 cache = CALLOC_STRUCT(util_cache); in util_cache_create()
108 if (!cache) in util_cache_create()
111 cache->hash = hash; in util_cache_create()
112 cache->compare = compare; in util_cache_create()
[all …]
/external/freetype/src/cache/
Dftccache.c5 * The FreeType internal cache interface (body).
42 /***** CACHE NODE DEFINITIONS *****/
87 /* get a top bucket for specified hash from cache,
88 * body for FTC_NODE_TOP_FOR_HASH( cache, hash )
91 ftc_get_top_node_for_hash( FTC_Cache cache, in ftc_get_top_node_for_hash() argument
98 idx = hash & cache->mask; in ftc_get_top_node_for_hash()
99 if ( idx < cache->p ) in ftc_get_top_node_for_hash()
100 idx = hash & ( 2 * cache->mask + 1 ); in ftc_get_top_node_for_hash()
101 pnode = cache->buckets + idx; in ftc_get_top_node_for_hash()
113 ftc_cache_resize( FTC_Cache cache ) in ftc_cache_resize() argument
[all …]
/external/squashfs-tools/kernel/fs/squashfs/
Dcache.c21 * cache.c
28 * This file implements a generic cache implementation used for both caches,
29 * plus functions layered ontop of the generic cache implementation to
32 * To avoid out of memory and fragmentation isssues with vmalloc the cache
35 * It should be noted that the cache is not used for file datablocks, these
36 * are decompressed and cached in the page-cache in the normal way. The
37 * cache is only used to temporarily cache fragment and metadata blocks
63 * Look-up block in cache, and increment usage count. If not in cache, read
67 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
72 spin_lock(&cache->lock); in squashfs_cache_get()
[all …]
/external/mesa3d/src/amd/vulkan/
Dradv_pipeline_cache.c51 radv_pipeline_cache_init(struct radv_pipeline_cache *cache, in radv_pipeline_cache_init() argument
54 cache->device = device; in radv_pipeline_cache_init()
55 pthread_mutex_init(&cache->mutex, NULL); in radv_pipeline_cache_init()
57 cache->modified = false; in radv_pipeline_cache_init()
58 cache->kernel_count = 0; in radv_pipeline_cache_init()
59 cache->total_size = 0; in radv_pipeline_cache_init()
60 cache->table_size = 1024; in radv_pipeline_cache_init()
61 const size_t byte_size = cache->table_size * sizeof(cache->hash_table[0]); in radv_pipeline_cache_init()
62 cache->hash_table = malloc(byte_size); in radv_pipeline_cache_init()
65 * cache. Disable caching when we want to keep shader debug info, since in radv_pipeline_cache_init()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_program_cache.c34 * This file implements a simple program cache for 965. The consumers can
37 * data) in return. Objects in the cache may not have relocations
43 * Replacement is not implemented. Instead, when the cache gets too
44 * big we throw out all of the cache data and let it get regenerated.
131 search_cache(struct brw_cache *cache, GLuint hash, in search_cache() argument
139 for (c = cache->items[hash % cache->size]; c; c = c->next) in search_cache()
142 fprintf(stderr, "bucket %d/%d = %d/%d items\n", hash % cache->size, in search_cache()
143 cache->size, bucketcount, cache->n_items); in search_cache()
146 for (c = cache->items[hash % cache->size]; c; c = c->next) { in search_cache()
156 rehash(struct brw_cache *cache) in rehash() argument
[all …]
/external/icu/icu4c/source/test/intltest/
Dunifiedcachetest.cpp98 const UnifiedCache *cache = UnifiedCache::getInstance(status); in TestEvictionUnderStress() local
99 int64_t evictedCountBefore = cache->autoEvictedCount(); in TestEvictionUnderStress()
103 int64_t evictedCountAfter = cache->autoEvictedCount(); in TestEvictionUnderStress()
105 dataerrln("%s:%d Items should have been evicted from cache", in TestEvictionUnderStress()
116 // cache API incorrectly by creating their own cache instances. in TestEvictionPolicy()
121 // their own cache! in TestEvictionPolicy()
122 UnifiedCache cache(status); in TestEvictionPolicy() local
126 cache.setEvictionPolicy(0, 100, status); in TestEvictionPolicy()
137 cache.get( in TestEvictionPolicy()
139 &cache, in TestEvictionPolicy()
[all …]
/external/volley/src/test/java/com/android/volley/toolbox/
DDiskBasedCacheTest.java35 import com.android.volley.Cache;
67 private Cache cache; field in DiskBasedCacheTest
75 // Initialize empty cache in setup()
76 cache = new DiskBasedCache(temporaryFolder.getRoot(), MAX_SIZE); in setup()
77 cache.initialize(); in setup()
82 cache = null; in teardown()
87 assertThat(cache.get("key"), is(nullValue())); in testEmptyInitialize()
92 Cache.Entry entry = new Cache.Entry(); in testPutGetZeroBytes()
102 cache.put("my-magical-key", entry); in testPutGetZeroBytes()
104 assertThatEntriesAreEqual(cache.get("my-magical-key"), entry); in testPutGetZeroBytes()
[all …]
/external/mesa3d/src/mesa/program/
Dprog_cache.c83 rehash(struct gl_program_cache *cache) in rehash() argument
89 cache->last = NULL; in rehash()
91 size = cache->size * 3; in rehash()
95 for (i = 0; i < cache->size; i++) in rehash()
96 for (c = cache->items[i]; c; c = next) { in rehash()
102 free(cache->items); in rehash()
103 cache->items = items; in rehash()
104 cache->size = size; in rehash()
109 clear_cache(struct gl_context *ctx, struct gl_program_cache *cache, in clear_cache() argument
115 cache->last = NULL; in clear_cache()
[all …]
/external/u-boot/arch/x86/lib/
Dmrccache.c21 struct mrc_data_container *cache) in next_mrc_block() argument
24 u32 mrc_size = sizeof(*cache) + cache->data_size; in next_mrc_block()
25 u8 *region_ptr = (u8 *)cache; in next_mrc_block()
37 static int is_mrc_cache(struct mrc_data_container *cache) in is_mrc_cache() argument
39 return cache && (cache->signature == MRC_DATA_SIGNATURE); in is_mrc_cache()
44 struct mrc_data_container *cache, *next; in mrccache_find_current() local
50 cache = NULL; in mrccache_find_current()
56 cache = next; in mrccache_find_current()
63 debug("%s: No valid MRC cache found.\n", __func__); in mrccache_find_current()
68 if (cache->checksum != compute_ip_checksum(cache->data, in mrccache_find_current()
[all …]
/external/clang/cmake/caches/
DApple-stage2.cmake4 set(LLVM_TARGETS_TO_BUILD X86 ARM AArch64 CACHE STRING "")
5 set(PACKAGE_VENDOR Apple CACHE STRING "")
6 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
7 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
8 set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
9 set(CLANG_TOOL_SCAN_BUILD_BUILD OFF CACHE BOOL "")
10 set(CLANG_TOOL_SCAN_VIEW_BUILD OFF CACHE BOOL "")
11 set(CLANG_LINKS_TO_CREATE clang++ cc c++ CACHE STRING "")
12 set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
13 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
[all …]
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/
DDiskLruCacheTest.java62 private DiskLruCache cache; field in DiskLruCacheTest
70 cache = new DiskLruCache(fileSystem, cacheDir, appVersion, 2, maxSize, executor); in createNewCacheWithSize()
71 synchronized (cache) { in createNewCacheWithSize()
72 cache.initialize(); in createNewCacheWithSize()
74 toClose.add(cache); in createNewCacheWithSize()
91 cache.close(); in emptyCache()
99 cache.edit(key); in validateKey()
106 cache.edit(key); in validateKey()
113 cache.edit(key); in validateKey()
120 cache.edit(key); in validateKey()
[all …]
/external/mesa3d/src/compiler/glsl/tests/
Dcache_test.c24 /* A collection of unit tests for cache.c */
150 #define CACHE_TEST_TMP "./cache-test-tmp"
155 struct disk_cache *cache; in test_disk_cache_create() local
162 cache = disk_cache_create("test", "make_check", 0); in test_disk_cache_create()
163 expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DISABLE set"); in test_disk_cache_create()
168 * variables to test creation of cache in home directory. in test_disk_cache_create()
173 cache = disk_cache_create("test", "make_check", 0); in test_disk_cache_create()
174 expect_non_null(cache, "disk_cache_create with no environment variables"); in test_disk_cache_create()
176 disk_cache_destroy(cache); in test_disk_cache_create()
179 setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); in test_disk_cache_create()
[all …]
/external/guava/guava-gwt/test/com/google/common/cache/
DCacheBuilderTest_gwt.java16 package com.google.common.cache;
19 return "com.google.common.cache.testModule"; in getModuleName()
22 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testConcurrencyLevel_large()
27 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testConcurrencyLevel_setTwice()
32 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testConcurrencyLevel_zero()
37 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testInitialCapacity_large()
42 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testInitialCapacity_negative()
47 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testInitialCapacity_setTwice()
52 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testMaximumSize_negative()
57 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testMaximumSize_setTwice()
[all …]
/external/skqp/tests/
DResourceCacheTest.cpp60 // Set the cache limits so we can fit 10 "src" images and the in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
355 GrResourceCache* cache = fContext->contextPriv().getResourceCache(); in Mock() local
356 cache->purgeAllUnlocked(); in Mock()
357 SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); in Mock()
360 GrResourceCache* cache() { return fContext->contextPriv().getResourceCache(); } in cache() function in Mock
375 GrResourceCache* cache = mock.cache(); in test_no_key() local
385 REPORTER_ASSERT(reporter, 4 == cache->getResourceCount()); in test_no_key()
387 d->gpuMemorySize() == cache->getResourceBytes()); in test_no_key()
390 cache->purgeAllUnlocked(); in test_no_key()
397 REPORTER_ASSERT(reporter, 3 == cache->getResourceCount()); in test_no_key()
[all …]
/external/skia/tests/
DResourceCacheTest.cpp60 // Set the cache limits so we can fit 10 "src" images and the in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
355 GrResourceCache* cache = fContext->priv().getResourceCache(); in Mock() local
356 cache->purgeAllUnlocked(); in Mock()
357 SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); in Mock()
360 GrResourceCache* cache() { return fContext->priv().getResourceCache(); } in cache() function in Mock
375 GrResourceCache* cache = mock.cache(); in test_no_key() local
385 REPORTER_ASSERT(reporter, 4 == cache->getResourceCount()); in test_no_key()
387 d->gpuMemorySize() == cache->getResourceBytes()); in test_no_key()
390 cache->purgeAllUnlocked(); in test_no_key()
397 REPORTER_ASSERT(reporter, 3 == cache->getResourceCount()); in test_no_key()
[all …]

12345678910>>...262