SkillAgentSearch skills...

ResettableStacks.jl

A stack implementation with a reset! function which avoids garbage collection for scientific machine learning (SciML)

Install / Use

/learn @SciML/ResettableStacks.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ResettableStacks

Build Status

ResettableStacks ResettableStacks

A ResettableStack is a stack implementation which has a reset! function which will "reset" the stack, allowing it to write over its previous data. This allows you to reset the stack while avoiding garbage collection which can greatly improve performance in certain use cases. Every FULL_RESET_COUNT resets, it does a full reset, which is useful if the stack got very large for some reason and it no longer needs to be that large (while minimizing garbage collection costs).

Installation

To install the package, simply use:

using Pkg
Pkg.add("ResettableStacks")
using ResettableStacks

For the latest development version:

using Pkg
Pkg.add(url="https://github.com/SciML/ResettableStacks.jl")

Usage

using ResettableStacks
S = ResettableStack{true}(Tuple{Float64, Float64, Float64})

push!(S, (0.5, 0.4, 0.3))
push!(S, (0.5, 0.4, 0.4))
reset!(S)
push!(S, (0.5, 0.4, 0.3))
tup = pop!(S)
View on GitHub
GitHub Stars7
CategoryEducation
Updated2mo ago
Forks10

Languages

Julia

Security Score

75/100

Audited on Jan 8, 2026

No findings