flopscope.

flopscope.accounting.hamming_cost

flopscope.accounting.hamming_cost(n)[flopscope source]

Weighted FLOP cost of Hamming window generation.

Parameters

n:int

Number of columns 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.

Per sample: 1 cosine at the transcendental tier (16) + 1 multiply + 1 subtract = 18. Weight 1.0 (constant in flop_cost).