This allows a user to enforce that a function will not be called with any set of arguments that would trigger unbounded allocation in its body:
@check_allocs energy(x) = sum(abs2.(x))
@check_allocs function pythag(a, b, c)
return a^2 + b^2 + c^2
end
const inplace_sum = @check_allocs (x, y) -> x .= x .+ y
TODO:
[x] Add allocation check to the pipeline
[x] Add tests for all of the different function syntaxes
This allows a user to enforce that a function will not be called with any set of arguments that would trigger unbounded allocation in its body:
TODO:
Resolves #30