You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be relevant to know the storage used by a stats or a solver sometimes.
I implemented my own function in Krylov.jl but it can be used here too for optimization solvers.
functionksizeof(attribute)
ifisa(attribute, AbstractVector) &&!isempty(attribute)
# All vectors inside a vector have the same size in Krylov.jl
size_attribute =length(attribute) *ksizeof(attribute[1])
else
size_attribute =sizeof(attribute)
endreturn size_attribute
endfunctionsizeof(stats_solver ::Union{KrylovStats, KrylovSolver})
type =typeof(stats_solver)
nfields =fieldcount(type)
storage =0for i =1:nfields
field_i =getfield(stats_solver, i)
size_i =ksizeof(field_i)
storage += size_i
endreturn storage
end
The text was updated successfully, but these errors were encountered:
It could be relevant to know the storage used by a
stats
or asolver
sometimes.I implemented my own function in Krylov.jl but it can be used here too for optimization solvers.
The text was updated successfully, but these errors were encountered: