| /third_party/mesa3d/src/gallium/auxiliary/util/ |
| D | u_cache.c | 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 30 * Improved cache implementation. 32 * Fixed size array with linear probing on collision and LRU eviction 74 /** Max entries in the cache */ 80 /** Number of entries in the cache */ 83 /** Head of list, sorted from Least-recently used to Most-recently used */ 84 struct util_cache_entry lru; member 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 [all …]
|
| /third_party/mindspore/mindspore-src/source/mindspore/ccsrc/distributed/embedding_cache/cache_strategy/ |
| D | lru_cache.h | 8 * http://www.apache.org/licenses/LICENSE-2.0 25 #include "distributed/embedding_cache/cache_strategy/cache.h" 31 // This class implements a common LRU (least recently used) caching strategy, with the idea that "i… 37 class LRUCache : public Cache<KeyType, ValueType> { 39 // The elements in cache are stored as key-value pairs. 40 using Element = typename Cache<KeyType, ValueType>::Element; 44 explicit LRUCache(size_t capacity) : Cache<KeyType, ValueType>(capacity) {} in LRUCache() 51 // Insert an element (key-value pair) into the lru cache. 53 // element may have been replaced from a higher level cache. 56 // The key exist in lru cache, move this element to the head of list. in Put() [all …]
|
| /third_party/ntfs-3g/libntfs-3g/ |
| D | cache.c | 2 * cache.c : deal with LRU caches 4 * Copyright (c) 2008-2010 Jean-Pierre Andre 17 * along with this program (in the main directory of the NTFS-3G 19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 #include "cache.h" 40 * General functions to deal with LRU caches 45 * LRU list. 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() [all …]
|
| /third_party/libwebsockets/include/libwebsockets/ |
| D | lws-cache-ttl.h | 2 * libwebsockets - small server side websockets and web server implementation 4 * Copyright (C) 2010 - 2021 Andy Green <andy@warmcat.com> 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. 42 * Both expiry and LRU orderings are kept so it is easy to find out usage 46 * you allocate new objects (to keep the whole cache under the specified limit), [all …]
|
| D | lws-diskcache.h | 2 * libwebsockets - small server side websockets and web server implementation 4 * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com> 25 /*! \defgroup diskcache LWS disk cache 26 * ## Disk cache API 28 * Lws provides helper apis useful if you need a disk cache containing hashed 29 * files and need to delete files from it on an LRU basis to keep it below some 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 [all …]
|
| /third_party/libwebsockets/READMEs/ |
| D | README.lws_cache.md | 3 lws_cache implements a single- or multi-level cache for generic payload items 6  8 L1 cache is always stored on heap, but it may be hooked up to additional levels 9 of cache objects with different backing storage. The last level always contains 14 formats and media, while being able to take advantage of a suitably-sized L1 15 heap cache to minimize the cost of repeated access. 17  20 caches in `minimal-examples/api-tests/api-test-lws_cache` 22 ## Cache size restriction, LRU and TTL 24 The max heap footprint of its items and max number of items can be capped. LRU [all …]
|
| D | README.http-cache.md | 4 persistently, and auto-apply relevant cookies to future outgoing requests. 6 A L1 heap cache of recent cookies is maintained, along with LRU tracking and 7 removal of entries from cache and the cookie jar file according to their cookie 10 The cookie handling is off by default per-connection for backwards compatibility 13 ## Enabling at build-time 15 Make sure `-DLWS_WITH_CACHE_NSCOOKIEJAR=1` is enabled at cmake (it is on by 18 ## Configuring the cookie cache 20 The cookie cache is managed through context creation info struct members. 23 |---|---| 25 |`.http_nsc_heap_max_footprint`|0, or Max size in bytes for the L1 heap cache| [all …]
|
| /third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/internal/ |
| D | RegexCache.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 24 * LRU Cache for compiled regular expressions used by the libphonenumbers libary. 29 private LRUCache<String, Pattern> cache; field in RegexCache 32 cache = new LRUCache<String, Pattern>(size); in RegexCache() 36 Pattern pattern = cache.get(regex); in getPatternForRegex() 39 cache.put(regex, pattern); in getPatternForRegex() 46 return cache.containsKey(regex); in containsRegex() 50 // LinkedHashMap offers a straightforward implementation of LRU cache. 57 // Using access-order instead of insertion-order. in LRUCache()
|
| /third_party/grpc/src/python/grpcio/grpc/experimental/ |
| D | session_cache.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 20 """Creates an SSLSessionCache with LRU replacement policy 23 capacity: Size of the cache 26 An SSLSessionCache with LRU replacement policy that can be passed as a value for 35 """An encapsulation of a session cache used for TLS session resumption. 41 def __init__(self, cache): argument 42 self._cache = cache
|
| /third_party/skia/third_party/externals/dawn/src/dawn_native/d3d12/ |
| D | ResidencyManagerD3D12.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 28 device->IsToggleEnabled(Toggle::UseD3D12ResidencyManagement)) { in ResidencyManager() 39 if (!pageable->IsInResidencyLRUCache() && !pageable->IsResidencyLocked()) { in LockAllocation() 40 ID3D12Pageable* d3d12Pageable = pageable->GetD3D12Pageable(); in LockAllocation() 41 uint64_t size = pageable->GetSize(); in LockAllocation() 43 DAWN_TRY(MakeAllocationsResident(GetMemorySegmentInfo(pageable->GetMemorySegment()), in LockAllocation() 47 // Since we can't evict the heap, it's unnecessary to track the heap in the LRU Cache. in LockAllocation() 48 if (pageable->IsInResidencyLRUCache()) { in LockAllocation() 49 pageable->RemoveFromList(); in LockAllocation() 52 pageable->IncrementResidencyLock(); in LockAllocation() [all …]
|
| D | PageableD3D12.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 25 // the ResidencyManager's LRU cache. This node is inserted into the LRU-cache when it is first 27 // LRU cache when it is evicted from resident memory due to budget constraints, or when the
|
| D | PageableD3D12.cpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 25 // it from the LRU cache. If this heap is not manually removed from the LRU-cache, the 70 mResidencyLockRefCount--; in DecrementResidencyLock()
|
| /third_party/grpc/src/core/tsi/ssl/session_cache/ |
| D | ssl_session_cache.h | 9 // http://www.apache.org/licenses/LICENSE-2.0 36 /// Cache for SSL sessions for sessions resumption. 38 /// Older sessions may be evicted from the cache using LRU policy if capacity 41 /// in order for cache to be effective. 52 /// Create new LRU cache with the given capacity. 69 /// Returns current number of sessions in the cache. 71 /// Add \a session in the cache using \a key. This operation may discard older 74 /// Returns the session from the cache associated with \a key or null if not
|
| /third_party/mindspore/mindspore-src/source/tests/ut/cpp/distributed/embedding_cache/ |
| D | lru_cache_test.cc | 8 * http://www.apache.org/licenses/LICENSE-2.0 35 /// Feature: test lru cache all api. 36 /// Description: test lru cache data structure and interface. 39 distributed::LRUCache<int, int> cache(5); in TEST_F() local 40 EXPECT_EQ(cache.capacity(), 5); in TEST_F() 43 EXPECT_NO_THROW(cache.Put(item.first, item.second)); in TEST_F() 45 EXPECT_TRUE(cache.Exists(1)); in TEST_F() 46 EXPECT_TRUE(cache.Exists(2)); in TEST_F() 47 EXPECT_TRUE(cache.Exists(3)); in TEST_F() 48 EXPECT_FALSE(cache.Exists(4)); in TEST_F() [all …]
|
| /third_party/skia/third_party/externals/piex/src/binary_parse/ |
| D | cached_paged_byte_array.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 17 // LRU cache decorator for binary_parse::PagedByteArray subclasses. 35 // Decorates 'paged_byte_array' with a LRU cache layer of the size 40 virtual size_t length() const { return paged_byte_array_->length(); } in length() 42 virtual size_t pageSize() const { return paged_byte_array_->pageSize(); } in pageSize() 60 // Gets the index of the page if it is in the cache and returns true, else
|
| /third_party/skia/m133/third_party/externals/piex/src/binary_parse/ |
| D | cached_paged_byte_array.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 17 // LRU cache decorator for binary_parse::PagedByteArray subclasses. 35 // Decorates 'paged_byte_array' with a LRU cache layer of the size 40 virtual size_t length() const { return paged_byte_array_->length(); } in length() 42 virtual size_t pageSize() const { return paged_byte_array_->pageSize(); } in pageSize() 60 // Gets the index of the page if it is in the cache and returns true, else
|
| /third_party/mesa3d/src/virtio/vulkan/ |
| D | vn_image.c | 3 * SPDX-License-Identifier: MIT 13 #include "venus-protocol/vn_protocol_driver_image.h" 14 #include "venus-protocol/vn_protocol_driver_image_view.h" 15 #include "venus-protocol/vn_protocol_driver_sampler.h" 16 #include "venus-protocol/vn_protocol_driver_sampler_ycbcr_conversion.h" 32 if (!(create_info->flags & VK_IMAGE_CREATE_DISJOINT_BIT)) in vn_image_get_plane_count() 36 assert(create_info->tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT); in vn_image_get_plane_count() 37 return vk_format_get_plane_count(create_info->format); in vn_image_get_plane_count() 64 switch (u.pnext->sType) { in vn_image_fill_reqs() 66 u.two->memoryRequirements = req->memory.memoryRequirements; in vn_image_fill_reqs() [all …]
|
| /third_party/skia/src/gpu/ |
| D | GrThreadSafeCache.h | 4 * Use of this source code is governed by a BSD-style license that can be 19 // Ganesh creates a lot of utility textures (e.g., blurred-rrect masks) that need to be shared 20 // between the direct context and all the DDL recording contexts. This thread-safe cache 23 // In operation, each thread will first check if the threaded cache possesses the required texture. 26 // attempt to add it to the cache. If another thread had added it in the interim, the losing thread 31 // gpu-thread has precedence over the recording threads. 33 // The invariants for this cache differ a bit from those of the proxy and resource caches. 34 // For this cache: 36 // only this cache knows the unique key - neither the proxy nor backing resource should 37 // be discoverable in any other cache by the unique key [all …]
|
| /third_party/grpc/src/core/util/ |
| D | lru_cache.h | 8 // http://www.apache.org/licenses/LICENSE-2.0 31 // A simple LRU cache. Retains at most max_size entries. 44 // If key is present in the cache, returns the corresponding value. 46 // construct the new value. If inserting a new entry causes the cache 50 // Changes the max size of the cache. If there are currently more than 51 // max_size entries, deletes least-recently-used entries to enforce 71 // implementation -- no user-serviceable parts below 78 // Found the entry. Move the entry to the end of the LRU list. in Get() 79 auto new_lru_it = lru_list_.insert(lru_list_.end(), *it->second.lru_iterator); in Get() 80 lru_list_.erase(it->second.lru_iterator); in Get() [all …]
|
| /third_party/skia/third_party/externals/swiftshader/src/System/ |
| D | LRUCache.hpp | 7 // http://www.apache.org/licenses/LICENSE-2.0 27 // LRUCache is a least recently used cache of a fixed capacity. 38 // view is a const accessor of a single cache entry. 64 // Construct a LRU cache with the given maximum number of entries. 68 // lookup() looks up the cache entry with the given key. 69 // If the entry is found, this is moved to the most-recent position in the 70 // cache, and its data is returned. 74 // add() adds the data to the cache using the given key, placed at the 75 // most-recent position in the cache. 76 // If an existing entry exists in the cache with the given key, then this is [all …]
|
| /third_party/skia/m133/src/gpu/ganesh/ |
| D | GrThreadSafeCache.h | 4 * Use of this source code is governed by a BSD-style license that can be 41 // Ganesh creates a lot of utility textures (e.g., blurred-rrect masks) that need to be shared 42 // between the direct context and all the DDL recording contexts. This thread-safe cache 45 // In operation, each thread will first check if the threaded cache possesses the required texture. 48 // attempt to add it to the cache. If another thread had added it in the interim, the losing thread 53 // gpu-thread has precedence over the recording threads. 55 // The invariants for this cache differ a bit from those of the proxy and resource caches. 56 // For this cache: 58 // only this cache knows the unique key - neither the proxy nor backing resource should 59 // be discoverable in any other cache by the unique key [all …]
|
| /third_party/rust/crates/bindgen/bindgen-tests/tests/headers/ |
| D | layout_large_align_field.h | 1 // bindgen-flags: --rustified-enum ".*" --rust-target 1.40 16 * Force alignment to cache line. 65 TAILQ_ENTRY(ip_frag_pkt) lru; /**< LRU list */ 96 struct ip_pkt_list lru; /**< LRU list for table entries. */ member
|
| /third_party/mesa3d/src/asahi/lib/ |
| D | agx_bo.c | 4 * SPDX-License-Identifier: MIT 26 return (bucket_index - MIN_BO_CACHE_BUCKET); in agx_bucket_index() 32 return &dev->bo_cache.buckets[agx_bucket_index(size)]; in agx_bucket() 38 simple_mtx_assert_locked(&dev->bo_cache.lock); in agx_bo_cache_remove_locked() 39 list_del(&bo->bucket_link); in agx_bo_cache_remove_locked() 40 list_del(&bo->lru_link); in agx_bo_cache_remove_locked() 41 dev->bo_cache.size -= bo->size; in agx_bo_cache_remove_locked() 45 * BO cache. If it succeeds, it returns that BO and removes the BO from the 46 * cache. If it fails, it returns NULL signaling the caller to allocate a new 53 simple_mtx_lock(&dev->bo_cache.lock); in agx_bo_cache_fetch() [all …]
|
| /third_party/skia/m133/src/gpu/graphite/ |
| D | ResourceCache.h | 4 * Use of this source code is governed by a BSD-style license that can be 91 void forceProcessReturnedResources() { this->processReturnedResources(); } in forceProcessReturnedResources() 93 void forcePurgeAsNeeded() { this->purgeAsNeeded(); } in forcePurgeAsNeeded() 95 // Returns the numbers of Resources that can currently be found in the cache. This includes all 96 // shared Resources and all non-shareable resources that have been returned to the cache. 101 bool testingInPurgeableQueue(Resource* resource) { return this->inPurgeableQueue(resource); } in testingInPurgeableQueue() 118 // This will return true if any resources were actually returned to the cache 154 // Whenever a resource is added to the cache or the result of a cache lookup, fTimestamp is 156 // purgeable resources by this value, and thus is used to purge resources in LRU order. 158 // the end of the LRU priority queue. This will allow us to not purge these resources even when
|
| /third_party/mesa3d/src/util/ |
| D | mesa_cache_db_multipart.c | 4 * SPDX-License-Identifier: MIT 21 db->num_parts = debug_get_num_option("MESA_DISK_CACHE_DATABASE_NUM_PARTS", 50); in mesa_cache_db_multipart_open() 22 db->cache_path = cache_path; in mesa_cache_db_multipart_open() 23 db->parts = calloc(db->num_parts, sizeof(*db->parts)); in mesa_cache_db_multipart_open() 24 if (!db->parts) in mesa_cache_db_multipart_open() 27 simple_mtx_init(&db->lock, mtx_plain); in mesa_cache_db_multipart_open() 44 if (db->parts[part]) in mesa_cache_db_multipart_init_part_locked() 47 if (asprintf(&part_path, "%s/part%u", db->cache_path, part) == -1) in mesa_cache_db_multipart_init_part_locked() 50 if (mkdir(part_path, 0755) == -1 && errno != EEXIST) in mesa_cache_db_multipart_init_part_locked() 66 if (db->max_cache_size) in mesa_cache_db_multipart_init_part_locked() [all …]
|