ClikaRT::ops::broadcast_tensors
function
broadcast_tensors()
std::vector<Tensor> broadcast_tensors(ClikaRT::Span<const Tensor> tensors)
Broadcast every input to their common shape: dims are right-aligned, size-1 dims stretch, anything else must match.
Returns VIEWS; each output shares its input's storage, with the stretched positions aliasing ONE stored element; treat the results as read-only (or contiguous one to materialize it).
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when the shapes are not broadcast-compatible (code_name()carries the reason).
Returns: one view per input, all of the common broadcast shape.
Declared in ClikaRT/compute/ops.h, line 3099