Skip to content

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

License

Notifications You must be signed in to change notification settings

SciML/ResettableStacks.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 control costs).

Installation

To install the package, simply use:

Pkg.add("ResettableStacks")
using ResettableStacks

For the latest version, checkout master via:

Pkg.checkout("ResettableStacks")

Usage

using ResettableStacks
S = ResettableStack{}(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)

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages