Skip to main content

ClikaRT::ops::flip

function

flip()

Tensor flip(Tensor x, ClikaRT::Span<const std::int64_t> dims)

Reverse the element order along each dim in dims.

Always copies; a reversed layout is not expressible as a view in this runtime, so this op never returns one.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when a dim repeats or is out of range (code_name() carries the reason).

Returns: a new tensor, x's shape and dtype.

Declared in ClikaRT/compute/ops.h, line 3194