56#define LINE_BYTES (256 * 1024)
57#define HASH_RASTER 0x0B0B0B0B0B0B0B0BULL
58#define HASH_DETAIL 0x0C0C0C0C0C0C0C0CULL
78 assert_non_null(entry);
79 assert_non_null(data);
127#define HASH_OUTPUT 0x0D0D0D0D0D0D0D0DULL
132 memset(module, 0,
sizeof(*module));
134 g_strlcpy(module->
op, op,
sizeof(module->
op));
135 piece->module =
module;
136 piece->global_hash = 0x0E0E0E0E0E0E0E0EULL;
137 piece->roi_out.width = 16;
138 piece->roi_out.height = 8;
194int main(
int argc,
char *argv[])
196 const struct CMUnitTest tests[] = {
203 return cmocka_run_group_tests(tests, NULL, NULL);
int dt_atomic_get_int(dt_atomic_int *var)
static const dt_dev_pixelpipe_t * pipe
static const dt_dev_pixelpipe_t const dt_dev_pixelpipe_iop_t * piece
uint64_t dt_dev_pixelpipe_rawdetail_mask_hash(const dt_dev_pixelpipe_iop_t *piece)
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.
#define DT_PIXELPIPE_CACHE_HASH_INVALID
void dt_dev_pixelpipe_cleanup_nodes(dt_dev_pixelpipe_t *pipe)
gboolean dt_dev_pixelpipe_rawdetail_mask_check_hit(dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const uint64_t output_hash)
Whether a cached output of piece may stand for it, called before that output is looked up.
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]
unsigned __int64 uint64_t
uint64_t rawdetail_mask_hash
struct dt_iop_roi_t rawdetail_mask_roi
GArray * raster_mask_hashes
static void _detail_output_without_its_mask_goes(void **state __attribute__((unused)))
static int _teardown(void **state __attribute__((unused)))
static void _pipe_holding_masks(dt_dev_pixelpipe_t *pipe)
static void _detail_output_with_its_mask_stands(void **state __attribute__((unused)))
static void _detailmask_output(dt_iop_module_t *module, dt_dev_pixelpipe_iop_t *piece, const char *op)
static void _released_masks_go_with_the_flush(void **state __attribute__((unused)))
static int _setup(void **state __attribute__((unused)))
static dt_pixel_cache_entry_t * _publish(const uint64_t hash)
static void _cleanup_nodes_releases_the_masks(void **state __attribute__((unused)))
static void _other_output_stands(void **state __attribute__((unused)))