Sliding Average Async Task
The Sliding Average async task maintains a rolling mean of the most recent window_size frames entirely on the GPU.
Note
The internal buffer is provisioned with target_capacity + window_size slots in device memory. The extra target_capacity slots absorb producer/consumer latency.
Inputs
This task consumes a single tensor per push with shape (1, H, W), where:
1: unit batch size (exactly one frame per push)H,W: frame height and width
The tensor must be 32-bit floating point (float32) data already located in device memory. acquire_input returns a writable view that aliases the internal circular buffer.
Outputs
After the warm-up period required to enqueue the first window_size frames, each pop exposes one tensor of shape (1, H, W) with the same dtype and memory location as the input.
Inplace
This task does not perform inplace propagation between its input and output tensors.
Ownership
The task owns both the input and output storage it exposes.
Settings
Example:
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|---|---|---|---|---|---|
| + target_capacity | No | integer | No | - | Number of extra frames the circular buffer can hold beyond the averaging window. Must satisfy: - target_capacity > 0 |
| + window_size | No | integer | No | - | Number of frames included in each running average. Must satisfy: - window_size > 0 |