flopscope.accounting.polyval_cost
flopscope.accounting.polyval_cost(deg, m)[flopscope source]
Cost for polyval: Horner's method = m * deg FLOPs (FMA=1 op).
Parameters
- deg:int
Argument forwarded to the analytical polyval cost formula.
- m:int
Number of rows in the input matrix.
Returns
- :int
Weighted public cost estimate, floored to match runtime accounting.
Notes
This helper multiplies the analytical FLOP count by the active weight from flopscope._weights and then applies int(...) so public estimates match budget deductions.