size_t size
Definition mipmap_cache.c:3
int dt_dev_pixelpipe_cache_get_existing(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, void **data, struct dt_iop_buffer_dsc_t **dsc, struct dt_pixel_cache_entry_t **entry)
Get an existing cache line from the cache. This is similar to dt_dev_pixelpipe_cache_get,...
Definition pixelpipe_cache.c:335
struct dt_pixel_cache_entry_t * dt_dev_pixelpipe_cache_get_entry(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash)
Get an internal reference to the cache entry matching hash. If you are going to access this entry mor...
Definition pixelpipe_cache.c:52
void dt_dev_pixelpipe_cache_cleanup(dt_dev_pixelpipe_cache_t *cache)
Definition pixelpipe_cache.c:286
void dt_dev_pixelpipe_cache_auto_destroy_apply(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, const int id, struct dt_pixel_cache_entry_t *entry)
Free the entry matching hash if it has the flag "auto_destroy" and its pipe id matches....
struct dt_pixel_cache_entry_t * dt_dev_pixelpipe_cache_get_entry_from_data(dt_dev_pixelpipe_cache_t *cache, void *data)
Return a reference to the cache entry holding the data buffer, or NULL if not found.
Definition pixelpipe_cache.c:423
dt_dev_pixelpipe_cache_t * dt_dev_pixelpipe_cache_init(size_t max_memory)
Definition pixelpipe_cache.c:274
void dt_dev_pixelpipe_cache_print(dt_dev_pixelpipe_cache_t *cache)
Definition pixelpipe_cache.c:547
void dt_dev_pixelpipe_cache_flush(dt_dev_pixelpipe_cache_t *cache, const int id)
Remove cache lines matching id. Entries locked in read/write or having reference count greater than 0...
Definition pixelpipe_cache.c:376
void dt_dev_pixelpipe_cache_wrlock_entry(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, gboolean lock, struct dt_pixel_cache_entry_t *entry)
Lock or release the write lock on the entry.
Definition pixelpipe_cache.c:471
int dt_dev_pixelpipe_cache_get(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, const size_t size, const char *name, const int id, void **data, struct dt_iop_buffer_dsc_t **dsc, struct dt_pixel_cache_entry_t **entry)
Get a cache line from the cache. This internally increases the reference count, so you have to manual...
Definition pixelpipe_cache.c:295
int dt_dev_pixel_pipe_cache_remove_lru(dt_dev_pixelpipe_cache_t *cache)
Definition pixelpipe_cache.c:186
void dt_dev_pixelpipe_cache_flag_auto_destroy(dt_dev_pixelpipe_cache_t *cache, uint64_t hash, struct dt_pixel_cache_entry_t *entry)
Flag the cache entry matching hash as "auto_destroy". This is useful for short-lived/disposable cache...
Definition pixelpipe_cache.c:519
void dt_dev_pixelpipe_cache_ref_count_entry(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, gboolean lock, struct dt_pixel_cache_entry_t *entry)
Increase/Decrease the reference count on the cache line as to prevent LRU item removal....
Definition pixelpipe_cache.c:462
int dt_dev_pixelpipe_cache_remove(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, const gboolean force, struct dt_pixel_cache_entry_t *entry)
Arbitrarily remove the cache entry matching hash. Entries having a reference count > 0 (inter-thread ...
Definition pixelpipe_cache.c:112
uint64_t dt_dev_pixelpipe_cache_get_hash_data(dt_dev_pixelpipe_cache_t *cache, void *data, struct dt_pixel_cache_entry_t **entry)
Find the hash of the cache entry holding the buffer data.
Definition pixelpipe_cache.c:414
void dt_dev_pixelpipe_cache_rdlock_entry(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, gboolean lock, struct dt_pixel_cache_entry_t *entry)
Lock or release the read lock on the entry.
Definition pixelpipe_cache.c:495
unsigned __int64 uint64_t
Definition strptime.c:71
Definition pixelpipe_cache.h:40
size_t current_memory
Definition pixelpipe_cache.h:45
GHashTable * entries
Definition pixelpipe_cache.h:41
dt_pthread_mutex_t lock
Definition pixelpipe_cache.h:46
size_t max_memory
Definition pixelpipe_cache.h:44
uint64_t queries
Definition pixelpipe_cache.h:42
uint64_t hits
Definition pixelpipe_cache.h:43
Definition pixelpipe_hb.h:127
Definition develop/format.h:36
Definition pixelpipe_cache.c:29
uint64_t hash
Definition pixelpipe_cache.c:30
void * data
Definition pixelpipe_cache.c:31
dt_iop_buffer_dsc_t dsc
Definition pixelpipe_cache.c:33
dt_pthread_rwlock_t lock
Definition pixelpipe_cache.c:38