Skip to content

Fast model for large arrays of solid-state stochastic synapses

License

Notifications You must be signed in to change notification settings

thennen/StochasticSynapses.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOI

StochasticSynapses.jl

This is a Julia implementation of the stochastic synapse model described in this paper.

See a short demo of the switching operation here.

Installation

  import Pkg; Pkg.add(url="https://github.com/thennen/StochasticSynapses.jl")

Examples

CPU version

using StochasticSynapses
M = 2^20
# Initialize a million cells
cells = [Cell() for m in 1:M]
# SET all cells to their low resistance state
applyVoltage!.(cells, -2f0)
# Apply random voltages to all cells
voltages = randn(Float32, M)
applyVoltage!.(cells, voltages)
I = Iread.(cells)

GPU version

using StochasticSynapses, CUDA
M = 2^20
p = 10
cells = CellArrayGPU(M, p)
voltages = CUDA.randn(M)
applyVoltage!(cells, voltages)
I = Iread(cells)