struct local_reduction
Declaration
struct local_reduction { /* full declaration omitted */ };
Description
Transient state for a node-local eager reduction that is emitted around kernels that explicitly include a reduction. Tracks the gather-allocation that is created early to rescue the current buffer value across the kernel invocation in case the reduction is not initialize_to_identity
and the command graph designates the local node to be the reduction initializer.
Member Variables
- bool include_local_buffer_value = false
- If true local node is the one to include its current version of the existing buffer in the reduction.
- size_t first_kernel_chunk_offset = 0
- If the local reduction includes the current buffer value, we add an additional reduction-chunk at the front.
- size_t num_input_chunks = 1
- One per participating local chunk, plus one if the local node includes the current buffer value.
- size_t chunk_size_bytes = 0
- allocation_id gather_aid = null_allocation_id
- alloc_instruction* gather_alloc_instr = nullptr