Lift Reroll avatar

Lift Reroll

1 version
Open in App

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 unroll or 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

TypeDescription
UInt64Size stream — one size value per batch.
tElements stream.

Outputs

TypeDescription
[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