Home
last modified time | relevance | path

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

12345678910>>...118

/third_party/skia/third_party/externals/swiftshader/tests/SystemUnitTests/
DLRUCacheTests.cpp27 void checkRange(const Cache &cache, std::vector<std::pair<typename Cache::Key, typename Cache::Data… in checkRange() argument
30 for(auto it : cache) in checkRange()
46 LRUCache<std::string, std::string> cache(8); in TEST() local
47 ASSERT_EQ(cache.lookup(""), ""); in TEST()
48 ASSERT_EQ(cache.lookup("123"), ""); in TEST()
50 for(auto ignored : cache) in TEST()
63 LRUCache<std::string, std::string> cache(4); in TEST() local
65 cache.add("1", "one"); in TEST()
66 cache.add("2", "two"); in TEST()
67 cache.add("3", "three"); in TEST()
[all …]
/third_party/libnl/lib/
Dcache.c69 int nl_cache_nitems(struct nl_cache *cache) in nl_cache_nitems() argument
71 return cache->c_nitems; in nl_cache_nitems()
79 int nl_cache_nitems_filter(struct nl_cache *cache, struct nl_object *filter) in nl_cache_nitems_filter() argument
84 if (cache->c_ops == NULL) in nl_cache_nitems_filter()
87 nl_list_for_each_entry(obj, &cache->c_items, ce_list) { in nl_cache_nitems_filter()
102 int nl_cache_is_empty(struct nl_cache *cache) in nl_cache_is_empty() argument
104 return nl_list_empty(&cache->c_items); in nl_cache_is_empty()
111 struct nl_cache_ops *nl_cache_get_ops(struct nl_cache *cache) in nl_cache_get_ops() argument
113 return cache->c_ops; in nl_cache_get_ops()
120 struct nl_object *nl_cache_get_first(struct nl_cache *cache) in nl_cache_get_first() argument
[all …]
/third_party/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 …]
/third_party/flutter/skia/third_party/externals/freetype/src/cache/
Dftccache.c28 #define FT_COMPONENT cache
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
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()
[all …]
/third_party/freetype/src/cache/
Dftccache.c27 #define FT_COMPONENT cache
90 ftc_get_top_node_for_hash( FTC_Cache cache, in ftc_get_top_node_for_hash() argument
97 idx = hash & cache->mask; in ftc_get_top_node_for_hash()
98 if ( idx < cache->p ) in ftc_get_top_node_for_hash()
99 idx = hash & ( 2 * cache->mask + 1 ); in ftc_get_top_node_for_hash()
100 pnode = cache->buckets + idx; in ftc_get_top_node_for_hash()
112 ftc_cache_resize( FTC_Cache cache ) in ftc_cache_resize() argument
117 FT_UFast p = cache->p; in ftc_cache_resize()
118 FT_UFast mask = cache->mask; in ftc_cache_resize()
123 if ( cache->slack < 0 ) in ftc_cache_resize()
[all …]
/third_party/skia/third_party/externals/freetype/src/cache/
Dftccache.c27 #define FT_COMPONENT cache
90 ftc_get_top_node_for_hash( FTC_Cache cache, in ftc_get_top_node_for_hash() argument
96 idx = hash & cache->mask; in ftc_get_top_node_for_hash()
97 if ( idx < cache->p ) in ftc_get_top_node_for_hash()
98 idx = hash & ( 2 * cache->mask + 1 ); in ftc_get_top_node_for_hash()
100 return cache->buckets + idx; in ftc_get_top_node_for_hash()
111 ftc_cache_resize( FTC_Cache cache ) in ftc_cache_resize() argument
116 FT_UFast p = cache->p; in ftc_cache_resize()
117 FT_UFast mask = cache->mask; in ftc_cache_resize()
122 if ( cache->slack < 0 ) in ftc_cache_resize()
[all …]
/third_party/ntfs-3g/libntfs-3g/
Dcache.c63 static void inserthashindex(struct CACHE_HEADER *cache, in inserthashindex() argument
70 if (cache->dohash) { in inserthashindex()
71 h = cache->dohash(current); in inserthashindex()
72 if ((h >= 0) && (h < cache->max_hash)) { in inserthashindex()
74 link = cache->free_hash; in inserthashindex()
76 cache->free_hash = link->next; in inserthashindex()
77 first = cache->first_hash[h]; in inserthashindex()
83 cache->first_hash[h] = link; in inserthashindex()
87 cache->name); in inserthashindex()
88 cache->dohash = (cache_hash)NULL; in inserthashindex()
[all …]
/third_party/mesa3d/src/freedreno/vulkan/
Dtu_pipeline_cache.c48 tu_pipeline_cache_init(struct tu_pipeline_cache *cache, in tu_pipeline_cache_init() argument
51 cache->device = device; in tu_pipeline_cache_init()
52 pthread_mutex_init(&cache->mutex, NULL); in tu_pipeline_cache_init()
54 cache->modified = false; in tu_pipeline_cache_init()
55 cache->kernel_count = 0; in tu_pipeline_cache_init()
56 cache->total_size = 0; in tu_pipeline_cache_init()
57 cache->table_size = 1024; in tu_pipeline_cache_init()
58 const size_t byte_size = cache->table_size * sizeof(cache->hash_table[0]); in tu_pipeline_cache_init()
59 cache->hash_table = malloc(byte_size); in tu_pipeline_cache_init()
64 if (cache->hash_table == NULL) in tu_pipeline_cache_init()
[all …]
/third_party/mesa3d/src/mesa/program/
Dprog_cache.c84 rehash(struct gl_program_cache *cache) in rehash() argument
90 cache->last = NULL; in rehash()
92 size = cache->size * 3; in rehash()
96 for (i = 0; i < cache->size; i++) in rehash()
97 for (c = cache->items[i]; c; c = next) { in rehash()
103 free(cache->items); in rehash()
104 cache->items = items; in rehash()
105 cache->size = size; in rehash()
110 clear_cache(struct gl_context *ctx, struct gl_program_cache *cache, in clear_cache() argument
116 cache->last = NULL; in clear_cache()
[all …]
/third_party/libwebsockets/lib/misc/cache-ttl/
Dheap.c33 update_sul(lws_cache_ttl_lru_t_heap_t *cache);
54 _lws_cache_heap_item_destroy(lws_cache_ttl_lru_t_heap_t *cache, in _lws_cache_heap_item_destroy() argument
57 lwsl_cache("%s: %s (%s)\n", __func__, cache->cache.info.name, in _lws_cache_heap_item_destroy()
63 cache->cache.current_footprint -= item->size; in _lws_cache_heap_item_destroy()
65 update_sul(cache); in _lws_cache_heap_item_destroy()
67 if (cache->cache.info.cb) in _lws_cache_heap_item_destroy()
68 cache->cache.info.cb((void *)((uint8_t *)&item[1]), item->size); in _lws_cache_heap_item_destroy()
74 lws_cache_heap_item_destroy(lws_cache_ttl_lru_t_heap_t *cache, in lws_cache_heap_item_destroy() argument
77 struct lws_cache_ttl_lru *backing = &cache->cache; in lws_cache_heap_item_destroy()
98 cache->items_lru.head) { in lws_cache_heap_item_destroy()
[all …]
Dlws-cache-ttl.c46 lws_cache_schedule(struct lws_cache_ttl_lru *cache, sul_cb_t cb, lws_usec_t e) in lws_cache_schedule() argument
48 lwsl_cache("%s: %s schedule %llu\n", __func__, cache->info.name, in lws_cache_schedule()
51 lws_sul_schedule(cache->info.cx, cache->info.tsi, &cache->sul, cb, in lws_cache_schedule()
56 lws_cache_write_through(struct lws_cache_ttl_lru *cache, in lws_cache_write_through() argument
60 struct lws_cache_ttl_lru *levels[LWS_CACHE_MAX_LEVELS], *c = cache; in lws_cache_write_through()
63 lws_cache_item_remove(cache, specific_key); in lws_cache_write_through()
91 lws_cache_lookup(struct lws_cache_ttl_lru *cache, const char *wildcard_key, in lws_cache_lookup() argument
94 struct lws_cache_ttl_lru *l1 = cache; in lws_cache_lookup()
118 while (cache->info.parent) in lws_cache_lookup()
119 cache = cache->info.parent; in lws_cache_lookup()
[all …]
Dfile.c68 typedef int (*nsc_cb_t)(lws_cache_nscookiejar_t *cache, void *opaque, int flags,
75 nsc_backing_open_lock(lws_cache_nscookiejar_t *cache, int mode, const char *par) in nsc_backing_open_lock() argument
84 cache->cache.info.u.nscookiejar.filepath); in nsc_backing_open_lock()
106 fd = open(cache->cache.info.u.nscookiejar.filepath, in nsc_backing_open_lock()
111 cache->cache.info.u.nscookiejar.filepath); in nsc_backing_open_lock()
119 nsc_backing_close_unlock(lws_cache_nscookiejar_t *cache, int fd) in nsc_backing_close_unlock() argument
126 cache->cache.info.u.nscookiejar.filepath); in nsc_backing_close_unlock()
150 nscookiejar_iterate(lws_cache_nscookiejar_t *cache, int fd, in nscookiejar_iterate() argument
190 e = cb(cache, opaque, r | LCN_EOL, temp, in nscookiejar_iterate()
218 e = cb(cache, opaque, in nscookiejar_iterate()
[all …]
/third_party/mesa3d/src/util/
Ddisk_cache.c76 struct disk_cache *cache = NULL; in disk_cache_create() local
91 cache = rzalloc(NULL, struct disk_cache); in disk_cache_create()
92 if (cache == NULL) in disk_cache_create()
96 cache->path_init_failed = true; in disk_cache_create()
110 cache->path = ralloc_strdup(cache, path); in disk_cache_create()
111 if (cache->path == NULL) in disk_cache_create()
115 if (!disk_cache_load_cache_index(local, cache)) in disk_cache_create()
119 if (!disk_cache_mmap_cache_index(local, cache, path)) in disk_cache_create()
162 cache->max_size = max_size; in disk_cache_create()
174 if (!util_queue_init(&cache->cache_queue, "disk$", 32, 4, in disk_cache_create()
[all …]
/third_party/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_program_cache.c119 search_cache(struct brw_cache *cache, GLuint hash, in search_cache() argument
127 for (c = cache->items[hash % cache->size]; c; c = c->next) in search_cache()
130 fprintf(stderr, "bucket %d/%d = %d/%d items\n", hash % cache->size, in search_cache()
131 cache->size, bucketcount, cache->n_items); in search_cache()
134 for (c = cache->items[hash % cache->size]; c; c = c->next) { in search_cache()
144 rehash(struct brw_cache *cache) in rehash() argument
150 size = cache->size * 3; in rehash()
153 for (i = 0; i < cache->size; i++) in rehash()
154 for (c = cache->items[i]; c; c = next) { in rehash()
160 free(cache->items); in rehash()
[all …]
/third_party/mesa3d/src/amd/vulkan/
Dradv_pipeline_cache.c46 radv_pipeline_cache_lock(struct radv_pipeline_cache *cache) in radv_pipeline_cache_lock() argument
48 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT) in radv_pipeline_cache_lock()
51 mtx_lock(&cache->mutex); in radv_pipeline_cache_lock()
55 radv_pipeline_cache_unlock(struct radv_pipeline_cache *cache) in radv_pipeline_cache_unlock() argument
57 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT) in radv_pipeline_cache_unlock()
60 mtx_unlock(&cache->mutex); in radv_pipeline_cache_unlock()
64 radv_pipeline_cache_init(struct radv_pipeline_cache *cache, struct radv_device *device) in radv_pipeline_cache_init() argument
66 vk_object_base_init(&device->vk, &cache->base, VK_OBJECT_TYPE_PIPELINE_CACHE); in radv_pipeline_cache_init()
68 cache->device = device; in radv_pipeline_cache_init()
69 mtx_init(&cache->mutex, mtx_plain); in radv_pipeline_cache_init()
[all …]
/third_party/node/deps/npm/node_modules/cacache/locales/
Den.js16 x.ls = cache => ls(cache) argument
17 x.ls.stream = cache => ls.stream(cache) argument
19 x.get = (cache, key, opts) => get(cache, key, opts) argument
20 x.get.byDigest = (cache, hash, opts) => get.byDigest(cache, hash, opts) argument
21 x.get.sync = (cache, key, opts) => get.sync(cache, key, opts) argument
22 x.get.sync.byDigest = (cache, key, opts) => get.sync.byDigest(cache, key, opts) argument
23 x.get.stream = (cache, key, opts) => get.stream(cache, key, opts) argument
24 x.get.stream.byDigest = (cache, hash, opts) => get.stream.byDigest(cache, hash, opts) argument
25 x.get.copy = (cache, key, dest, opts) => get.copy(cache, key, dest, opts) argument
26 x.get.copy.byDigest = (cache, hash, dest, opts) => get.copy.byDigest(cache, hash, dest, opts) argument
[all …]
Des.js16 x.ls = cache => ls(cache) argument
17 x.ls.flujo = cache => ls.stream(cache) argument
19 x.saca = (cache, clave, ops) => get(cache, clave, ops) argument
20 x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops) argument
21 x.saca.sinc = (cache, clave, ops) => get.sync(cache, clave, ops) argument
22 x.saca.sinc.porHacheo = (cache, hacheo, ops) => get.sync.byDigest(cache, hacheo, ops) argument
23 x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops) argument
24 x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops) argument
25 x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts) argument
26 x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino… argument
[all …]
/third_party/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 …]
/third_party/alsa-utils/axfer/
Dframe-cache.c11 static void align_frames_in_i(struct frame_cache *cache, in align_frames_in_i() argument
14 char *buf = cache->buf; in align_frames_in_i()
18 cache->remained_count -= consumed_count; in align_frames_in_i()
20 offset = cache->bytes_per_sample * cache->samples_per_frame * in align_frames_in_i()
22 size = cache->bytes_per_sample * cache->samples_per_frame * in align_frames_in_i()
23 cache->remained_count; in align_frames_in_i()
26 cache->buf_ptr = buf + size; in align_frames_in_i()
29 static void align_frames_in_n(struct frame_cache *cache, in align_frames_in_n() argument
32 char **bufs = cache->buf; in align_frames_in_n()
33 char **buf_ptrs = cache->buf_ptr; in align_frames_in_n()
[all …]
/third_party/mesa3d/src/broadcom/vulkan/
Dv3dv_pipeline_cache.c55 cache_dump_stats(struct v3dv_pipeline_cache *cache) in cache_dump_stats() argument
57 fprintf(stderr, " NIR cache entries: %d\n", cache->nir_stats.count); in cache_dump_stats()
58 fprintf(stderr, " NIR cache miss count: %d\n", cache->nir_stats.miss); in cache_dump_stats()
59 fprintf(stderr, " NIR cache hit count: %d\n", cache->nir_stats.hit); in cache_dump_stats()
61 fprintf(stderr, " cache entries: %d\n", cache->stats.count); in cache_dump_stats()
62 fprintf(stderr, " cache miss count: %d\n", cache->stats.miss); in cache_dump_stats()
63 fprintf(stderr, " cache hit count: %d\n", cache->stats.hit); in cache_dump_stats()
67 pipeline_cache_lock(struct v3dv_pipeline_cache *cache) in pipeline_cache_lock() argument
69 if (!cache->externally_synchronized) in pipeline_cache_lock()
70 pthread_mutex_lock(&cache->mutex); in pipeline_cache_lock()
[all …]
/third_party/mesa3d/src/util/tests/cache/
Dcache_test.c160 does_cache_contain(struct disk_cache *cache, const cache_key key) in does_cache_contain() argument
164 result = disk_cache_get(cache, key, NULL); in does_cache_contain()
175 cache_exists(struct disk_cache *cache) in cache_exists() argument
180 if (!cache) in cache_exists()
183 disk_cache_compute_key(cache, data, sizeof(data), key); in cache_exists()
184 disk_cache_put(cache, key, data, sizeof(data), NULL); in cache_exists()
185 disk_cache_wait_for_idle(cache); in cache_exists()
186 void *result = disk_cache_get(cache, key, NULL); in cache_exists()
197 struct disk_cache *cache; in test_disk_cache_create() local
204 cache = disk_cache_create("test", "make_check", 0); in test_disk_cache_create()
[all …]
/third_party/glib/gio/xdgmime/
Dxdgmimecache.c42 #warning Building xdgmime without MMAP support. Binary "mime.info" cache files will not be used.
84 #define GET_UINT16(cache,offset) (ntohs(*(xdg_uint16_t*)((cache) + (offset)))) argument
85 #define GET_UINT32(cache,offset) (ntohl(*(xdg_uint32_t*)((cache) + (offset)))) argument
88 _xdg_mime_cache_ref (XdgMimeCache *cache) in _xdg_mime_cache_ref() argument
90 cache->ref_count++; in _xdg_mime_cache_ref()
91 return cache; in _xdg_mime_cache_ref()
95 _xdg_mime_cache_unref (XdgMimeCache *cache) in _xdg_mime_cache_unref() argument
97 cache->ref_count--; in _xdg_mime_cache_unref()
99 if (cache->ref_count == 0) in _xdg_mime_cache_unref()
102 munmap (cache->buffer, cache->size); in _xdg_mime_cache_unref()
[all …]
/third_party/glib/glib/deprecated/
Dgcache.c181 GCache *cache; in g_cache_new() local
191 cache = g_slice_new (GCache); in g_cache_new()
192 cache->value_new_func = value_new_func; in g_cache_new()
193 cache->value_destroy_func = value_destroy_func; in g_cache_new()
194 cache->key_dup_func = key_dup_func; in g_cache_new()
195 cache->key_destroy_func = key_destroy_func; in g_cache_new()
196 cache->key_table = g_hash_table_new (hash_key_func, key_equal_func); in g_cache_new()
197 cache->value_table = g_hash_table_new (hash_value_func, NULL); in g_cache_new()
199 return cache; in g_cache_new()
214 g_cache_destroy (GCache *cache) in g_cache_destroy() argument
[all …]
/third_party/gstreamer/gstreamer/gst/
Dgstregistrybinary.c106 BinaryRegistryCache *cache = g_slice_new0 (BinaryRegistryCache); in gst_registry_binary_cache_init() local
107 cache->location = location; in gst_registry_binary_cache_init()
108 return cache; in gst_registry_binary_cache_init()
112 gst_registry_binary_cache_write (BinaryRegistryCache * cache, in gst_registry_binary_cache_write() argument
115 cache->len = MAX (offset + length, cache->len); in gst_registry_binary_cache_write()
116 cache->mem = g_realloc (cache->mem, cache->len); in gst_registry_binary_cache_write()
118 memcpy (cache->mem + offset, data, length); in gst_registry_binary_cache_write()
124 gst_registry_binary_cache_finish (BinaryRegistryCache * cache, gboolean success) in gst_registry_binary_cache_finish() argument
128 if (!g_file_set_contents (cache->location, (const gchar *) cache->mem, in gst_registry_binary_cache_finish()
129 cache->len, &error)) { in gst_registry_binary_cache_finish()
[all …]
/third_party/mesa3d/src/intel/vulkan/
Danv_pipeline_cache.c309 anv_pipeline_cache_init(struct anv_pipeline_cache *cache, in anv_pipeline_cache_init() argument
314 vk_object_base_init(&device->vk, &cache->base, in anv_pipeline_cache_init()
316 cache->device = device; in anv_pipeline_cache_init()
317 cache->external_sync = external_sync; in anv_pipeline_cache_init()
318 pthread_mutex_init(&cache->mutex, NULL); in anv_pipeline_cache_init()
321 cache->cache = _mesa_hash_table_create(NULL, shader_bin_key_hash_func, in anv_pipeline_cache_init()
323 cache->nir_cache = _mesa_hash_table_create(NULL, sha1_hash_func, in anv_pipeline_cache_init()
326 cache->cache = NULL; in anv_pipeline_cache_init()
327 cache->nir_cache = NULL; in anv_pipeline_cache_init()
332 anv_pipeline_cache_finish(struct anv_pipeline_cache *cache) in anv_pipeline_cache_finish() argument
[all …]

12345678910>>...118