From 3b76ae0dbee6ba5073bd17eba831c18e7a393c84 Mon Sep 17 00:00:00 2001 From: Sathvik Bhagavan <35105271+sathvikbhagavan@users.noreply.github.com> Date: Mon, 3 Jun 2024 07:41:55 +0530 Subject: [PATCH] refactor: trigger resize warning with `maxlog = 1` --- src/PreallocationTools.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PreallocationTools.jl b/src/PreallocationTools.jl index 80e3c34..d359f61 100644 --- a/src/PreallocationTools.jl +++ b/src/PreallocationTools.jl @@ -190,7 +190,7 @@ function enlargediffcache!(dc, nelem) #warning comes only once per DiffCache. chunksize = div(nelem, length(dc.du)) - 1 @warn "The supplied DiffCache was too small and was enlarged. This incurs allocations on the first call to `get_tmp`. If few calls to `get_tmp` occur and optimal performance is essential, - consider changing 'N'/chunk size of this DiffCache to $chunksize." + consider changing 'N'/chunk size of this DiffCache to $chunksize." maxlog=1 resize!(dc.dual_du, nelem) end