Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Aggregate kernel consumes each batch and output a state, which is then merged with other batches. Currently, state parameter is defined as const KernelState& in merge interface. It may cause unnecessary data copying for kernels with non-trivial states.
E.g., mode kernel maintains a value:count map in its state structure, it's better to move the map than copy it (for merge operation of the first batch).
Aggregate kernel code template is at [1]. batch_state is an auto variable(line 873), modifying it in kernel->merge() is okay (line 888).
Attachments
Issue Links
- links to