| /third_party/mesa3d/src/gallium/auxiliary/util/ |
| 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->compare = compare; in util_cache_create() [all …]
|
| /third_party/skia/third_party/externals/swiftshader/tests/SystemUnitTests/ |
| D | LRUCacheTests.cpp | 26 template<typename Cache> 27 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() 57 FAIL() << "Should not loop on empty cache"; in TEST() 63 LRUCache<std::string, std::string> cache(4); in TEST() local 65 cache.add("1", "one"); in TEST() [all …]
|
| /third_party/mesa3d/src/util/ |
| D | disk_cache.c | 53 /* The cache version should be bumped whenever a change is made to the 54 * structure of cache entries or the index. This will give any 3rd party 55 * applications reading the cache entries a chance to adjust to the changes. 57 * - The cache version is checked internally when reading a cache entry. If we 58 * ever have a mismatch we are in big trouble as this means we had a cache 62 * - There is no strict requirement that cache versions be backwards 74 disk_cache_init_queue(struct disk_cache *cache) in disk_cache_init_queue() argument 76 if (util_queue_is_initialized(&cache->cache_queue)) in disk_cache_init_queue() 82 * avoiding excessive memory use due to a backlog of cache entrys building in disk_cache_init_queue() 89 return util_queue_init(&cache->cache_queue, "disk$", 32, 4, in disk_cache_init_queue() [all …]
|
| /third_party/ntfs-3g/libntfs-3g/ |
| 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->first_hash[h]; in inserthashindex() [all …]
|
| /third_party/mesa3d/src/virtio/vulkan/ |
| D | vn_renderer_internal.c | 12 vn_renderer_shmem_cache_dump(struct vn_renderer_shmem_cache *cache) in vn_renderer_shmem_cache_dump() argument 14 simple_mtx_lock(&cache->mutex); in vn_renderer_shmem_cache_dump() 16 vn_log(NULL, "dumping renderer shmem cache"); in vn_renderer_shmem_cache_dump() 17 vn_log(NULL, " cache skip: %d", cache->debug.cache_skip_count); in vn_renderer_shmem_cache_dump() 18 vn_log(NULL, " cache hit: %d", cache->debug.cache_hit_count); in vn_renderer_shmem_cache_dump() 19 vn_log(NULL, " cache miss: %d", cache->debug.cache_miss_count); in vn_renderer_shmem_cache_dump() 21 uint32_t bucket_mask = cache->bucket_mask; in vn_renderer_shmem_cache_dump() 24 const struct vn_renderer_shmem_bucket *bucket = &cache->buckets[idx]; in vn_renderer_shmem_cache_dump() 33 simple_mtx_unlock(&cache->mutex); in vn_renderer_shmem_cache_dump() 37 vn_renderer_shmem_cache_init(struct vn_renderer_shmem_cache *cache, in vn_renderer_shmem_cache_init() argument [all …]
|
| /third_party/mesa3d/src/broadcom/vulkan/ |
| D | v3dv_pipeline_cache.c | 55 cache_dump_stats(struct v3dv_pipeline_cache *cache) in cache_dump_stats() argument 57 mesa_logi(" NIR cache entries: %d\n", cache->nir_stats.count); in cache_dump_stats() 58 mesa_logi(" NIR cache miss count: %d\n", cache->nir_stats.miss); in cache_dump_stats() 59 mesa_logi(" NIR cache hit count: %d\n", cache->nir_stats.hit); in cache_dump_stats() 61 mesa_logi(" cache entries: %d\n", cache->stats.count); in cache_dump_stats() 62 mesa_logi(" cache miss count: %d\n", cache->stats.miss); in cache_dump_stats() 63 mesa_logi(" cache hit count: %d\n", cache->stats.hit); in cache_dump_stats() 65 mesa_logi(" on-disk cache hit count: %d\n", cache->stats.on_disk_hit); in cache_dump_stats() 69 pipeline_cache_lock(struct v3dv_pipeline_cache *cache) in pipeline_cache_lock() argument 71 if (!cache->externally_synchronized) in pipeline_cache_lock() [all …]
|
| /third_party/vk-gl-cts/external/amber/src/third_party/ |
| D | CMakeLists.txt | 23 set(SPIRV-Headers_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers CACHE STRING "") 24 set(SPIRV_SKIP_TESTS ON CACHE BOOL ON) 29 set(ENABLE_HLSL ON CACHE BOOL ON) 30 set(BUILD_TESTING FALSE CACHE BOOL ON) 31 set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL ON) 32 set(ENABLE_SPVREMAPPER OFF CACHE BOOL ON) 34 set(LLVM_USE_CRT_DEBUG MTd CACHE STRING "") 35 set(LLVM_USE_CRT_RELEASE MT CACHE STRING "") 36 set(LLVM_USE_CRT_RELWITHDEBINFO MT CACHE STRING "") 39 set(SHADERC_THIRD_PARTY_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "") [all …]
|
| /third_party/skia/third_party/externals/freetype/src/cache/ |
| D | ftccache.c | 5 * The FreeType internal cache interface (body). 27 #define FT_COMPONENT cache 41 /***** CACHE NODE DEFINITIONS *****/ 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() [all …]
|
| /third_party/alsa-utils/axfer/ |
| 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->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 [all …]
|
| /third_party/skia/m133/third_party/externals/icu/source/test/intltest/ |
| 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() local 126 cache.setEvictionPolicy(0, 100, status); in TestEvictionPolicy() 137 cache.get( in TestEvictionPolicy() 139 &cache, in TestEvictionPolicy() [all …]
|
| /third_party/icu/icu4c/source/test/intltest/ |
| 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() local 126 cache.setEvictionPolicy(0, 100, status); in TestEvictionPolicy() 137 cache.get( in TestEvictionPolicy() 139 &cache, in TestEvictionPolicy() [all …]
|
| /third_party/mesa3d/src/vulkan/runtime/ |
| D | vk_pipeline_cache.c | 40 #define vk_pipeline_cache_log(cache, ...) \ argument 41 if (cache->base.client_visible) \ 42 vk_logw(VK_LOG_OBJS(cache), __VA_ARGS__) 45 get_disk_cache(const struct vk_pipeline_cache *cache) in get_disk_cache() argument 47 if (cache->disk_cache) in get_disk_cache() 48 return cache->disk_cache; in get_disk_cache() 50 return cache->base.device->physical->disk_cache; in get_disk_cache() 66 vk_raw_data_cache_object_deserialize(struct vk_pipeline_cache *cache, in vk_raw_data_cache_object_deserialize() argument 81 vk_raw_data_cache_object_create(cache->base.device, key_data, key_size, in vk_raw_data_cache_object_deserialize() 147 vk_pipeline_cache_lock(struct vk_pipeline_cache *cache) in vk_pipeline_cache_lock() argument [all …]
|
| /third_party/libwebsockets/lib/misc/cache-ttl/ |
| 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.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() [all …]
|
| 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 level */ in lws_cache_write_through() 84 * We want to make a list of unique keys that exist at any cache level 91 lws_cache_lookup(struct lws_cache_ttl_lru *cache, const char *wildcard_key, in lws_cache_lookup() argument [all …]
|
| /third_party/libwebsockets/include/libwebsockets/ |
| D | lws-cache-ttl.h | 25 /** \defgroup lws_cache_ttl Cache supporting expiry 26 * ##Cache supporting expiry 29 * that have a "destroy-by date" and cache limits that will be observed. 32 * L1 / heap cache type, it can have parents and grandparents of other types 33 * which are accessible why writing / looking up and getting from the L1 cache. 34 * The outer "cache" layer may persistently store items to a backing store. 46 * you allocate new objects (to keep the whole cache under the specified limit), 56 * lws_cache_write_through() - add a new cache item object in all layers 58 * \param cache: the existing cache to allocate the object in 59 * \param specific_key: a key string that identifies the item in the cache [all …]
|
| D | lws-diskcache.h | 25 /*! \defgroup diskcache LWS disk cache 26 * ## Disk cache API 28 * Lws provides helper apis useful if you need a disk cache containing hashed 32 * The API `lws_diskcache_prepare()` deals with creating the cache dir and 34 * hash of the cache file. 37 * an opaque struct that represents the disk cache. 40 * cache dir monitoring and LRU autodelete in the background lazily. It can 42 * stateful way that stats one or more file in the cache per call, and keeps 47 * The cache size monitoring is extremely efficient in time and memory even when 48 * the cache directory becomes huge. [all …]
|
| /third_party/libcoap/include/coap3/ |
| D | coap_cache.h | 13 * @brief Provides a simple cache request storage for CoAP requests 23 * @defgroup cache Cache Support 24 * API for Cache-Key and Cache-Entry. 30 * Callback to free off the app data when the cache-entry is 48 * Calculates a cache-key for the given CoAP PDU. See 50 * for an explanation of CoAP cache keys. 52 * Specific CoAP options can be removed from the cache-key. Examples of 59 * NOTE: The returned cache-key needs to be freed off by the caller by 62 * @param session The session to add into cache-key if @p session_based 64 * @param pdu The CoAP PDU for which a cache-key is to be [all …]
|
| /third_party/mindspore/mindspore-src/source/tests/ut/python/dataset/ |
| D | test_cache_map.py | 16 Testing cache operation with mappable datasets 40 @pytest.mark.skipif(os.environ.get('RUN_CACHE_TEST') != 'TRUE', reason="Require to bring up cache s… 44 Description: Test mappable leaf with Cache op right over the leaf 50 Cache 56 logger.info("Test cache map basic 1") 65 ds1 = ds.ImageFolderDataset(dataset_dir=DATA_DIR, cache=some_cache) 76 @pytest.mark.skipif(os.environ.get('RUN_CACHE_TEST') != 'TRUE', reason="Require to bring up cache s… 80 Description: Test mappable leaf with the Cache op later in the tree above the Map (Decode) 84 Cache 92 logger.info("Test cache map basic 2") [all …]
|
| D | test_cache_nomap.py | 16 Testing cache operation with non-mappable datasets 51 @pytest.mark.skipif(os.environ.get('RUN_CACHE_TEST') != 'TRUE', reason="Require to bring up cache s… 55 …Description: Test a RandomDataset (a non mappable dataset) with a Cache over it just after the leaf 58 logger.info("Test cache nomap basic 1") 69 # create a cache. arbitrary session_id for now 73 ds1 = ds.RandomDataset(schema=schema, total_rows=10, num_parallel_workers=4, cache=some_cache) 86 @pytest.mark.skipif(os.environ.get('RUN_CACHE_TEST') != 'TRUE', reason="Require to bring up cache s… 90 …Description: Test RandomDataset (a non mappable dataset with num_samples) with a Cache over it jus… 93 logger.info("Test cache nomap basic 2") 104 # create a cache. arbitrary session_id for now [all …]
|
| /third_party/mesa3d/src/freedreno/drm/ |
| D | freedreno_bo_cache.c | 15 #define BO_CACHE_LOG(cache, fmt, ...) do { \ argument 17 mesa_logi("%s: "fmt, (cache)->name, ##__VA_ARGS__); \ 29 dump_cache_stats(struct fd_bo_cache *cache) in dump_cache_stats() argument 45 for (int i = 0; i < cache->num_buckets; i++) { in dump_cache_stats() 48 struct fd_bo_bucket *bucket = &cache->cache_bucket[i]; in dump_cache_stats() 56 BO_CACHE_LOG(cache, "bucket[%u]: count=%d\thits=%d\tmisses=%d\texpired=%d%s", in dump_cache_stats() 67 BO_CACHE_LOG(cache, "size=%d\tcount=%d\thits=%d\tmisses=%d\texpired=%d", in dump_cache_stats() 72 add_bucket(struct fd_bo_cache *cache, int size) in add_bucket() argument 74 unsigned int i = cache->num_buckets; in add_bucket() 75 struct fd_bo_bucket *bucket = &cache->cache_bucket[i]; in add_bucket() [all …]
|
| /third_party/mesa3d/src/mesa/program/ |
| 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->last = NULL; in clear_cache() [all …]
|
| /third_party/mesa3d/src/util/tests/ |
| D | cache_test.cpp | 24 /* A collection of unit tests for cache.c */ 103 does_cache_contain(struct disk_cache *cache, const cache_key key) in does_cache_contain() argument 107 result = disk_cache_get(cache, key, NULL); in does_cache_contain() 118 cache_exists(struct disk_cache *cache) in cache_exists() argument 123 if (!cache) in cache_exists() 126 disk_cache_compute_key(cache, data, sizeof(data), key); in cache_exists() 127 disk_cache_put(cache, key, data, sizeof(data), NULL); in cache_exists() 128 disk_cache_wait_for_idle(cache); in cache_exists() 129 void *result = disk_cache_get(cache, key, NULL); in cache_exists() 130 disk_cache_remove(cache, key); in cache_exists() [all …]
|
| /third_party/mbedtls/include/mbedtls/ |
| D | ssl_cache.h | 4 * \brief SSL session cache implementation 35 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */ 48 * \brief This structure is used for storing cache entries 65 * \brief Cache context 69 int MBEDTLS_PRIVATE(timeout); /*!< cache entry timeout */ 77 * \brief Initialize an SSL cache context 79 * \param cache SSL cache context 81 void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache); 84 * \brief Cache get callback implementation 87 * \param data The SSL cache context to use. [all …]
|
| /third_party/mindspore/mindspore-src/source/mindspore/ccsrc/minddata/dataset/engine/opt/pre/ |
| D | cache_transform_pass.cc | 42 MS_LOG(INFO) << "Cache transform pass: CacheOp found, identified descendant tree."; in Visit() 48 // Resets the tracking of the cache within the tree and assigns the nodes that will be involved in … 53 is_caching_ = false; // We a no longer in a cache subtree. clear the flag. in VisitAfter() 55 MS_LOG(INFO) << "Cache transform pass: Set up transformation nodes for mappable cache."; in VisitAfter() 58 …// In the cases where cache is directly injected after the leaf node, these two nodes might be the… in VisitAfter() 71 // Perform leaf node cache transform identification 74 MS_LOG(INFO) << "Cache transform pass: CacheOp found, identified descendant tree."; in Visit() 77 …// Cache might also be injected to the non-leaf node upper in the tree, so is_caching_ might also … in Visit() 80 MS_LOG(DEBUG) << "Cache transform pass: Non mappable leaf in a cache descendant tree detected"; in Visit() 81 …// If a leaf has already been assigned, then we have more than one leaf inside this cache descenda… in Visit() [all …]
|
| /third_party/mesa3d/src/gallium/drivers/svga/ |
| D | svga_screen_cache.c | 37 * against the cache size limit, so view them as zero-sized. in svga_surface_size() 71 * Search the cache for a surface that matches the key. If a match is 72 * found, remove it from the cache and return the surface pointer. 79 struct svga_host_surface_cache *cache = &svgascreen->cache; in svga_screen_cache_lookup() local 91 mtx_lock(&cache->mutex); in svga_screen_cache_lookup() 93 curr = cache->bucket[bucket].next; in svga_screen_cache_lookup() 95 while (curr != &cache->bucket[bucket]) { in svga_screen_cache_lookup() 105 * We unlink the surface from the cache entry and we add the entry to in svga_screen_cache_lookup() 123 /* Add the cache entry (but not the surface!) to the empty list */ in svga_screen_cache_lookup() 124 list_add(&entry->head, &cache->empty); in svga_screen_cache_lookup() [all …]
|