43#define LINE_BYTES (256 * 1024)
44#define HASH_A 0x0A0A0A0A0A0A0A0Aull
63 assert_non_null(entry);
64 assert_non_null(data);
91int main(
int argc,
char *argv[])
93 const struct CMUnitTest tests[] = {
97 return cmocka_run_group_tests(tests, NULL, NULL);
int dt_atomic_get_int(dt_atomic_int *var)
void dt_dev_pixelpipe_cache_wrlock_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the write lock on the entry.
void dt_dev_pixelpipe_cache_unref_entry(dt_pixel_cache_entry_t *entry)
Release one reference held on entry, by POINTER.
void dt_dev_pixelpipe_cache_cleanup(void)
Release everything dt_dev_pixelpipe_cache_init() created, the instance included. Only after a success...
void dt_dev_pixelpipe_cache_flush(const int id)
Remove cache lines matching id. Entries locked in read/write or having reference count greater than 0...
int dt_dev_pixelpipe_cache_get(const uint64_t hash, const size_t size, const char *name, const int id, const gboolean alloc, void **data, dt_pixel_cache_entry_t **entry)
Get a cache line from the cache.
dt_pixel_cache_entry_t * dt_dev_pixelpipe_cache_get_entry(const uint64_t hash)
Get an internal reference to the cache entry matching hash. If you are going to access this entry mor...
gboolean dt_dev_pixelpipe_cache_init(size_t max_memory, const gboolean verbose, const gboolean verbose_detail)
Reserve the cache's arena and start it.
Pixelpipe cache for storing intermediate results in the pixelpipe.
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
const float uint32_t state[4]
static dt_pixel_cache_entry_t * _create_held(void)
static int _teardown(void **state __attribute__((unused)))
static int _setup(void **state __attribute__((unused)))
static void _held_line_survives_the_flush(void **state __attribute__((unused)))
static void _released_line_goes_with_the_flush(void **state __attribute__((unused)))