![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Whether one pipeline node must keep a host-RAM copy of its output. More...
Include dependency graph for pipe_cache_policy.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_dev_pipe_cache_policy_inputs_t |
| Everything the decision depends on, named. More... | |
Typedefs | |
| typedef struct dt_dev_pipe_cache_policy_inputs_t | dt_dev_pipe_cache_policy_inputs_t |
| Everything the decision depends on, named. | |
Functions | |
| static gboolean | dt_dev_pipe_cache_policy_decide (const dt_dev_pipe_cache_policy_inputs_t *in, const gboolean inherited_requirement, gboolean *upstream_requirement) |
| Decide one node's host-cache requirement, walking the pipe from the end backwards. | |
Whether one pipeline node must keep a host-RAM copy of its output.
Split out of _seal_opencl_cache_policy() so the decision is a pure function of named inputs. That is not tidiness: the outcome it computes – per-piece cache_output_on_ram – is invisible to every check this project runs. It changes no pixel in an export (the export path drives the pipe directly and never reaches the seal), it changes no hash, and it produces no log unless someone is already looking. The one time it was wrong, the symptom was a downstream module silently reading stale host bytes from a rekeyed cacheline, and it was found by dumping OpenCL buffers, not by a test.
A pure function can be pinned by one, which is what tests/unittests/test_pipe_cache_policy.c does. Gathering the inputs – which of them come from the GUI, which from the pipe – stays in dev_pixelpipe.c, where it can see those things.
Definition in file pipe_cache_policy.h.
Everything the decision depends on, named.
|
inlinestatic |
Decide one node's host-cache requirement, walking the pipe from the end backwards.
| in | The node's own inputs. | |
| inherited_requirement | Whether this node's output is read from RAM as the input of the next enabled node (TRUE for the last one, whose output is displayed). | |
| [out] | upstream_requirement | What to hand the node before this one: this node's own input requirement, whatever it inherited (one hop, see the note in the body). |
Definition at line 79 of file pipe_cache_policy.h.
References dt_dev_pipe_cache_policy_inputs_t::active_in_gui, dt_dev_pipe_cache_policy_inputs_t::authored_cache, dt_dev_pipe_cache_policy_inputs_t::color_picker_on, dt_dev_pipe_cache_policy_inputs_t::global_hist_input_on, dt_dev_pipe_cache_policy_inputs_t::global_hist_output_on, dt_dev_pipe_cache_policy_inputs_t::has_autoset, IS_NULL_PTR, L, dt_dev_pipe_cache_policy_inputs_t::module_hist_on, dt_dev_pipe_cache_policy_inputs_t::supports_opencl, and dt_dev_pipe_cache_policy_inputs_t::user_requested_cache.
Referenced by _a_cpu_node_still_makes_its_producer_publish(), _a_gpu_node_does_not_relay_its_consumers_requirement(), _a_gpu_node_nothing_reads_from_ram_caches_nothing(), _cpu_only_node_needs_its_input_on_host(), _each_own_input_reason_raises_upstream(), _each_own_output_reason_raises_own(), _gpu_node_requires_nothing_on_its_own(), _null_upstream_pointer_is_allowed(), _seal_opencl_cache_policy(), and _walk().