ClikaRT::ops::repeat
function
repeat()
Tensor repeat(Tensor x, ClikaRT::Span<const ScalarOrTensor> sizes)
Tile x by per-dim repeat counts: sizes[i] copies along dim i.
sizes must carry at least the input's rank; extra LEADING entries add fresh leading dims. Counts are literals or 0-D integer Tensors (a tensor count traces symbolically). Copies; numel scales by the product of the counts.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) whensizeshas fewer entries than the rank or a count is negative (code_name()carries the reason).
Returns: a new tensor with each dim scaled by its count.
auto twice = ClikaRT::ops::repeat(x, {2, 1}); // duplicate along dim 0
Declared in ClikaRT/compute/ops.h, line 3303