Lift Reroll
1 version
Lift reroll
Collects streamed elements into lists of dynamically specified sizes, using a sizes stream as the grouping signal.
Use this when
- An upstream component emits items one at a time, but a downstream component expects batched lists.
- Batch sizes vary at runtime (e.g. driven by frame metadata or an external pacing signal).
- You need to reconstruct groupings after a
Lift unrollor similar flattening step.
What it does
Reads one size value from the sizes stream, then pulls that many elements from the elements stream and emits them as a single list. Repeats for every size value. Sizes [2, 3, 5] with elements 0..9 produce [0,1], [2,3,4], [5,6,7,8,9].
Inputs
| Type | Description |
|---|---|
UInt64 | Size stream — one size value per batch. |
t | Elements stream. |
Outputs
| Type | Description |
|---|---|
[t] | Lists of the specified sizes, in order. |
Parameters
This transformation takes no parameters.
Works best with
Lift unroll— natural inverse when sizes are preserved.- Any component that emits groupings along with their cardinality.
Caveats
- The sizes and elements streams must stay consistent: total elements must equal the sum of sizes, or the pipeline will stall.
- The sizes stream is consumed one value per output list.
Versions
- 818d876ddefaultlatestlinuxTransformation