acceptsInputShape function

bool acceptsInputShape(
  1. String opName,
  2. Shape shape
)

Whether opName accepts an input of shape.

Unknown names return true (conservative default) so a future op added to the parser but missing from this table is never hidden from the completer. SAny inputs pass the filter for every op — the acceptance predicates enforce this invariant themselves, so it holds for every registered op without needing a wrapper check.

Used by the REPL completer to shape-gate pipe-op candidates at .x | <TAB>.

Implementation

bool acceptsInputShape(String opName, Shape shape) =>
    pipeOpInfoForName(opName)?.accepts(shape) ?? true;