Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 2568) sorted by relevance

12345678910>>...103

/external/libnl/lib/
Dcache.c68 int nl_cache_nitems(struct nl_cache *cache) in nl_cache_nitems() argument
70 return cache->c_nitems; in nl_cache_nitems()
78 int nl_cache_nitems_filter(struct nl_cache *cache, struct nl_object *filter) in nl_cache_nitems_filter() argument
83 if (cache->c_ops == NULL) in nl_cache_nitems_filter()
86 nl_list_for_each_entry(obj, &cache->c_items, ce_list) { in nl_cache_nitems_filter()
101 int nl_cache_is_empty(struct nl_cache *cache) in nl_cache_is_empty() argument
103 return nl_list_empty(&cache->c_items); in nl_cache_is_empty()
110 struct nl_cache_ops *nl_cache_get_ops(struct nl_cache *cache) in nl_cache_get_ops() argument
112 return cache->c_ops; in nl_cache_get_ops()
119 struct nl_object *nl_cache_get_first(struct nl_cache *cache) in nl_cache_get_first() argument
[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;
46 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() in testEviction_setMaxSegmentSize() local
[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 …]
/external/squashfs-tools/squashfs-tools/
Dcaches-queues-lists.c269 INSERT_HASH_TABLE(cache, struct cache, CALCULATE_CACHE_HASH, index, hash)
272 REMOVE_HASH_TABLE(cache, struct cache, CALCULATE_CACHE_HASH, index, hash);
283 struct cache *cache_init(int buffer_size, int max_buffers, int noshrink_lookup, in INSERT_LIST()
286 struct cache *cache = malloc(sizeof(struct cache)); in INSERT_LIST() local
288 if(cache == NULL) in INSERT_LIST()
291 cache->max_buffers = max_buffers; in INSERT_LIST()
292 cache->buffer_size = buffer_size; in INSERT_LIST()
293 cache->count = 0; in INSERT_LIST()
294 cache->used = 0; in INSERT_LIST()
295 cache->free_list = NULL; in INSERT_LIST()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_cache.c91 ensure_sanity(const struct util_cache *cache);
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()
113 cache->destroy = destroy; in util_cache_create()
115 make_empty_list(&cache->lru); in util_cache_create()
118 cache->size = size; in util_cache_create()
120 cache->entries = CALLOC(size, sizeof(struct util_cache_entry)); in util_cache_create()
[all …]
/external/freetype/src/cache/
Dftccache.c91 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
118 FT_UFast p = cache->p; in ftc_cache_resize()
119 FT_UFast mask = cache->mask; in ftc_cache_resize()
124 if ( cache->slack < 0 ) in ftc_cache_resize()
134 FT_Memory memory = cache->memory; in ftc_cache_resize()
[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/mesa3d/src/compiler/glsl/tests/
Dcache_test.c155 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()
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()
180 cache = disk_cache_create("test", "make_check", 0); in test_disk_cache_create()
181 expect_null(cache, "disk_cache_create with XDG_CACHE_HOME set with" in test_disk_cache_create()
185 cache = disk_cache_create("test", "make_check", 0); in test_disk_cache_create()
186 expect_non_null(cache, "disk_cache_create with XDG_CACHE_HOME set"); in test_disk_cache_create()
[all …]
/external/squashfs-tools/kernel/fs/squashfs/
Dcache.c67 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
72 spin_lock(&cache->lock); in squashfs_cache_get()
75 for (i = 0; i < cache->entries; i++) in squashfs_cache_get()
76 if (cache->entry[i].block == block) in squashfs_cache_get()
79 if (i == cache->entries) { in squashfs_cache_get()
84 if (cache->unused == 0) { in squashfs_cache_get()
85 cache->num_waiters++; in squashfs_cache_get()
86 spin_unlock(&cache->lock); in squashfs_cache_get()
87 wait_event(cache->wait_queue, cache->unused); in squashfs_cache_get()
88 spin_lock(&cache->lock); in squashfs_cache_get()
[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/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_program_cache.c131 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
162 size = cache->size * 3; in rehash()
165 for (i = 0; i < cache->size; i++) in rehash()
166 for (c = cache->items[i]; c; c = next) { in rehash()
172 free(cache->items); in rehash()
[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()
122 UnifiedCache cache(status); in TestEvictionPolicy() local
126 cache.setEvictionPolicy(0, 100, status); in TestEvictionPolicy()
137 cache.get( in TestEvictionPolicy()
139 &cache, in TestEvictionPolicy()
146 cache.get( in TestEvictionPolicy()
149 &cache, in TestEvictionPolicy()
156 assertEquals("T1", UPRV_LENGTHOF(usedReferences), cache.unusedCount()); in TestEvictionPolicy()
[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()
67 if (cache->hash_table == NULL || in radv_pipeline_cache_init()
[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/tensorflow/tensorflow/compiler/tf2tensorrt/utils/
Dtrt_lru_cache_test.cc24 LRUCache<int, int, std::hash<int>> cache; in TEST() local
25 cache.reserve(2); in TEST()
27 cache.emplace(10, 100); in TEST()
28 EXPECT_EQ(cache.size(), 1); in TEST()
29 EXPECT_EQ(cache.count(10), 1); in TEST()
30 EXPECT_EQ(cache.at(10), 100); in TEST()
31 EXPECT_EQ(cache.count(100), 0); in TEST()
33 cache.emplace(20, 200); in TEST()
34 EXPECT_EQ(cache.size(), 2); in TEST()
35 EXPECT_EQ(cache.count(10), 1); in TEST()
[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()
68 if (cache->checksum != compute_ip_checksum(cache->data, in mrccache_find_current()
69 cache->data_size)) { in mrccache_find_current()
[all …]
/external/skia/tests/
DResourceCacheTest.cpp355 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()
399 cache->getResourceBytes()); in test_no_key()
[all …]
/external/skqp/tests/
DResourceCacheTest.cpp355 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()
399 cache->getResourceBytes()); in test_no_key()
[all …]
/external/guava/guava-gwt/test/com/google/common/cache/
DCacheBuilderTest_gwt.java16 package com.google.common.cache;
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()
62 …com.google.common.cache.CacheBuilderTest testCase = new com.google.common.cache.CacheBuilderTest(); in testNewBuilder()
[all …]
DCacheBuilderGwtTest_gwt.java16 package com.google.common.cache;
22 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMapEntrySet()
28 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMapKeySet()
34 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMapKeySet_contains()
40 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMapValues_contains()
46 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMapValues_iteratorRemove()
52 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMap_containsKey()
58 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testAsMap_containsValue()
64 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testExpireAfterAccess()
70 …com.google.common.cache.CacheBuilderGwtTest testCase = new com.google.common.cache.CacheBuilderGwt… in testExpireAfterWrite()
[all …]
/external/boringssl/src/crypto/x509v3/
Dpcy_cache.c80 X509_POLICY_CACHE *cache = x->policy_cache; in policy_cache_create() local
85 cache->data = sk_X509_POLICY_DATA_new(policy_data_cmp); in policy_cache_create()
86 if (!cache->data) in policy_cache_create()
96 sk_X509_POLICY_DATA_sort(cache->data); in policy_cache_create()
98 if (cache->anyPolicy) { in policy_cache_create()
102 cache->anyPolicy = data; in policy_cache_create()
103 } else if (sk_X509_POLICY_DATA_find(cache->data, NULL, data)) { in policy_cache_create()
106 } else if (!sk_X509_POLICY_DATA_push(cache->data, data)) in policy_cache_create()
118 sk_X509_POLICY_DATA_pop_free(cache->data, policy_data_free); in policy_cache_create()
119 cache->data = NULL; in policy_cache_create()
[all …]
/external/elfutils/libdw/
Dfde.c66 intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry) in intern_fde() argument
69 struct dwarf_cie *cie = __libdw_find_cie (cache, entry->CIE_pointer); in intern_fde()
82 if (unlikely (read_encoded_value (cache, cie->fde_encoding, in intern_fde()
84 || unlikely (read_encoded_value (cache, cie->fde_encoding & 0x0f, in intern_fde()
122 struct dwarf_fde **tres = tsearch (fde, &cache->fde_tree, &compare_fde); in intern_fde()
143 __libdw_fde_by_offset (Dwarf_CFI *cache, Dwarf_Off offset) in __libdw_fde_by_offset() argument
147 int result = INTUSE(dwarf_next_cfi) (cache->e_ident, in __libdw_fde_by_offset()
148 &cache->data->d, CFI_IS_EH (cache), in __libdw_fde_by_offset()
162 struct dwarf_fde *fde = intern_fde (cache, &entry.fde); in __libdw_fde_by_offset()
167 if (cache->next_offset == offset) in __libdw_fde_by_offset()
[all …]

12345678910>>...103