![]() |
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 src/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 | What the nodes downstream of this one already established. | |
| [out] | upstream_requirement | What to hand the node before this one. Never smaller than inherited_requirement – see the note below, it is the whole reason this is a function and not an expression. |
Definition at line 78 of file pipe_cache_policy.h.
References IS_NULL_PTR, L, and dt_dev_pipe_cache_policy_inputs_t::supports_opencl.
Referenced by _cpu_only_node_needs_its_input_on_host(), _each_own_input_reason_raises_upstream(), _each_own_output_reason_raises_own(), _gpu_node_propagates_an_inherited_requirement(), _gpu_node_requires_nothing_on_its_own(), _null_upstream_pointer_is_allowed(), and _seal_opencl_cache_policy().