Home
last modified time | relevance | path

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

12345678910>>...183

/third_party/mesa3d/src/gallium/auxiliary/util/
Du_cache.c30 * 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/ntfs-3g/libntfs-3g/
Dcache.c2 * 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/skia/third_party/externals/swiftshader/tests/SystemUnitTests/
DLRUCacheTests.cpp26 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/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()
65 fprintf(stderr, " 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/
DCMakeLists.txt23 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/mesa3d/src/virtio/vulkan/
Dvn_renderer_internal.c12 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
[all …]
/third_party/skia/third_party/externals/freetype/src/cache/
Dftccache.c5 * 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/
Dframe-cache.c3 // 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/mesa3d/src/amd/vulkan/
Dradv_pipeline_cache.c48 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->mutex, mtx_plain); in radv_pipeline_cache_init()
[all …]
/third_party/mesa3d/src/util/
Ddisk_cache.c51 /* 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 == NULL) in disk_cache_create()
96 cache->path_init_failed = true; in disk_cache_create()
[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()
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/libwebsockets/lib/misc/cache-ttl/
Dheap.c26 #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 …]
Dlws-cache-ttl.c26 #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/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/include/libwebsockets/
Dlws-cache-ttl.h25 /** \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 …]
Dlws-diskcache.h25 /*! \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/mesa3d/src/util/tests/
Dcache_test.cpp24 /* 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-test-tmp"
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/dataset/
Dtest_cache_map.py16 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 …]
Dtest_cache_nomap.py16 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/libcoap/include/coap3/
Dcoap_cache.h13 * @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/mesa3d/src/vulkan/runtime/
Dvk_pipeline_cache.c144 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()
[all …]
/third_party/mbedtls/include/mbedtls/
Dssl_cache.h4 * \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/mesa3d/src/gallium/drivers/svga/
Dsvga_screen_cache.c55 * 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 entry (but not the surface!) to the empty list */ in svga_screen_cache_lookup()
142 list_add(&entry->head, &cache->empty); in svga_screen_cache_lookup()
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/ccsrc/minddata/dataset/engine/opt/pre/
Dcache_transform_pass.cc42 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/skia/tests/
DResourceCacheTest.cpp53 // 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->getResourceBytes()); in test_no_key()
367 cache->purgeUnlockedResources(); in test_no_key()
374 REPORTER_ASSERT(reporter, 3 == cache->getResourceCount()); in test_no_key()
[all …]

12345678910>>...183