![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for common/cache.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_cache_entry_t |
| struct | dt_cache_t |
Macros | |
| #define | dt_cache_get(A, B, C) dt_cache_get_with_caller(A, B, C, __FILE__, __LINE__) |
| #define | dt_cache_release(A, B) dt_cache_release_with_caller(A, B, __FILE__, __LINE__) |
Typedefs | |
| typedef struct dt_cache_entry_t | dt_cache_entry_t |
| typedef struct dt_cache_t | dt_cache_t |
Functions | |
| typedef | void ((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry)) |
| void | dt_cache_init (dt_cache_t *cache, size_t entry_size, size_t cost_quota) |
| void | dt_cache_cleanup (dt_cache_t *cache) |
| static void | dt_cache_set_allocate_callback (dt_cache_t *cache, dt_cache_allocate_t allocate_cb, void *allocate_data) |
| static void | dt_cache_set_cleanup_callback (dt_cache_t *cache, dt_cache_cleanup_t cleanup_cb, void *cleanup_data) |
| dt_cache_entry_t * | dt_cache_get_with_caller (dt_cache_t *cache, const uint32_t key, char mode, const char *file, int line) |
| dt_cache_entry_t * | dt_cache_testget (dt_cache_t *cache, const uint32_t key, char mode) |
| void | dt_cache_release_with_caller (dt_cache_t *cache, dt_cache_entry_t *entry, const char *file, int line) |
| int32_t | dt_cache_contains (dt_cache_t *cache, const uint32_t key) |
| int32_t | dt_cache_remove (dt_cache_t *cache, const uint32_t key) |
| int | dt_cache_seed (dt_cache_t *cache, const uint32_t key, const void *data, size_t data_size, size_t cost, gboolean aligned_alloc) |
| void | dt_cache_gc (dt_cache_t *cache, const float fill_ratio) |
| int | dt_cache_for_all (dt_cache_t *cache, int(*process)(const uint32_t key, const void *data, void *user_data), void *user_data) |
| #define dt_cache_release | ( | A, | |
| B | |||
| ) | dt_cache_release_with_caller(A, B, __FILE__, __LINE__) |
| typedef struct dt_cache_entry_t dt_cache_entry_t |
| typedef struct dt_cache_t dt_cache_t |
| void dt_cache_cleanup | ( | dt_cache_t * | cache | ) |
References ASAN_UNPOISON_MEMORY_REGION, dt_cache_t::cleanup, dt_cache_t::cleanup_data, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_free_align, dt_pthread_mutex_destroy(), dt_pthread_rwlock_destroy, dt_cache_t::hashtable, dt_cache_entry_t::lock, dt_cache_t::lock, and dt_cache_t::lru.
Referenced by dt_image_cache_cleanup(), dt_mipmap_cache_cleanup(), and main().
| int32_t dt_cache_contains | ( | dt_cache_t * | cache, |
| const uint32_t | key | ||
| ) |
References dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_cache_t::hashtable, key, and dt_cache_t::lock.
Referenced by main().
| int dt_cache_for_all | ( | dt_cache_t * | cache, |
| int(*)(const uint32_t key, const void *data, void *user_data) | process, | ||
| void * | user_data | ||
| ) |
| void dt_cache_gc | ( | dt_cache_t * | cache, |
| const float | fill_ratio | ||
| ) |
References dt_cache_entry_t::_lock_demoting, ASAN_UNPOISON_MEMORY_REGION, dt_cache_t::cleanup, dt_cache_t::cleanup_data, dt_cache_entry_t::cost, dt_cache_t::cost, dt_cache_t::cost_quota, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_free_align, dt_pthread_rwlock_destroy, dt_pthread_rwlock_trywrlock, dt_pthread_rwlock_unlock, dt_cache_t::hashtable, dt_cache_entry_t::key, dt_cache_entry_t::link, dt_cache_entry_t::lock, and dt_cache_t::lru.
Referenced by dt_cache_get_with_caller(), and dt_cache_seed().
| dt_cache_entry_t * dt_cache_get_with_caller | ( | dt_cache_t * | cache, |
| const uint32_t | key, | ||
| char | mode, | ||
| const char * | file, | ||
| int | line | ||
| ) |
References dt_cache_entry_t::_lock_demoting, dt_cache_t::allocate, dt_cache_t::allocate_data, ASAN_POISON_MEMORY_REGION, dt_cache_entry_t::cost, dt_cache_t::cost, dt_cache_t::cost_quota, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_alloc_align(), dt_cache_gc(), dt_free, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_pthread_rwlock_init, dt_pthread_rwlock_rdlock_with_caller, dt_pthread_rwlock_tryrdlock_with_caller, dt_pthread_rwlock_trywrlock_with_caller, dt_pthread_rwlock_wrlock_with_caller, dt_cache_t::entry_size, dt_cache_t::hashtable, IS_NULL_PTR, dt_cache_entry_t::key, key, dt_cache_entry_t::link, dt_cache_entry_t::lock, dt_cache_t::lock, dt_cache_t::lru, and value.
Referenced by dt_mipmap_cache_get_with_caller_and_shutdown().
| void dt_cache_init | ( | dt_cache_t * | cache, |
| size_t | entry_size, | ||
| size_t | cost_quota | ||
| ) |
References dt_cache_t::allocate, dt_cache_t::allocate_data, dt_cache_t::cleanup, dt_cache_t::cleanup_data, dt_cache_t::cost, dt_cache_t::cost_quota, dt_pthread_mutex_init(), dt_cache_t::entry_size, dt_cache_t::hashtable, dt_cache_t::lock, and dt_cache_t::lru.
Referenced by dt_image_cache_init(), dt_mipmap_cache_init(), and main().
| void dt_cache_release_with_caller | ( | dt_cache_t * | cache, |
| dt_cache_entry_t * | entry, | ||
| const char * | file, | ||
| int | line | ||
| ) |
References ASAN_POISON_MEMORY_REGION, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_pthread_rwlock_unlock, and dt_cache_entry_t::lock.
Referenced by dt_mipmap_cache_release_with_caller().
| int32_t dt_cache_remove | ( | dt_cache_t * | cache, |
| const uint32_t | key | ||
| ) |
References dt_cache_entry_t::_lock_demoting, ASAN_UNPOISON_MEMORY_REGION, dt_cache_t::cleanup, dt_cache_t::cleanup_data, dt_cache_entry_t::cost, dt_cache_t::cost, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_free_align, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_pthread_rwlock_destroy, dt_pthread_rwlock_trywrlock, dt_pthread_rwlock_unlock, dt_cache_t::hashtable, key, dt_cache_entry_t::link, dt_cache_entry_t::lock, dt_cache_t::lock, dt_cache_t::lru, value, and void().
Referenced by dt_image_cache_remove(), dt_mimap_cache_evict(), and dt_mipmap_cache_remove_at_size().
| int dt_cache_seed | ( | dt_cache_t * | cache, |
| const uint32_t | key, | ||
| const void * | data, | ||
| size_t | data_size, | ||
| size_t | cost, | ||
| gboolean | aligned_alloc | ||
| ) |
References dt_cache_entry_t::_lock_demoting, ASAN_POISON_MEMORY_REGION, dt_cache_entry_t::cost, dt_cache_t::cost, dt_cache_t::cost_quota, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_alloc_align(), dt_cache_gc(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_pthread_rwlock_init, dt_cache_t::hashtable, IS_NULL_PTR, dt_cache_entry_t::key, key, dt_cache_entry_t::link, dt_cache_entry_t::lock, dt_cache_t::lock, and dt_cache_t::lru.
Referenced by dt_image_cache_seed().
|
inlinestatic |
References dt_cache_t::allocate, and dt_cache_t::allocate_data.
Referenced by dt_image_cache_init(), dt_mipmap_cache_init(), and main().
|
inlinestatic |
References dt_cache_t::cleanup, and dt_cache_t::cleanup_data.
Referenced by dt_image_cache_init(), and dt_mipmap_cache_init().
| dt_cache_entry_t * dt_cache_testget | ( | dt_cache_t * | cache, |
| const uint32_t | key, | ||
| char | mode | ||
| ) |
References ASAN_POISON_MEMORY_REGION, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_pthread_rwlock_tryrdlock, dt_pthread_rwlock_trywrlock, dt_cache_t::hashtable, key, dt_cache_entry_t::link, dt_cache_entry_t::lock, dt_cache_t::lock, dt_cache_t::lru, and value.
Referenced by dt_image_cache_testget(), dt_mipmap_cache_get_with_caller_and_shutdown(), and dt_mipmap_cache_remove_at_size().
| typedef void | ( | (*)(void *userdata, dt_cache_entry_t *entry) | dt_cache_allocate_t | ) |
Referenced by _accels_tooltip_query_hook(), _active_modules_popup(), _attach_selected_layer_clicked(), _backup_db(), _blendop_blendif_disp_alternative_reset(), _blendop_blending_notebook_switch(), _blendop_masks_all_name_edited(), _blendop_masks_all_toggled(), _blendop_masks_group_name_focus_out(), _blendop_masks_handler_callback(), _cache_entry_has_device_payload(), _cache_entry_materialize_host_data_locked(), _cacheline_ready_callback(), _color_picker_button_press(), _color_picker_button_release(), _color_picker_motion(), _color_picker_widget_destroy(), _completion_row_activated(), _create_background_clicked(), _create_layer_clicked(), _darkroom_ioporder_quickbutton_clicked(), _delete_child(), _delete_layer_clicked(), _develop_cacheline_ready_callback(), _develop_history_resync_callback(), _develop_ui_pipe_finished_callback(), _dispatch_pending_tasks(), _dt_dev_pixelpipe_cache_wait_ready_callback(), _edit_button_release(), _edit_key_press(), _edit_key_release(), _edit_preset_response(), _event_cacheline_ready_callback(), _event_history_resync_callback(), _event_process_after_ui_callback(), _event_structure_auto_clicked(), _fill_black_clicked(), _fill_transparent_clicked(), _fill_white_clicked(), _gtk_main_quit_safe(), _history_compress_apply(), _history_paste_apply(), _history_paste_parts_apply(), _history_resync_callback(), _history_resync_callback(), _image_import_internal(), _iop_color_picker_cacheline_ready_callback(), _iop_color_picker_history_resync_callback(), _ioporder_draw_mask_arrow(), _ioporder_runtime_band_profile_info(), _lib_histogram_cacheline_ready_callback(), _lib_histogram_history_resync_callback(), _lib_navigation_cacheline_ready_callback(), _lib_navigation_control_redraw_callback(), _lib_navigation_history_resync_callback(), _lock_pipe_surface(), _log_arena_allocation_failure(), _metadata_get_flags(), _metadata_view_update_values(), _pause_worker(), _perform_runtime_widget_cache_sync(), _prepare_resampling_plan(), _preview_cacheline_ready_callback(), _preview_history_resync_callback(), _preview_map(), _rename_layer_clicked(), _resume_worker(), _run_pending_preview_job(), _save_layer_clicked(), _splash_scale_factor_changed(), _stroke_flow_alpha(), _sync_params_from_gui(), _textview_focus_out(), _wait_worker_idle(), _widget_auto_model_row_changed(), _widget_auto_model_row_collapsed(), _widget_auto_model_row_deleted(), _widget_auto_model_row_expanded(), _widget_auto_model_row_inserted(), _widget_auto_model_rows_reordered(), _widget_auto_on_buffer_changed(), _widget_auto_on_model_changed(), _widget_auto_text_buffer_changed(), camera_autosearch_clicked(), camera_menusearch_clicked(), cleanup_pipe(), color_picker_apply(), commit_params(), default_distort_backtransform(), default_distort_transform(), default_process_tiling_cl(), default_runtime_data_hash(), delete_children(), distort_backtransform(), distort_mask(), distort_mask(), distort_transform(), dt_accels_search(), dt_cache_remove(), dt_control_save_xmps(), dt_dev_cleanup(), dt_dev_free_history_item(), dt_dev_history_item_update_from_params(), dt_dev_pixelpipe_cache_alloc_cl_device_buffer(), dt_dev_pixelpipe_cache_flush_host_pinned_image(), dt_dev_pixelpipe_cache_get_cl_buffer(), dt_dev_pixelpipe_cache_prepare_cl_input(), dt_dev_pixelpipe_cache_put_pinned_image(), dt_dev_pixelpipe_cache_release_cl_buffer(), dt_dev_pixelpipe_cache_restore_cl_buffer(), dt_dev_pixelpipe_cache_resync_host_pinned_image(), dt_dev_pixelpipe_cache_return_cl_payload(), dt_dev_pixelpipe_cache_sync_cl_buffer(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_gpu_flush_host_pinned_images(), dt_dev_pixelpipe_process(), dt_develop_blendif_raw_blend(), dt_drawlayer_worker_seal_for_commit(), dt_gui_preferences_show(), dt_image_read_duplicates(), dt_imageio_jpeg_decompress(), dt_imageio_jpeg_read(), dt_imageio_open_avif(), dt_imageio_open_j2k(), dt_imageio_open_jpeg(), dt_imageio_open_png(), dt_imageio_open_rawspeed(), dt_imageio_open_tiff(), dt_init(), dt_iop_alloc_image_buffers(), dt_set_signal_handlers(), gui_init(), gui_init(), icuLoadCollation(), icuRegexpFunc(), init_pipe(), key_swap_callback(), leave(), lens_autosearch_clicked(), lens_comboentry_aperture_update(), lens_comboentry_distance_update(), lens_comboentry_focal_update(), lens_menusearch_clicked(), line_detect(), modify_roi_in(), process(), process(), process(), process(), process_laplacian_xtrans(), read_image(), reduce_2D_Bspline(), runtime_data_hash(), sqlite3IcuInit(), tiling_callback(), try_enter(), write_image(), write_image(), and write_pfm().