flopscope.

flopscope.accounting.bartlett_cost

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

Weighted FLOP cost of Bartlett 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.

Four ops per sample: compare, divide, add/subtract, select (single branch of numpy where-based evaluation). Weight 1.0 (no transcendental; constant in flop_cost).