11# This file is generated by gen.py
22import math
3- from kirin .dialects .math .dialect import dialect
3+
4+ from kirin .interp import Frame , MethodTable , impl
45from kirin .dialects .math import stmts
5- from kirin .interp import MethodTable , Frame , impl
6+ from kirin .dialects . math . dialect import dialect
67
78
89@dialect .register
@@ -13,217 +14,181 @@ def acos(self, interp, frame: Frame, stmt: stmts.acos):
1314 values = frame .get_values (stmt .args )
1415 return (math .acos (values [0 ]),)
1516
16-
1717 @impl (stmts .asin )
1818 def asin (self , interp , frame : Frame , stmt : stmts .asin ):
1919 values = frame .get_values (stmt .args )
2020 return (math .asin (values [0 ]),)
2121
22-
2322 @impl (stmts .asinh )
2423 def asinh (self , interp , frame : Frame , stmt : stmts .asinh ):
2524 values = frame .get_values (stmt .args )
2625 return (math .asinh (values [0 ]),)
2726
28-
2927 @impl (stmts .atan )
3028 def atan (self , interp , frame : Frame , stmt : stmts .atan ):
3129 values = frame .get_values (stmt .args )
3230 return (math .atan (values [0 ]),)
3331
34-
3532 @impl (stmts .atan2 )
3633 def atan2 (self , interp , frame : Frame , stmt : stmts .atan2 ):
3734 values = frame .get_values (stmt .args )
3835 return (math .atan2 (values [0 ], values [1 ]),)
3936
40-
4137 @impl (stmts .atanh )
4238 def atanh (self , interp , frame : Frame , stmt : stmts .atanh ):
4339 values = frame .get_values (stmt .args )
4440 return (math .atanh (values [0 ]),)
4541
46-
4742 @impl (stmts .ceil )
4843 def ceil (self , interp , frame : Frame , stmt : stmts .ceil ):
4944 values = frame .get_values (stmt .args )
5045 return (math .ceil (values [0 ]),)
5146
52-
5347 @impl (stmts .copysign )
5448 def copysign (self , interp , frame : Frame , stmt : stmts .copysign ):
5549 values = frame .get_values (stmt .args )
5650 return (math .copysign (values [0 ], values [1 ]),)
5751
58-
5952 @impl (stmts .cos )
6053 def cos (self , interp , frame : Frame , stmt : stmts .cos ):
6154 values = frame .get_values (stmt .args )
6255 return (math .cos (values [0 ]),)
6356
64-
6557 @impl (stmts .cosh )
6658 def cosh (self , interp , frame : Frame , stmt : stmts .cosh ):
6759 values = frame .get_values (stmt .args )
6860 return (math .cosh (values [0 ]),)
6961
70-
7162 @impl (stmts .degrees )
7263 def degrees (self , interp , frame : Frame , stmt : stmts .degrees ):
7364 values = frame .get_values (stmt .args )
7465 return (math .degrees (values [0 ]),)
7566
76-
7767 @impl (stmts .erf )
7868 def erf (self , interp , frame : Frame , stmt : stmts .erf ):
7969 values = frame .get_values (stmt .args )
8070 return (math .erf (values [0 ]),)
8171
82-
8372 @impl (stmts .erfc )
8473 def erfc (self , interp , frame : Frame , stmt : stmts .erfc ):
8574 values = frame .get_values (stmt .args )
8675 return (math .erfc (values [0 ]),)
8776
88-
8977 @impl (stmts .exp )
9078 def exp (self , interp , frame : Frame , stmt : stmts .exp ):
9179 values = frame .get_values (stmt .args )
9280 return (math .exp (values [0 ]),)
9381
94-
9582 @impl (stmts .expm1 )
9683 def expm1 (self , interp , frame : Frame , stmt : stmts .expm1 ):
9784 values = frame .get_values (stmt .args )
9885 return (math .expm1 (values [0 ]),)
9986
100-
10187 @impl (stmts .fabs )
10288 def fabs (self , interp , frame : Frame , stmt : stmts .fabs ):
10389 values = frame .get_values (stmt .args )
10490 return (math .fabs (values [0 ]),)
10591
106-
10792 @impl (stmts .floor )
10893 def floor (self , interp , frame : Frame , stmt : stmts .floor ):
10994 values = frame .get_values (stmt .args )
11095 return (math .floor (values [0 ]),)
11196
112-
11397 @impl (stmts .fmod )
11498 def fmod (self , interp , frame : Frame , stmt : stmts .fmod ):
11599 values = frame .get_values (stmt .args )
116100 return (math .fmod (values [0 ], values [1 ]),)
117101
118-
119102 @impl (stmts .gamma )
120103 def gamma (self , interp , frame : Frame , stmt : stmts .gamma ):
121104 values = frame .get_values (stmt .args )
122105 return (math .gamma (values [0 ]),)
123106
124-
125107 @impl (stmts .isfinite )
126108 def isfinite (self , interp , frame : Frame , stmt : stmts .isfinite ):
127109 values = frame .get_values (stmt .args )
128110 return (math .isfinite (values [0 ]),)
129111
130-
131112 @impl (stmts .isinf )
132113 def isinf (self , interp , frame : Frame , stmt : stmts .isinf ):
133114 values = frame .get_values (stmt .args )
134115 return (math .isinf (values [0 ]),)
135116
136-
137117 @impl (stmts .isnan )
138118 def isnan (self , interp , frame : Frame , stmt : stmts .isnan ):
139119 values = frame .get_values (stmt .args )
140120 return (math .isnan (values [0 ]),)
141121
142-
143122 @impl (stmts .lgamma )
144123 def lgamma (self , interp , frame : Frame , stmt : stmts .lgamma ):
145124 values = frame .get_values (stmt .args )
146125 return (math .lgamma (values [0 ]),)
147126
148-
149127 @impl (stmts .log )
150128 def log (self , interp , frame : Frame , stmt : stmts .log ):
151129 values = frame .get_values (stmt .args )
152130 return (math .log (values [0 ], values [1 ]),)
153131
154-
155132 @impl (stmts .log10 )
156133 def log10 (self , interp , frame : Frame , stmt : stmts .log10 ):
157134 values = frame .get_values (stmt .args )
158135 return (math .log10 (values [0 ]),)
159136
160-
161137 @impl (stmts .log1p )
162138 def log1p (self , interp , frame : Frame , stmt : stmts .log1p ):
163139 values = frame .get_values (stmt .args )
164140 return (math .log1p (values [0 ]),)
165141
166-
167142 @impl (stmts .log2 )
168143 def log2 (self , interp , frame : Frame , stmt : stmts .log2 ):
169144 values = frame .get_values (stmt .args )
170145 return (math .log2 (values [0 ]),)
171146
172-
173147 @impl (stmts .pow )
174148 def pow (self , interp , frame : Frame , stmt : stmts .pow ):
175149 values = frame .get_values (stmt .args )
176150 return (math .pow (values [0 ], values [1 ]),)
177151
178-
179152 @impl (stmts .radians )
180153 def radians (self , interp , frame : Frame , stmt : stmts .radians ):
181154 values = frame .get_values (stmt .args )
182155 return (math .radians (values [0 ]),)
183156
184-
185157 @impl (stmts .remainder )
186158 def remainder (self , interp , frame : Frame , stmt : stmts .remainder ):
187159 values = frame .get_values (stmt .args )
188160 return (math .remainder (values [0 ], values [1 ]),)
189161
190-
191162 @impl (stmts .sin )
192163 def sin (self , interp , frame : Frame , stmt : stmts .sin ):
193164 values = frame .get_values (stmt .args )
194165 return (math .sin (values [0 ]),)
195166
196-
197167 @impl (stmts .sinh )
198168 def sinh (self , interp , frame : Frame , stmt : stmts .sinh ):
199169 values = frame .get_values (stmt .args )
200170 return (math .sinh (values [0 ]),)
201171
202-
203172 @impl (stmts .sqrt )
204173 def sqrt (self , interp , frame : Frame , stmt : stmts .sqrt ):
205174 values = frame .get_values (stmt .args )
206175 return (math .sqrt (values [0 ]),)
207176
208-
209177 @impl (stmts .tan )
210178 def tan (self , interp , frame : Frame , stmt : stmts .tan ):
211179 values = frame .get_values (stmt .args )
212180 return (math .tan (values [0 ]),)
213181
214-
215182 @impl (stmts .tanh )
216183 def tanh (self , interp , frame : Frame , stmt : stmts .tanh ):
217184 values = frame .get_values (stmt .args )
218185 return (math .tanh (values [0 ]),)
219186
220-
221187 @impl (stmts .trunc )
222188 def trunc (self , interp , frame : Frame , stmt : stmts .trunc ):
223189 values = frame .get_values (stmt .args )
224190 return (math .trunc (values [0 ]),)
225191
226-
227192 @impl (stmts .ulp )
228193 def ulp (self , interp , frame : Frame , stmt : stmts .ulp ):
229194 values = frame .get_values (stmt .args )
0 commit comments