/third_party/skia/third_party/externals/swiftshader/tests/SystemUnitTests/ |
H A D | LRUCacheTests.cpp | 27 void checkRange(const Cache &cache, std::vector<std::pair<typename Cache::Key, typename Cache::Data>> list) in checkRange() argument 30 for(auto it : cache) in checkRange() 46 LRUCache<std::string, std::string> cache(8); in TEST() 47 ASSERT_EQ(cache.lookup(""), ""); in TEST() 48 ASSERT_EQ(cache.lookup("123"), ""); in TEST() 50 for(auto ignored : cache) in TEST() 57 FAIL() << "Should not loop on empty cache"; in TEST() 63 LRUCache<std::string, std::string> cache(4); in TEST() 65 cache.add("1", "one"); in TEST() 66 cache in TEST() [all...] |
/third_party/ntfs-3g/libntfs-3g/ |
H A D | cache.c | 2 * cache.c : deal with LRU caches 35 #include "cache.h" 48 * in the cache. Another function may be provided for invalidating 63 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 in inserthashindex() 103 drophashindex(struct CACHE_HEADER *cache, const struct CACHED_GENERIC *current, int hash) drophashindex() argument 147 ntfs_fetch_cache(struct CACHE_HEADER *cache, const struct CACHED_GENERIC *wanted, cache_compare compare) ntfs_fetch_cache() argument 212 ntfs_enter_cache(struct CACHE_HEADER *cache, const struct CACHED_GENERIC *item, cache_compare compare) ntfs_enter_cache() argument 335 do_invalidate(struct CACHE_HEADER *cache, struct CACHED_GENERIC *current, int flags) do_invalidate() argument 374 ntfs_invalidate_cache(struct CACHE_HEADER *cache, const struct CACHED_GENERIC *item, cache_compare compare, int flags) ntfs_invalidate_cache() argument 432 ntfs_remove_cache(struct CACHE_HEADER *cache, struct CACHED_GENERIC *item, int flags) ntfs_remove_cache() argument 451 ntfs_free_cache(struct CACHE_HEADER *cache) ntfs_free_cache() argument 477 struct CACHE_HEADER *cache; ntfs_create_cache() local [all...] |
/third_party/mesa3d/src/gallium/auxiliary/util/ |
H A D | u_cache.c | 30 * Improved cache implementation. 74 /** Max entries in the cache */ 80 /** Number of entries in the cache */ 89 ensure_sanity(const struct util_cache *cache); 94 * Create a new cache with 'size' entries. Also provide functions for 103 struct util_cache *cache; in util_cache_create() local 105 cache = CALLOC_STRUCT(util_cache); in util_cache_create() 106 if (!cache) in util_cache_create() 109 cache->hash = hash; in util_cache_create() 110 cache in util_cache_create() 133 util_cache_entry_get(struct util_cache *cache, uint32_t hash, const void *key) util_cache_entry_get() argument 170 util_cache_entry_destroy(struct util_cache *cache, struct util_cache_entry *entry) util_cache_entry_destroy() argument 195 util_cache_set(struct util_cache *cache, void *key, void *value) util_cache_set() argument 235 util_cache_get(struct util_cache *cache, const void *key) util_cache_get() argument 262 util_cache_clear(struct util_cache *cache) util_cache_clear() argument 285 util_cache_destroy(struct util_cache *cache) util_cache_destroy() argument 317 util_cache_remove(struct util_cache *cache, const void *key) util_cache_remove() argument 341 ensure_sanity(const struct util_cache *cache) ensure_sanity() argument [all...] |
/third_party/skia/third_party/externals/freetype/src/cache/ |
H A D | ftccache.c | 5 * The FreeType internal cache interface (body). 27 #define FT_COMPONENT cache 86 /* get a top bucket for specified hash from cache, 87 * body for FTC_NODE_TOP_FOR_HASH( cache, hash ) 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() 274 FTC_Cache cache; ftc_node_destroy() local 414 ftc_cache_add( FTC_Cache cache, FT_Offset hash, FTC_Node node ) ftc_cache_add() argument 562 FTC_Cache_RemoveFaceID( FTC_Cache cache, FTC_FaceID face_id ) FTC_Cache_RemoveFaceID() argument [all...] |
H A D | ftcglyph.c | 5 * FreeType Glyph Image (FT_Glyph) cache (body). 28 /* create a new chunk node, setting its cache index and ref count */ 42 FTC_Cache cache ) in FTC_GNode_UnselectFamily() 49 FTC_FAMILY_FREE( family, cache ); in FTC_GNode_UnselectFamily() 55 FTC_Cache cache ) in FTC_GNode_Done() 60 FTC_GNode_UnselectFamily( gnode, cache ); in FTC_GNode_Done() 67 FTC_Cache cache, in FT_LOCAL_DEF() 72 FT_UNUSED( cache ); in FT_LOCAL_DEF() 87 FTC_Cache cache, in FT_LOCAL_DEF() 91 cache, list_change in FT_LOCAL_DEF() 120 FTC_GCache cache = (FTC_GCache)ftccache; FT_LOCAL_DEF() local 154 FTC_GCache cache = (FTC_GCache)ftccache; ftc_gcache_done() local [all...] |
/third_party/mesa3d/src/mesa/program/ |
H A D | prog_cache.c | 84 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 in clear_cache() 143 struct gl_program_cache *cache = CALLOC_STRUCT(gl_program_cache); _mesa_new_program_cache() local 158 _mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *cache) _mesa_delete_program_cache() argument 166 _mesa_delete_shader_cache(struct gl_context *ctx, struct gl_program_cache *cache) _mesa_delete_shader_cache() argument 176 _mesa_search_program_cache(struct gl_program_cache *cache, const void *key, GLuint keysize) _mesa_search_program_cache() argument 204 _mesa_program_cache_insert(struct gl_context *ctx, struct gl_program_cache *cache, const void *key, GLuint keysize, struct gl_program *program) _mesa_program_cache_insert() argument 233 _mesa_shader_cache_insert(struct gl_context *ctx, struct gl_program_cache *cache, const void *key, GLuint keysize, struct gl_shader_program *program) _mesa_shader_cache_insert() argument [all...] |
/third_party/mesa3d/src/broadcom/vulkan/ |
H A D | v3dv_pipeline_cache.c | 55 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 mis in cache_dump_stats() 69 pipeline_cache_lock(struct v3dv_pipeline_cache *cache) pipeline_cache_lock() argument 76 pipeline_cache_unlock(struct v3dv_pipeline_cache *cache) pipeline_cache_unlock() argument 83 v3dv_pipeline_cache_upload_nir(struct v3dv_pipeline *pipeline, struct v3dv_pipeline_cache *cache, nir_shader *nir, unsigned char sha1_key[20]) v3dv_pipeline_cache_upload_nir() argument 145 v3dv_pipeline_cache_search_for_nir(struct v3dv_pipeline *pipeline, struct v3dv_pipeline_cache *cache, const nir_shader_compiler_options *nir_options, unsigned char sha1_key[20]) v3dv_pipeline_cache_search_for_nir() argument 202 v3dv_pipeline_cache_init(struct v3dv_pipeline_cache *cache, struct v3dv_device *device, VkPipelineCacheCreateFlags flags, bool cache_enabled) v3dv_pipeline_cache_init() argument 251 v3dv_pipeline_cache_search_for_pipeline(struct v3dv_pipeline_cache *cache, unsigned char sha1_key[20], bool *cache_hit) v3dv_pipeline_cache_search_for_pipeline() argument 373 v3dv_pipeline_shared_data_new(struct v3dv_pipeline_cache *cache, const unsigned char sha1_key[20], struct v3dv_descriptor_maps **maps, struct v3dv_shader_variant **variants, const uint64_t *total_assembly, const uint32_t total_assembly_size) v3dv_pipeline_shared_data_new() argument 426 pipeline_cache_upload_shared_data(struct v3dv_pipeline_cache *cache, struct v3dv_pipeline_shared_data *shared_data, bool from_disk_cache) pipeline_cache_upload_shared_data() argument 498 v3dv_pipeline_cache_upload_pipeline(struct v3dv_pipeline *pipeline, struct v3dv_pipeline_cache *cache) v3dv_pipeline_cache_upload_pipeline() argument 505 serialized_nir_create_from_blob(struct v3dv_pipeline_cache *cache, struct blob_reader *blob) serialized_nir_create_from_blob() argument 575 v3dv_pipeline_shared_data_create_from_blob(struct v3dv_pipeline_cache *cache, struct blob_reader *blob) v3dv_pipeline_shared_data_create_from_blob() argument 644 pipeline_cache_load(struct v3dv_pipeline_cache *cache, size_t size, const void *data) pipeline_cache_load() argument 717 struct v3dv_pipeline_cache *cache; v3dv_CreatePipelineCache() local 743 v3dv_pipeline_cache_finish(struct v3dv_pipeline_cache *cache) v3dv_pipeline_cache_finish() argument [all...] |
/third_party/mesa3d/src/virtio/vulkan/ |
H A D | vn_renderer_internal.c | 12 vn_renderer_shmem_cache_init(struct vn_renderer_shmem_cache *cache, in vn_renderer_shmem_cache_init() argument 16 /* cache->bucket_mask is 32-bit and u_bit_scan is used */ in vn_renderer_shmem_cache_init() 17 static_assert(ARRAY_SIZE(cache->buckets) <= 32, ""); in vn_renderer_shmem_cache_init() 19 cache->renderer = renderer; in vn_renderer_shmem_cache_init() 20 cache->destroy_func = destroy_func; in vn_renderer_shmem_cache_init() 22 simple_mtx_init(&cache->mutex, mtx_plain); in vn_renderer_shmem_cache_init() 24 for (uint32_t i = 0; i < ARRAY_SIZE(cache->buckets); i++) { in vn_renderer_shmem_cache_init() 25 struct vn_renderer_shmem_bucket *bucket = &cache->buckets[i]; in vn_renderer_shmem_cache_init() 29 cache->initialized = true; in vn_renderer_shmem_cache_init() 33 vn_renderer_shmem_cache_fini(struct vn_renderer_shmem_cache *cache) in vn_renderer_shmem_cache_fini() argument 51 choose_bucket(struct vn_renderer_shmem_cache *cache, size_t size, int *out_idx) choose_bucket() argument 68 vn_renderer_shmem_cache_remove_expired_locked( struct vn_renderer_shmem_cache *cache, int64_t now) vn_renderer_shmem_cache_remove_expired_locked() argument 94 vn_renderer_shmem_cache_add(struct vn_renderer_shmem_cache *cache, struct vn_renderer_shmem *shmem) vn_renderer_shmem_cache_add() argument 121 vn_renderer_shmem_cache_get(struct vn_renderer_shmem_cache *cache, size_t size) vn_renderer_shmem_cache_get() argument 158 vn_renderer_shmem_cache_debug_dump(struct vn_renderer_shmem_cache *cache) vn_renderer_shmem_cache_debug_dump() argument [all...] |
/third_party/libwebsockets/lib/misc/cache-ttl/ |
H A D | heap.c | 26 #include "private-lib-misc-cache-ttl.h" 33 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 in _lws_cache_heap_item_destroy() 74 lws_cache_heap_item_destroy(lws_cache_ttl_lru_t_heap_t *cache, lws_cache_ttl_item_heap_t *item, int parent_too) lws_cache_heap_item_destroy() argument 153 lws_cache_item_evict_lru(lws_cache_ttl_lru_t_heap_t *cache) lws_cache_item_evict_lru() argument 173 lws_cache_ttl_lru_t_heap_t *cache = lws_container_of(sul, expiry_cb() local 197 earliest_expiry(lws_cache_ttl_lru_t_heap_t *cache, lws_usec_t *pearliest) earliest_expiry() argument 213 update_sul(lws_cache_ttl_lru_t_heap_t *cache) update_sul() argument 234 lws_cache_heap_specific(lws_cache_ttl_lru_t_heap_t *cache, const char *specific_key) lws_cache_heap_specific() argument 252 lws_cache_heap_tag_match(struct lws_cache_ttl_lru *cache, const char *wc, const char *tag, char lookup_rules) lws_cache_heap_tag_match() argument 262 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_lookup() local 326 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_write() local 428 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_get() local 450 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_invalidate() local 499 lws_cache_ttl_lru_t_heap_t *cache; lws_cache_heap_create() local 522 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; destroy_dll() local 534 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_expunge() local 545 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)c; lws_cache_heap_destroy() local 576 lws_cache_ttl_lru_t_heap_t *cache = (lws_cache_ttl_lru_t_heap_t *)_c; lws_cache_heap_debug_dump() local [all...] |
H A D | file.c | 24 * Implements a cache backing store compatible with netscape cookies.txt format 55 #include "private-lib-misc-cache-ttl.h" 68 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 in nsc_backing_open_lock() 119 nsc_backing_close_unlock(lws_cache_nscookiejar_t *cache, int fd) nsc_backing_close_unlock() argument 150 nscookiejar_iterate(lws_cache_nscookiejar_t *cache, int fd, nsc_cb_t cb, void *opaque) nscookiejar_iterate() argument 307 lws_cache_nscookiejar_tag_match(struct lws_cache_ttl_lru *cache, const char *wc, const char *tag, char lookup) lws_cache_nscookiejar_tag_match() argument 427 nsc_lookup_cb(lws_cache_nscookiejar_t *cache, void *opaque, int flags, const char *buf, size_t size) nsc_lookup_cb() argument 487 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_lookup() local 540 nsc_regen_cb(lws_cache_nscookiejar_t *cache, void *opaque, int flags, const char *buf, size_t size) nsc_regen_cb() argument 599 nsc_regen(lws_cache_nscookiejar_t *cache, const char *wc_delete, const void *pay, size_t pay_size) nsc_regen() argument 682 lws_cache_nscookiejar_t *cache = lws_container_of(sul, expiry_cb() local 705 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_write() local 742 nsc_get_cb(lws_cache_nscookiejar_t *cache, void *opaque, int flags, const char *buf, size_t size) nsc_get_cb() argument 831 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_get() local 861 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_invalidate() local 869 lws_cache_nscookiejar_t *cache; lws_cache_nscookiejar_create() local 892 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_expunge() local 909 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)*_pc; lws_cache_nscookiejar_destroy() local 922 nsc_dump_cb(lws_cache_nscookiejar_t *cache, void *opaque, int flags, const char *buf, size_t size) nsc_dump_cb() argument 933 lws_cache_nscookiejar_t *cache = (lws_cache_nscookiejar_t *)_c; lws_cache_nscookiejar_debug_dump() local [all...] |
H A D | lws-cache-ttl.c | 26 #include "private-lib-misc-cache-ttl.h" 46 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() 72 /* starting from outermost cache leve in lws_cache_write_through() 91 lws_cache_lookup(struct lws_cache_ttl_lru *cache, const char *wildcard_key, const void **pdata, size_t *psize) lws_cache_lookup() argument 203 lws_cache_item_get(struct lws_cache_ttl_lru *cache, const char *specific_key, const void **pdata, size_t *psize) lws_cache_item_get() argument 219 lws_cache_expunge(struct lws_cache_ttl_lru *cache) lws_cache_expunge() argument 233 lws_cache_item_remove(struct lws_cache_ttl_lru *cache, const char *wildcard_key) lws_cache_item_remove() argument 246 lws_cache_footprint(struct lws_cache_ttl_lru *cache) lws_cache_footprint() argument 252 lws_cache_debug_dump(struct lws_cache_ttl_lru *cache) lws_cache_debug_dump() argument 290 lws_cache_ttl_lru_t *cache = *_cache; lws_cache_destroy() local [all...] |
/third_party/alsa-utils/axfer/ |
H A D | frame-cache.c | 3 // frame-cache.c - maintainer of cache for data frame. 9 #include "frame-cache.h" 11 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 in align_frames_in_i() 29 align_frames_in_n(struct frame_cache *cache, unsigned int consumed_count) align_frames_in_n() argument 48 frame_cache_init(struct frame_cache *cache, snd_pcm_access_t access, unsigned int bytes_per_sample, unsigned int samples_per_frame, unsigned int frames_per_cache) frame_cache_init() argument 100 frame_cache_destroy(struct frame_cache *cache) frame_cache_destroy() argument [all...] |
/third_party/icu/icu4c/source/test/intltest/ |
H A D | unifiedcachetest.cpp | 98 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() 126 cache.setEvictionPolicy(0, 100, status); in TestEvictionPolicy() 137 cache in TestEvictionPolicy() 139 &cache, TestEvictionPolicy() local 149 &cache, TestEvictionPolicy() local 299 const UnifiedCache *cache = UnifiedCache::getInstance(status); TestBasic() local 354 const UnifiedCache *cache = UnifiedCache::getInstance(status); TestError() local [all...] |
/third_party/mesa3d/src/amd/vulkan/ |
H A D | radv_pipeline_cache.c | 48 radv_pipeline_cache_lock(struct radv_pipeline_cache *cache) in radv_pipeline_cache_lock() argument 50 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT) in radv_pipeline_cache_lock() 53 mtx_lock(&cache->mutex); in radv_pipeline_cache_lock() 57 radv_pipeline_cache_unlock(struct radv_pipeline_cache *cache) in radv_pipeline_cache_unlock() argument 59 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT) in radv_pipeline_cache_unlock() 62 mtx_unlock(&cache->mutex); in radv_pipeline_cache_unlock() 76 radv_pipeline_cache_init(struct radv_pipeline_cache *cache, struct radv_device *device) in radv_pipeline_cache_init() argument 78 vk_object_base_init(&device->vk, &cache->base, VK_OBJECT_TYPE_PIPELINE_CACHE); in radv_pipeline_cache_init() 80 cache->device = device; in radv_pipeline_cache_init() 81 mtx_init(&cache in radv_pipeline_cache_init() 101 radv_pipeline_cache_finish(struct radv_pipeline_cache *cache) radv_pipeline_cache_finish() argument 209 radv_pipeline_cache_search_unlocked(struct radv_pipeline_cache *cache, const unsigned char *sha1) radv_pipeline_cache_search_unlocked() argument 233 radv_pipeline_cache_search(struct radv_pipeline_cache *cache, const unsigned char *sha1) radv_pipeline_cache_search() argument 247 radv_pipeline_cache_set_entry(struct radv_pipeline_cache *cache, struct cache_entry *entry) radv_pipeline_cache_set_entry() argument 268 radv_pipeline_cache_grow(struct radv_pipeline_cache *cache) radv_pipeline_cache_grow() argument 300 radv_pipeline_cache_add_entry(struct radv_pipeline_cache *cache, struct cache_entry *entry) radv_pipeline_cache_add_entry() argument 313 radv_create_shaders_from_pipeline_cache( struct radv_device *device, struct radv_pipeline_cache *cache, const unsigned char *sha1, struct radv_pipeline *pipeline, struct radv_pipeline_shader_stack_size **stack_sizes, uint32_t *num_stack_sizes, bool *found_in_application_cache) radv_create_shaders_from_pipeline_cache() argument 445 radv_pipeline_cache_insert_shaders(struct radv_device *device, struct radv_pipeline_cache *cache, const unsigned char *sha1, struct radv_pipeline *pipeline, struct radv_shader_binary *const *binaries, const struct radv_pipeline_shader_stack_size *stack_sizes, uint32_t num_stack_sizes) radv_pipeline_cache_insert_shaders() argument 565 radv_pipeline_cache_load(struct radv_pipeline_cache *cache, const void *data, size_t size) radv_pipeline_cache_load() argument 613 struct radv_pipeline_cache *cache; radv_CreatePipelineCache() local [all...] |
/third_party/mesa3d/src/util/ |
H A D | disk_cache.c | 51 /* The cache version should be bumped whenever a change is made to the 52 * structure of cache entries or the index. This will give any 3rd party 53 * applications reading the cache entries a chance to adjust to the changes. 55 * - The cache version is checked internally when reading a cache entry. If we 56 * ever have a mismatch we are in big trouble as this means we had a cache 60 * - There is no strict requirement that cache versions be backwards 76 struct disk_cache *cache = NULL; in disk_cache_create() local 91 cache = rzalloc(NULL, struct disk_cache); in disk_cache_create() 92 if (cache in disk_cache_create() 239 disk_cache_destroy(struct disk_cache *cache) disk_cache_destroy() argument 255 disk_cache_wait_for_idle(struct disk_cache *cache) disk_cache_wait_for_idle() argument 261 disk_cache_remove(struct disk_cache *cache, const cache_key key) disk_cache_remove() argument 272 create_put_job(struct disk_cache *cache, const cache_key key, void *data, size_t size, struct cache_item_metadata *cache_item_metadata, bool take_ownership) create_put_job() argument 370 disk_cache_put(struct disk_cache *cache, const cache_key key, const void *data, size_t size, struct cache_item_metadata *cache_item_metadata) disk_cache_put() argument 393 disk_cache_put_nocopy(struct disk_cache *cache, const cache_key key, void *data, size_t size, struct cache_item_metadata *cache_item_metadata) disk_cache_put_nocopy() argument 419 disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size) disk_cache_get() argument 458 disk_cache_put_key(struct disk_cache *cache, const cache_key key) disk_cache_put_key() argument 485 disk_cache_has_key(struct disk_cache *cache, const cache_key key) disk_cache_has_key() argument 505 disk_cache_compute_key(struct disk_cache *cache, const void *data, size_t size, cache_key key) disk_cache_compute_key() argument 518 disk_cache_set_callbacks(struct disk_cache *cache, disk_cache_put_cb put, disk_cache_get_cb get) disk_cache_set_callbacks() argument [all...] |
/third_party/mesa3d/src/util/tests/ |
H A D | cache_test.cpp | 24 /* A collection of unit tests for cache.c */ 96 does_cache_contain(struct disk_cache *cache, const cache_key key) in does_cache_contain() argument 100 result = disk_cache_get(cache, key, NULL); in does_cache_contain() 111 cache_exists(struct disk_cache *cache) in cache_exists() argument 116 if (!cache) in cache_exists() 119 disk_cache_compute_key(cache, data, sizeof(data), key); in cache_exists() 120 disk_cache_put(cache, key, data, sizeof(data), NULL); in cache_exists() 121 disk_cache_wait_for_idle(cache); in cache_exists() 122 void *result = disk_cache_get(cache, key, NULL); in cache_exists() 128 #define CACHE_TEST_TMP "./cache 133 struct disk_cache *cache; test_disk_cache_create() local 229 struct disk_cache *cache; test_put_and_get() local 407 struct disk_cache *cache; test_put_key_and_get_key() local [all...] |
/third_party/mesa3d/src/vulkan/runtime/ |
H A D | vk_pipeline_cache.c | 144 vk_pipeline_cache_lock(struct vk_pipeline_cache *cache) in vk_pipeline_cache_lock() argument 147 if (!(cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT)) in vk_pipeline_cache_lock() 148 simple_mtx_lock(&cache->lock); in vk_pipeline_cache_lock() 152 vk_pipeline_cache_unlock(struct vk_pipeline_cache *cache) in vk_pipeline_cache_unlock() argument 154 if (!(cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT)) in vk_pipeline_cache_unlock() 155 simple_mtx_unlock(&cache->lock); in vk_pipeline_cache_unlock() 159 vk_pipeline_cache_remove_object(struct vk_pipeline_cache *cache, in vk_pipeline_cache_remove_object() argument 163 vk_pipeline_cache_lock(cache); in vk_pipeline_cache_remove_object() 165 _mesa_set_search_pre_hashed(cache->object_cache, hash, object); in vk_pipeline_cache_remove_object() 167 /* Drop the reference owned by the cache */ in vk_pipeline_cache_remove_object() 180 vk_pipeline_cache_replace_object(struct vk_pipeline_cache *cache, uint32_t hash, struct vk_pipeline_cache_object *search, struct vk_pipeline_cache_object *replace) vk_pipeline_cache_replace_object() argument 219 vk_pipeline_cache_object_serialize(struct vk_pipeline_cache *cache, struct vk_pipeline_cache_object *object, struct blob *blob, uint32_t *data_size) vk_pipeline_cache_object_serialize() argument 269 vk_pipeline_cache_object_deserialize(struct vk_pipeline_cache *cache, const void *key_data, uint32_t key_size, const void *data, size_t data_size, const struct vk_pipeline_cache_object_ops *ops) vk_pipeline_cache_object_deserialize() argument 306 vk_pipeline_cache_lookup_object(struct vk_pipeline_cache *cache, const void *key_data, size_t key_size, const struct vk_pipeline_cache_object_ops *ops, bool *cache_hit) vk_pipeline_cache_lookup_object() argument 390 vk_pipeline_cache_add_object(struct vk_pipeline_cache *cache, struct vk_pipeline_cache_object *object) vk_pipeline_cache_add_object() argument 446 vk_pipeline_cache_lookup_nir(struct vk_pipeline_cache *cache, const void *key_data, size_t key_size, const struct nir_shader_compiler_options *nir_options, bool *cache_hit, void *mem_ctx) vk_pipeline_cache_lookup_nir() argument 475 vk_pipeline_cache_add_nir(struct vk_pipeline_cache *cache, const void *key_data, size_t key_size, const nir_shader *nir) vk_pipeline_cache_add_nir() argument 532 vk_pipeline_cache_load(struct vk_pipeline_cache *cache, const void *data, size_t size) vk_pipeline_cache_load() argument 580 struct vk_pipeline_cache *cache; vk_pipeline_cache_create() local 629 vk_pipeline_cache_destroy(struct vk_pipeline_cache *cache, const VkAllocationCallbacks *pAllocator) vk_pipeline_cache_destroy() argument 645 struct vk_pipeline_cache *cache; vk_common_CreatePipelineCache() local [all...] |
/third_party/elfutils/libdw/ |
H A D | fde.c | 66 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() 131 /* There is already an FDE in the cache that covers the same in intern_fde() 133 the one in the cache for consistency. */ 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 in __libdw_fde_by_offset() 175 binary_search_fde(Dwarf_CFI *cache, Dwarf_Addr address) binary_search_fde() argument 247 __libdw_find_fde(Dwarf_CFI *cache, Dwarf_Addr address) __libdw_find_fde() argument [all...] |
H A D | encoded-value.h | 76 __libdw_cfi_read_address_inc (const Dwarf_CFI *cache, in __libdw_cfi_read_address_inc() argument 80 width = width ?: cache->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in __libdw_cfi_read_address_inc() 82 if (cache->dbg != NULL) in __libdw_cfi_read_address_inc() 83 return __libdw_read_address_inc (cache->dbg, IDX_debug_frame, in __libdw_cfi_read_address_inc() 89 const unsigned char *endp = cache->data->d.d_buf + cache->data->d.d_size; in __libdw_cfi_read_address_inc() 90 Dwarf eh_dbg = { .other_byte_order = MY_ELFDATA != cache->e_ident[EI_DATA] }; in __libdw_cfi_read_address_inc() 113 read_encoded_value (const Dwarf_CFI *cache, uint8_t encoding, in read_encoded_value() argument 122 *result = (cache->frame_vaddr in read_encoded_value() 123 + (*p - (const uint8_t *) cache in read_encoded_value() [all...] |
/third_party/mesa3d/src/gallium/drivers/svga/ |
H A D | svga_screen_cache.c | 55 * against the cache size limit, so view them as zero-sized. in svga_surface_size() 89 * Search the cache for a surface that matches the key. If a match is 90 * found, remove it from the cache and return the surface pointer. 97 struct svga_host_surface_cache *cache = &svgascreen->cache; in svga_screen_cache_lookup() local 109 mtx_lock(&cache->mutex); in svga_screen_cache_lookup() 111 curr = cache->bucket[bucket].next; in svga_screen_cache_lookup() 113 while (curr != &cache->bucket[bucket]) { in svga_screen_cache_lookup() 123 * We unlink the surface from the cache entry and we add the entry to in svga_screen_cache_lookup() 141 /* Add the cache entr in svga_screen_cache_lookup() 179 struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_shrink() local 218 struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_add() local 333 struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_flush() local 434 struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_cleanup() local 458 struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_init() local 639 const struct svga_host_surface_cache *cache = &svgascreen->cache; svga_screen_cache_dump() local [all...] |
/third_party/skia/tests/ |
H A D | ResourceCacheTest.cpp | 53 // Set the cache limits so we can fit 10 "src" images and the in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 333 GrResourceCache* cache = fDContext->priv().getResourceCache(); in Mock() local 334 cache->purgeUnlockedResources(); in Mock() 335 SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes()); in Mock() 338 GrResourceCache* cache() { return fDContext->priv().getResourceCache(); } in cache() function in Mock 352 GrResourceCache* cache = mock.cache(); in test_no_key() local 362 REPORTER_ASSERT(reporter, 4 == cache->getResourceCount()); in test_no_key() 364 d->gpuMemorySize() == cache in test_no_key() 405 GrResourceCache* cache = mock.cache(); test_purge_unlocked() local 468 GrResourceCache* cache = mock.cache(); test_purge_command_buffer_usage() local 536 GrResourceCache* cache = mock.cache(); test_budgeting() local 662 GrResourceCache* cache = mock.cache(); test_unbudgeted() local 734 GrResourceCache* cache = mock.cache(); test_unbudgeted_to_scratch() local 800 GrResourceCache* cache = mock.cache(); test_duplicate_scratch_key() local 847 GrResourceCache* cache = mock.cache(); test_remove_scratch_key() local 905 GrResourceCache* cache = mock.cache(); test_scratch_key_consistency() local 964 GrResourceCache* cache = mock.cache(); test_duplicate_unique_key() local 1057 GrResourceCache* cache = mock.cache(); test_purge_invalidated() local 1125 GrResourceCache* cache = mock.cache(); test_cache_chained_purge() local 1170 GrResourceCache* cache = mock.cache(); test_timestamp_wrap() local 1227 GrResourceCache* cache = mock.cache(); test_time_purge() local 1360 GrResourceCache* cache = mock.cache(); test_partial_purge() local 1511 GrResourceCache* cache = mock.cache(); test_tags() local 1548 GrResourceCache* cache = mock.cache(); test_free_texture_messages() local 1641 GrResourceCache* cache = dContext->priv().getResourceCache(); DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local [all...] |
/third_party/mesa3d/src/panfrost/shared/ |
H A D | pan_minmax_cache.c | 27 /* Index buffer min/max cache. We need to calculate the min/max for arbitrary 29 * be quite expensive, we cache. Conceptually, we just use a hash table mapping 34 * PANFROST_MINMAX_SIZE constant (so this is a tradeoff between cache hit/miss 35 * ratio and cache search speed). Note that keys are adjacent so we get cache 36 * line alignment benefits. Insertion is O(1) and in-order until the cache 44 panfrost_minmax_cache_get(struct panfrost_minmax_cache *cache, unsigned start, unsigned count, in panfrost_minmax_cache_get() argument 50 if (!cache) in panfrost_minmax_cache_get() 53 for (unsigned i = 0; i < cache->size; ++i) { in panfrost_minmax_cache_get() 54 if (cache in panfrost_minmax_cache_get() 68 panfrost_minmax_cache_add(struct panfrost_minmax_cache *cache, unsigned start, unsigned count, unsigned min_index, unsigned max_index) panfrost_minmax_cache_add() argument 95 panfrost_minmax_cache_invalidate(struct panfrost_minmax_cache *cache, struct pipe_transfer *transfer) panfrost_minmax_cache_invalidate() argument [all...] |
/third_party/libdrm/etnaviv/ |
H A D | etnaviv_bo_cache.c | 33 static void add_bucket(struct etna_bo_cache *cache, int size) in add_bucket() argument 35 unsigned i = cache->num_buckets; in add_bucket() 37 assert(i < ARRAY_SIZE(cache->cache_bucket)); in add_bucket() 39 list_inithead(&cache->cache_bucket[i].list); in add_bucket() 40 cache->cache_bucket[i].size = size; in add_bucket() 41 cache->num_buckets++; in add_bucket() 44 drm_private void etna_bo_cache_init(struct etna_bo_cache *cache) in etna_bo_cache_init() argument 54 * get us useful cache hit rates anyway) in etna_bo_cache_init() 56 add_bucket(cache, 4096); in etna_bo_cache_init() 57 add_bucket(cache, 409 in etna_bo_cache_init() 70 etna_bo_cache_cleanup(struct etna_bo_cache *cache, time_t time) etna_bo_cache_cleanup() argument 96 get_bucket(struct etna_bo_cache *cache, uint32_t size) get_bucket() argument 158 etna_bo_cache_alloc(struct etna_bo_cache *cache, uint32_t *size, uint32_t flags) etna_bo_cache_alloc() argument 181 etna_bo_cache_free(struct etna_bo_cache *cache, struct etna_bo *bo) etna_bo_cache_free() argument [all...] |
/third_party/mesa3d/src/etnaviv/drm/ |
H A D | etnaviv_bo_cache.c | 30 static void add_bucket(struct etna_bo_cache *cache, int size) in add_bucket() argument 32 unsigned i = cache->num_buckets; in add_bucket() 34 assert(i < ARRAY_SIZE(cache->cache_bucket)); in add_bucket() 36 list_inithead(&cache->cache_bucket[i].list); in add_bucket() 37 cache->cache_bucket[i].size = size; in add_bucket() 38 cache->num_buckets++; in add_bucket() 41 void etna_bo_cache_init(struct etna_bo_cache *cache) in etna_bo_cache_init() argument 51 * get us useful cache hit rates anyway) in etna_bo_cache_init() 53 add_bucket(cache, 4096); in etna_bo_cache_init() 54 add_bucket(cache, 409 in etna_bo_cache_init() 67 etna_bo_cache_cleanup(struct etna_bo_cache *cache, time_t time) etna_bo_cache_cleanup() argument 94 get_bucket(struct etna_bo_cache *cache, uint32_t size) get_bucket() argument 148 etna_bo_cache_alloc(struct etna_bo_cache *cache, uint32_t *size, uint32_t flags) etna_bo_cache_alloc() argument 172 etna_bo_cache_free(struct etna_bo_cache *cache, struct etna_bo *bo) etna_bo_cache_free() argument [all...] |
/third_party/mesa3d/src/freedreno/drm/ |
H A D | freedreno_bo_cache.c | 34 add_bucket(struct fd_bo_cache *cache, int size) in add_bucket() argument 36 unsigned int i = cache->num_buckets; in add_bucket() 38 assert(i < ARRAY_SIZE(cache->cache_bucket)); in add_bucket() 40 list_inithead(&cache->cache_bucket[i].list); in add_bucket() 41 cache->cache_bucket[i].size = size; in add_bucket() 42 cache->num_buckets++; in add_bucket() 50 fd_bo_cache_init(struct fd_bo_cache *cache, int coarse) in fd_bo_cache_init() argument 60 * get us useful cache hit rates anyway) in fd_bo_cache_init() 62 add_bucket(cache, 4096); in fd_bo_cache_init() 63 add_bucket(cache, 409 in fd_bo_cache_init() 80 fd_bo_cache_cleanup(struct fd_bo_cache *cache, time_t time) fd_bo_cache_cleanup() argument 110 get_bucket(struct fd_bo_cache *cache, uint32_t size) get_bucket() argument 156 fd_bo_cache_alloc(struct fd_bo_cache *cache, uint32_t *size, uint32_t flags) fd_bo_cache_alloc() argument 188 fd_bo_cache_free(struct fd_bo_cache *cache, struct fd_bo *bo) fd_bo_cache_free() argument [all...] |