We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arith
Missing interpreter functions for arith operations (split off from #3784 CC @erick-xanadu):
@interpreter.register_impls class ArithFunctionsExt(interpreters.arith.ArithFunctions): @interpreter.impl(UIToFPOp) def run_uitofpop(self, interpreter: interpreter.Interpreter, op: UIToFPOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (float(args[0]),) @interpreter.impl(arith.SIToFPOp) def run_sitofpop(self, interpreter: interpreter.Interpreter, op: arith.SIToFPOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (float(args[0]),) @interpreter.impl(FPToUIOp) def run_fptouiop(self, interpreter: interpreter.Interpreter, op: FPToUIOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (int(args[0]),) @interpreter.impl(arith.FPToSIOp) def run_fptosiop(self, interpreter: interpreter.Interpreter, op: arith.FPToSIOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (int(args[0]),) @interpreter.impl(arith.ExtUIOp) def run_extuiop(self, interpreter: interpreter.Interpreter, op: arith.ExtUIOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return args @interpreter.impl(arith.TruncIOp) def run_trunciop(self, interpreter: interpreter.Interpreter, op: arith.TruncIOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return args @interpreter.impl(arith.DivfOp) def run_divfop(self, interpreter: interpreter.Interpreter, op: arith.DivfOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (args[0] / args[1],) @interpreter.impl(arith.FloorDivSIOp) def run_floordivsiop(self, interpreter: interpreter.Interpreter, op: arith.FloorDivSIOp, args: interpreter.PythonValues) -> interpreter.PythonValues: """Not really semantically correct, but good enough.""" return (args[0] // args[1],)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Missing interpreter functions for
arith
operations (split off from #3784 CC @erick-xanadu):The text was updated successfully, but these errors were encountered: