![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "system/macros.h"#include <glib.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <malloc.h>
Include dependency graph for mem_alloc.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | DT_IS_ALIGNED(x) __builtin_assume_aligned(x, DT_CACHELINE_BYTES) |
| #define | DT_CACHELINE_BYTES 64 |
| #define | DT_CACHELINE_FLOATS 16 |
| #define | DT_CACHELINE_PIXELS 4 |
| #define | DT_ALIGNED_ARRAY __attribute__((aligned(DT_CACHELINE_BYTES))) |
| #define | DT_ALIGNED_PIXEL __attribute__((aligned(16))) |
| #define | dt_free(ptr) |
| #define | dt_free_align(ptr) |
Functions | |
| static gboolean | dt_is_aligned (const void *pointer, size_t byte_count) |
| static size_t | dt_round_size (const size_t size, const size_t alignment) |
| static size_t | dt_round_size_sse (const size_t size) |
| static void * | dt_alloc_align_internal (size_t size) |
| void * | dt_alloc_align (size_t size) |
| static void | dt_free_gpointer (gpointer ptr) |
| static void | dt_free_align_ptr (void *mem) |
| static void * | dt_calloc_align (size_t size) |
| static float * | dt_alloc_align_float (size_t pixels) |
| static float * | dt_calloc_align_float (size_t pixels) |
| static void * | dt_check_sse_aligned (void *pointer) |
| static void | memset_zero (void *const buffer, size_t size) |
| Set the memory buffer to zero as a pack of unsigned char. | |
| #define DT_ALIGNED_ARRAY __attribute__((aligned(DT_CACHELINE_BYTES))) |
Definition at line 60 of file mem_alloc.h.
| #define DT_ALIGNED_PIXEL __attribute__((aligned(16))) |
Definition at line 61 of file mem_alloc.h.
| #define DT_CACHELINE_BYTES 64 |
Definition at line 52 of file mem_alloc.h.
| #define DT_CACHELINE_FLOATS 16 |
Definition at line 53 of file mem_alloc.h.
| #define DT_CACHELINE_PIXELS 4 |
Definition at line 54 of file mem_alloc.h.
| #define dt_free | ( | ptr | ) |
Definition at line 97 of file mem_alloc.h.
| #define dt_free_align | ( | ptr | ) |
Definition at line 122 of file mem_alloc.h.
| #define DT_IS_ALIGNED | ( | x | ) | __builtin_assume_aligned(x, DT_CACHELINE_BYTES) |
Definition at line 43 of file mem_alloc.h.
| void * dt_alloc_align | ( | size_t | size | ) |
Definition at line 508 of file darktable.c.
References dt_alloc_align_internal(), and size.
Referenced by _load_jpg(), _orient_scope_buf(), _refresh_preview_module_histogram_for_hash(), dt_alloc_align_float(), dt_cache_get_with_caller(), dt_cache_seed(), dt_cairo_sharpen_surface_rgb24(), dt_calloc_align(), dt_calloc_align_float(), dt_colorchecker_patch_array_init(), dt_colorspaces_add_profile(), dt_colorspaces_enumerate_profiles(), dt_focuspeaking(), dt_iop_levels_compute_levels_automatic(), dt_iop_tonecurve_draw(), dt_ioppr_set_pipe_input_profile_info(), dt_mipmap_cache_alloc(), dt_mipmap_cache_allocate_dynamic(), and extract_color_checker().
|
inlinestatic |
Definition at line 135 of file mem_alloc.h.
References dt_alloc_align(), DT_CACHELINE_BYTES, and L.
Referenced by _allocate_curves(), _brush_get_gravity_center(), _build_clut(), _build_clut(), _draw_graph_background(), _extract_patches(), _polygon_get_gravity_center(), build_gui_kernel(), build_pixel_kernel(), commit_params(), dt_iop_tonecurve_draw(), dt_ioppr_init_profile_info(), extract_color_checker(), init_pipe(), process(), process_cl(), pseudo_solve(), solve_hermitian(), and validate_color_checker().
Definition at line 80 of file mem_alloc.h.
References DT_CACHELINE_BYTES, dt_round_size(), L, and size.
Referenced by dt_alloc_align().
Definition at line 129 of file mem_alloc.h.
References dt_alloc_align(), L, and size.
Referenced by _ensure_sample_cache_capacity(), default_init_pipe(), dt_iop_init_pipe(), gui_init(), init_pipe(), init_pipe(), and init_pipe().
|
inlinestatic |
Definition at line 139 of file mem_alloc.h.
References dt_alloc_align(), DT_CACHELINE_BYTES, and L.
Definition at line 145 of file mem_alloc.h.
References DT_CACHELINE_BYTES, dt_is_aligned(), and L.
Definition at line 111 of file mem_alloc.h.
References L.
Definition at line 104 of file mem_alloc.h.
References L.
Referenced by __attribute__(), _apply_preferences(), _ask_and_delete(), _choose_gpx_callback(), _colorspaces_destroy(), _datetime_undo_data_free(), _dev_auto_apply_presets(), _distort_xtransform(), _draw_paths(), _dt_style_update_iop_order(), _event_dnd_get(), _exif_xmp_read_data(), _exif_xmp_read_data_export(), _film_import1(), _folder_survey_job_run(), _geotag_undo_data_free(), _get_base_value(), _gradient_slider_destroy(), _history_undo_data_free(), _hm_backup_cleanup(), _hm_build_id_set_from_mod_list(), _hm_build_last_history_by_id(), _hm_build_last_history_by_id_from_history(), _hm_build_next_map_from_ids(), _hm_build_override_map(), _hm_build_prev_map_from_ids(), _hm_cached_order_applicable(), _hm_report_build_moved_set(), _hm_report_update_arrows(), _hm_restore_dest_from_backup(), _hm_topo_build_constraint_ids(), _hm_topo_build_id_info_table(), _hm_topo_merge_cleanup(), _hm_topo_resolve_incompatible_constraints(), _ioporder_get_current_order_name(), _metadata_view_update_values(), _pop_undo(), _print_button_clicked(), _refresh_display_track(), _resync_xmp_duplicates(), _save_last_tag_used(), _set_printer(), _setup_selected_images_list(), _styles_init_source_dev(), _styles_prepare_source_dev(), _undo_metadata_free(), _update(), _upgrade_data_schema_step(), _upgrade_library_schema_step(), _view_map_draw_other_locations(), _write_xmp_id(), append_styles(), apply_clicked(), build_global_distortion_map(), cleanup(), clear_search(), delete_clicked(), dt_accels_window(), dt_bauhaus_combobox_from_conf(), dt_bauhaus_widget_set_label(), dt_cleanup(), dt_conf_init(), dt_control_crawler_show_image_list(), dt_control_delete_images_job_run(), dt_control_export_job_run(), dt_control_import_data_free(), dt_dev_cleanup(), dt_dev_history_undo_start_record_locked(), dt_dev_pixelpipe_cache_init(), dt_dev_pixelpipe_cleanup_nodes(), dt_dev_snapshot_capture(), dt_dng_opcode_process_opcode_list_2(), dt_exif_read_blob(), dt_exif_xmp_read(), dt_film_remove_empty(), dt_folder_survey_absorb_new_files(), dt_folder_survey_count_new_files(), dt_folder_survey_init(), dt_get_selected_files(), dt_gui_preferences_enum(), dt_gui_set_themes(), dt_history_get_items_as_string(), dt_hm_batch_state_cleanup(), dt_image_cache_deallocate(), dt_image_read_duplicates(), dt_import_cleanup(), dt_init(), dt_ioppr_change_iop_order(), dt_ioppr_deserialize_iop_order_list(), dt_ioppr_deserialize_text_iop_order_list(), dt_ioppr_get_iop_order_list(), dt_ioppr_rebuild_iop_order_from_modules(), dt_ioppr_set_default_iop_order(), dt_ioppr_update_for_modules(), dt_lib_export_metadata_configuration_dialog(), dt_lib_export_metadata_set_conf(), dt_masks_free_form(), dt_metadata_clear(), dt_metadata_set(), dt_metadata_set_import(), dt_metadata_set_list(), dt_pwstorage_kwallet_get(), dt_pwstorage_libsecret_get(), dt_style_repository_normalize_multi_priority(), dt_styles_create_from_image(), dt_styles_get_item_list_as_string(), dt_styles_save_to_file(), dt_styles_style_data_free(), dt_tag_import(), dt_view_manager_cleanup(), dtgtk_gradient_slider_multivalue_clear_stops(), export_clicked(), finalize_store(), free_chart(), free_labels_list(), free_location(), free_params(), get_query_string(), gui_cleanup(), gui_cleanup(), gui_reset(), import_clicked(), import_preset(), init_presets(), list_match_string(), load_watermarks(), main(), main(), main(), modify_roi_in(), parse_cht(), refresh_watermarks(), run_style_scenarios(), secret_to_attributes(), set_params(), store(), update_profile_list(), and write_image().
Definition at line 68 of file mem_alloc.h.
References size.
Referenced by _prepare_resampling_plan(), dt_alloc_align_internal(), and dt_round_size_sse().
Definition at line 74 of file mem_alloc.h.
References dt_round_size(), and size.
Referenced by _dt_masks_dynbuf_growto(), fast_eigf_surface_blur(), and fast_surface_blur().
Set the memory buffer to zero as a pack of unsigned char.
| buffer | void buffer |
| size | size of the memory stride. NEEDS TO BE A MULTIPLE OF 8. |
Definition at line 159 of file mem_alloc.h.
Referenced by lmmse_demosaic(), process(), and xtrans_markesteijn_interpolate().